Add CAIP: CLI Wallet Protocol (CWP)#397
Conversation
Proposes a standard for CLI wallet discovery and interaction via executable plugins on PATH, inspired by EIP-6963 and git credential helpers. Discussion: ChainAgnostic#396 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces grant-session, revoke-session, and get-session operations that let a human pre-approve scoped permissions (spending limits, rate limits, contract allowlists) for AI agents to operate without per-operation approval. Adds permission/policy type system, session error codes, security considerations, and rationale. References EIP-7715, EIP-7710, and CAIP-171. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| #### `grant-session` | ||
|
|
||
| Creates a scoped permission session for autonomous operation. MUST complete within 120 seconds (requires human approval to authorize the session). |
There was a problem hiding this comment.
is human approval assumed to be interactive? Would it be more precise/explicit to say "MUST timeout if interactive user approval has not authorized the session within 120 seconds"?
|
|
||
| #### `info` | ||
|
|
||
| Returns provider metadata and capabilities. MUST complete within 3 seconds. |
There was a problem hiding this comment.
| Returns provider metadata and capabilities. MUST complete within 3 seconds. | |
| Returns provider metadata and capabilities, and doubles as [discovery mechanism](#Discovery). MUST complete within 3 seconds. |
|
Hey this great and well-thought out, appreciate all the Considerations. Minor things:
Footnotes
|
Summary
This CAIP proposes a standard protocol for CLI applications to discover and interact with wallet providers through executable plugins on PATH.
Key concepts:
wallet-<name>executables (e.g.,wallet-walletconnect,wallet-ledger,wallet-cast)info,accounts,sign-message,sign-typed-data,sign-transaction,send-transaction~/.config/wallet/config.jsonfor preferenceswalletCLI discovers providers and delegatesInspired by:
Motivation
CLI blockchain tools (API clients, deployment scripts, AI agents) hardcode specific wallet providers. There's no CLI equivalent of EIP-6963 for pluggable wallet discovery. This creates tight coupling and limits user choice.
Reference Implementations
@anthropic-ai/wallet-cli— discoverswallet-*on PATH, delegates operationswallet-walletconnect— CWP adapter for thewalletconnectCLInansen-cli— useswalletCLI for x402 auto-payment signingDiscussion
#396