Metadata-Version: 2.4
Name: zerodev-kek
Version: 0.2.0
Summary: KEK: Kernel Examination Kit - A CLI tool to parse, hash, and debug EIP-4337 UserOperations for Kernel.
Home-page: https://github.com/zerodevapp/kek
Author: taek lee
Author-email: taek lee <leekt216@gmail.com>
Project-URL: Homepage, https://github.com/zerodevapp/kek
Project-URL: Issues, https://github.com/zerodevapp/kek/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: eth-utils>=5.3.0
Requires-Dist: eth-abi>=4.0.0
Requires-Dist: eth-keys>=0.4.0
Requires-Dist: click>=8.0.0
Requires-Dist: ruff>=0.11.5
Requires-Dist: web3>=6.0.0
Requires-Dist: click-extra>=0.4.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: ruff>=0.11.5; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# KEK: Kernel Examination Kit

A CLI tool to parse, hash, verify signatures, and debug EIP-4337 UserOperations, designed for use with Kernel.

## Installation

```bash
pip install zerodev_kek
```

## Usage

The tool provides several commands:

```bash
# Get help
kek --help

# Format input (raw text, UserOp JSON, PackedUserOp JSON) to specified output JSON
kek format "<input_data>" [--output <packed|userop>] # Default output is packed

# Calculate UserOp hash from any input format
kek userOpHash "<input_data>" --chainId <id> [--entrypoint <addr>]

# Recover signer (show all attempts) from any input format
kek signer "<input_data>" --chainId <id> --signer [--entrypoint <addr>]

# Verify signer against a specific address from any input format
kek signer "<input_data>" --chainId <id> --signer <expected_addr> [--entrypoint <addr>]

# Generate debug cast call command from any input format (DEFAULT: prints command)
kek debug "<input_data>" --rpc-url <url>

# Generate AND execute debug cast call command
kek debug "<input_data>" --rpc-url <url> | sh
```

**Note:** Wrap multi-line raw UserOperation text in quotes (`"..."`). 

- [ ] Use entrypoint simulation contract to get the detailed trace
