By zama-ai
FHE-encrypted x402 payments for Claude Code agents on Ethereum via Zama ERC-7984. Six auto-discoverable skills plus three curated slash commands for encrypted cUSDC transfers, ERC-8183 escrow jobs, ERC-8004 agent identity and reputation, Zama ACL balance delegation, and x402 paid-request demo orchestrators.
Run the x402 research-and-visualize demo. Chains three encrypted paid requests (search, LLM analysis, image generation) and reports per-step receipts. Optional query argument; defaults to FHE research.
Show wallet address, network, ETH balance, and contract addresses for x402fhe
Send an encrypted x402 payment in cUSDC to a recipient address. Takes a recipient Ethereum address and a decimal USDC amount as positional arguments.
ERC-8004 on-chain agent identity (NFT registry + EIP-712 wallet linking) and reputation feedback (proof-linked rating) for x402fhe. Covers `register-agent` (mints an identity NFT, sets the agent URI, and self-signs an EIP-712 wallet link) and `give-feedback` (submits a rating against an agentId using a proof derived from a prior payment nonce). Use when the user asks to register an agent, mint an agent identity, set an agent URI, link an agent wallet, rate an agent, leave feedback for an agent, score an agent, submit a review, give a star rating, or attest to an agent's quality. Do NOT use for sending tokens, wrapping plain USDC, balance lookups, redeeming cUSDC, escrow job lifecycle, view delegation setup, or HTTP-402 demo orchestration — those are handled by sibling skills (fhe-payment-basics, fhe-payment-unwrap, fhe-escrow, fhe-delegation, x402-demo-orchestrators).
Zama-native ACL delegation for x402fhe — share read access to encrypted cUSDC balances (or other FHE handles) with a chosen Ethereum address, revoke that access, or use a delegation that someone else granted you to decrypt their balance. Use when the user asks to grant view, share encrypted balance, let someone read their balance, give read access, delegate decryption, revoke a delegation, take back read access, or use a previously granted delegation to read another address's encrypted cUSDC balance. Also use when a server needs to authorize a facilitator to decrypt stored payment-amount handles on the X402PaymentVerifier contract via the --contract override. Do NOT use for direct payments, wrapping or unwrapping cUSDC, escrow job lifecycle, agent identity registration, reputation feedback, or HTTP-402 paid-request orchestration — those are handled by sibling skills (fhe-payment-basics, fhe-payment-unwrap, fhe-escrow, fhe-agent-identity, x402-demo-orchestrators).
ERC-8183 encrypted job escrow on x402fhe — create a job (client + provider + evaluator + expiry + description), attach an encrypted cUSDC budget and fund it, and later approve or reject the submitted deliverable through the AgenticCommerceProtocol contract. Use when the user asks to create a job, open an escrow, lock a budget, attach funds to a job, escrow cUSDC for an evaluator, hire a provider, approve or reject a delivered job, release payout, refund a client, or otherwise run any step of the ERC-8183 job lifecycle. Do NOT use for direct token transfers, wrap, balance checks, redeeming cUSDC, agent identity, reputation feedback, delegated balance reads, or HTTP-402 orchestration — those are handled by sibling skills (fhe-payment-basics, fhe-payment-unwrap, fhe-agent-identity, fhe-delegation, x402-demo-orchestrators).
Direct-token operations on Zama-encrypted cUSDC for x402fhe — read wallet/network info, check public and encrypted balances (own or via prior delegation), wrap plain USDC into confidential cUSDC, and send encrypted payments through the X402PaymentVerifier relay. Use when the user asks to pay, send, transfer, wrap, deposit, top up, check balance, decrypt balance, see wallet info, or inspect contract addresses for x402fhe confidential payments. Do NOT use for redeeming cUSDC back to USDC, escrow job funding, agent identity, reputation feedback, balance delegation setup, or HTTP-402 demo orchestration — those are handled by sibling skills (fhe-payment-unwrap, fhe-escrow, fhe-agent-identity, fhe-delegation, x402-demo-orchestrators).
Two-stage async unwrap of confidential cUSDC (ERC-7984) back into plain USDC (ERC-20) via the Zama KMS async gateway. Covers the `unwrap` command (burns cUSDC and may auto-finalize) and the `finalize-unwrap` command (completes the second stage using a burn handle or legacy request/proof params). Use when the user asks to unwrap, withdraw, redeem, convert back, exit, cash out, or release cUSDC into plain USDC, or when they need to resume a previously requested unwrap using a burnHandle. Do NOT use for wrap, pay, balance, escrow, identity, delegation, or HTTP-402 flows — those are handled by sibling skills (fhe-payment-basics, fhe-escrow, fhe-agent-identity, fhe-delegation, x402-demo-orchestrators).
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Confidential agentic payments stack for AI agents.
x402fhe gives agents the primitives they need to participate in a real economy:
The repo is live on Sepolia today with Zama's canonical wrapper stack and includes the full operator surface: core SDK, Express paywall, OpenClaw skill, frontend UI, facilitator, DFNS MPC, direct Ledger, supervised Ledger bridge, and live demo flows.
| Layer | Status | Detail |
|---|---|---|
| Smart contracts | Deployed on Sepolia | 4 contracts (verifier, escrow, identity, reputation) wired to Zama's canonical Sepolia token stack. Contract suite covers the local mock path; docs/SEPOLIA-E2E.md tracks live-network coverage separately. |
| TypeScript SDK | Usable now | fheFetch (auto-402 client), fhePaywall (Express middleware), FhePaymentHandler, SilentFailureGuard, facilitator client, and real on-chain payment execution through FhePayingClient. |
| OpenClaw skill | Usable now | 16 commands including delegation (grant-view, revoke-view, view-as), balance --of, and 2 demo orchestrators (research-and-visualize, review-and-rate). Command surface is documented in packages/openclaw-skill/README.md. |
| FHE session | Encrypt + decrypt working | ZamaFheSession wraps @zama-fhe/sdk v2.3.0-alpha.2 (vendored). Encryption is local TFHE. CLI decryption (balance --decrypt) verified on live Sepolia via Zama KMS. Falls back to stub mode when the SDK is unavailable. |
| Wallets | Multiple signer modes | Local private keys and DFNS MPC work across the core/runtime stack. Direct browser-attended Ledger support is available through @x402fhe/core/browser + @x402fhe/ui/ledger, and supervised OpenClaw Ledger signing is available through the localhost bridge apps. |
| UI components | Native React SDK path live | @x402fhe/ui composes QueryClientProvider + ZamaProvider through X402FheProvider, useEncryptedBalance() is backed by native useConfidentialBalance(), and the reference frontend supports browser wallets plus Ledger in attended mode. |
| Payment client | Real on-chain TXs | FhePayingClient submits confidentialTransferAndCall on-chain. Budget tracking + receipts. A standalone Sepolia HTTP E2E script exercises fheFetch -> 402 -> pay -> fhePaywall -> facilitator -> 200. |
| Live demo | Dry-run verified | Three Telegram demos: (1) "Wallet Basics" — wrap + confidential transfer + balance (no servers needed), (2) "Private API Shopping" — 3 chained fheFetch payments, (3) "Agent Identity + Paid Work + Feedback" — paid code review + proof-linked reputation. See docs/DEMO.md. |
| Mainnet | Architecture-ready, not deployed | Contracts compile for mainnet and the docs cover the intended shape, but the public deployment and operator story is Sepolia-first today. |
Node.js >= 22 required. The fast local suites are healthy, the live Sepolia path is documented separately in
docs/SEPOLIA-E2E.md, and standards alignment is tracked indocs/ERC-COMPLIANCE.md.
With this stack, an agent can:
x402fhe is best understood as five layers working together:
Three skills for building confidential dApps on Zama's FHEVM: protocol concepts & addresses, encrypted Solidity, and TypeScript SDK integration.
npx claudepluginhub zama-ai/confidential-agentic-payment-stack --plugin x402fheClaude Code bridge for the existing AgentLayer wallet runtime. Connects to Solana, Bitcoin, and EVM wallets without creating a new one.
On-chain AI skills via x402 micropayments on Base
Expert AP2 (Agent Payments Protocol) knowledge for building agentic commerce payment modules — Verifiable Digital Credentials, mandates, cryptographic signing, transaction flows, and multi-agent payment orchestration.
Lightning Network agent toolkit. Container-first skills for running Lightning Terminal (litd) nodes with lnd, loop, pool, and tapd. Includes remote signer security, L402 commerce with lnget and Aperture, scoped macaroon credentials, and MCP server integration.
Pay-per-call access to premium APIs via x402/MPP micropayments.
Canonical Starknet skill bundle for AI agents: wallets, DeFi, identity, payments, privacy, and Cairo contract workflows.