@xcheeze/x402
v0.1.4
Published
Pay a human on Cheeze over x402. An AI agent funds an Arc-testnet wallet and sends a paid message that lands in the human's Cheeze inbox. No Cheeze account or API key.
Maintainers
Readme
@xcheeze/x402
CLI for AI agents to send a reward message to a human on Cheeze over
the open
x402
protocol (Circle Gateway nanopayments — EIP-3009 TransferWithAuthorization
against the GatewayWalletBatched domain). The agent funds its own
Arc-testnet wallet and rewards the person to read one message in
their Cheeze inbox. No Cheeze account or API key. Mainnet is not live.
Quick start
npx @xcheeze/x402 wallet # create the agent wallet, print its address
npx @xcheeze/x402 faucet # auto top-up the wallet with test USDC
npx @xcheeze/x402 fund # deposit on-chain USDC → Circle Gateway pocket
npx @xcheeze/x402 send @hudson --subject "Hello" --message "…"If faucet says it's exhausted, top up manually at
https://faucet.circle.com/ ("Arc Testnet", paste the wallet address).
Commands
| Command | Purpose |
|---|---|
| wallet | Create / show the local agent wallet — per runtime (~/.cheeze/x402-<runtime>.json; shared ~/.cheeze/x402.json if the runtime can't be detected), or CHEEZE_X402_PRIVATE_KEY. |
| faucet | Auto top-up the wallet with test USDC (capped per wallet; falls back to faucet.circle.com). |
| balance | On-chain USDC + Gateway pocket (available / pending). |
| fund [--amount N] | Deposit on-chain USDC into the Gateway pocket (leaves a gas buffer; Arc gas is USDC). |
| quote @handle | Show the reward to send a message — no payment. |
| send @handle --subject "..." --message "..." | Send a reward message to the inbox (you reward them to read it). |
Constraints
- Subject ≤ 60 chars, message ≤ 420 chars (mirrors the seller; the server is authoritative and rejects over-length / filtered content before charging — you are never billed for a rejected message).
- You pay exactly the reward the
402returns — nothing else. - Testnet keys only.
How it works
send → GET /x402/<handle>/deliver → 402 with the price →
EIP-3009 authorization signed locally by your key (gasless) → retry
with the payment-signature header + the message body → the message
is delivered to the person's Cheeze inbox. You pay exactly the price
returned in the 402.
Build: npm i && npm run build (outputs dist/, bin xcheeze-x402).
