Generated fromkash docs --json. Each command’s behaviour is documented in-binary viakash protocol <subcommand> --help— this page is the structured reference.
Usage
Subcommands
kash protocol balance
Read on-chain USDC + gas balance for a smart account (defaults to the profile’s).
Arguments
account(optional) — smart-account address (defaults to the active profile’s smartAccount)
kash protocol market
Read on-chain market state (reserves, supplies, weights, derived probabilities).
Arguments
address— market contract address (0x-prefixed)
kash protocol quote
On-chain price quote for buying or selling an outcome.
Arguments
address— market contract address (0x-prefixed)
kash protocol position
Read on-chain outcome-token holdings (ERC-1155) for a market.
Arguments
market— market contract address (0x-prefixed)account(optional) — EOA or smart-account address whose holdings to read (default: profile’s smartAccount)
kash protocol allowance
Read the on-chain USDC allowance from account to spender.
Arguments
spender— spender contract address (e.g. a market) — 0x-prefixedaccount(optional) — owner address (default: profile’s smartAccount)
kash protocol smart-account
Smart-account address derivation and deployment-status checks.
kash protocol smart-account compute
Derive the deterministic smart-account address for an EOA owner.
Options
kash protocol smart-account is-deployed
Check whether a smart account has bytecode (i.e. has been deployed on-chain).
Arguments
address(optional) — smart account address (default: profile’s smartAccount)
kash protocol fees
EIP-1559 fee estimate for the configured chain (uses eth_feeHistory).
Options
kash protocol token-id
Compute the ERC-1155 token id for a (marketId, outcomeIndex) pair (offline; no RPC).
Options
kash protocol decode-revert
Decode raw revert data into (name, args) using the Market + EntryPoint ABIs.
Arguments
data— raw revert data (0x-prefixed hex)
kash protocol trade
Direct-mode trade execution (UserOp signed locally, submitted via bundler).
kash protocol trade buy
One-shot BUY: prepare → simulate → sign → submit (and wait by default).
Arguments
market— market contract address (0x-prefixed)
kash protocol trade sell
One-shot SELL: prepare → simulate → sign → submit (and wait by default).
Arguments
market— market contract address (0x-prefixed)
kash protocol trade close
Sell the entire SA balance for an outcome (one-shot prepare → submit).
Arguments
market— market contract address (0x-prefixed)
kash protocol trade approve
USDC approval — required once before the first BUY.
Arguments
spender— spender contract address (typically a Market) — 0x-prefixed
kash protocol userop
Granular UserOp lifecycle: build, simulate, submit, hash, receipt, wait.
kash protocol userop build
Build (prepare) a fully-populated unsigned UserOp ready for offline signing.
kash protocol userop build buy
Build a fully-populated unsigned BUY UserOp ready for offline signing.
Arguments
market— market contract address (0x-prefixed)
kash protocol userop build sell
Build a fully-populated unsigned SELL UserOp ready for offline signing.
Arguments
market— market contract address (0x-prefixed)
kash protocol userop build close
Build a fully-populated unsigned UserOp that closes a position (full balance).
Arguments
market— market contract address (0x-prefixed)
kash protocol userop build approve
Build a fully-populated unsigned approve UserOp ready for offline signing.
Arguments
spender— spender contract address (typically a Market) — 0x-prefixed
kash protocol userop simulate
Simulate (eth_call) an UnsignedUserOp from a file or stdin.
Arguments
file(optional) — path to a UserOp JSON file (omit or pass ”-” for stdin)
kash protocol userop submit
Submit a SignedUserOp from a file or stdin to the configured bundler.
Arguments
file(optional) — path to a SignedUserOp JSON file (omit or pass ”-” for stdin)
kash protocol userop hash
Recompute the canonical EIP-4337 v0.7 hash for a UnsignedUserOp.
Arguments
file(optional) — path to a UserOp JSON file (omit or pass ”-” for stdin)
kash protocol userop receipt
Fetch the bundler receipt for a UserOp hash (null if not yet included).
Arguments
hash— UserOp hash (0x-prefixed, 32 bytes)
kash protocol userop wait
Wait for a UserOp to be included; polls with exponential backoff.
Arguments
hash— UserOp hash (0x-prefixed, 32 bytes)
kash protocol watch
Subscribe to on-chain trade events for a market (NDJSON stream).
Arguments
market— market contract address (0x-prefixed)