Wallet Call API
WalletConnect supports EIP-5792, which defines new JSON-RPC methods that enable apps to ask a wallet to process a batch of onchain write calls and to check on the status of those calls. Applications can specify that these onchain calls be executed taking advantage of specific capabilities previously expressed by the wallet; an additional, a novel wallet RPC is defined to enable apps to query the wallet for those capabilities.
wallet_sendCalls
: Requests that a wallet submits a batch of calls.wallet_getCallsStatus
: Returns the status of a call batch that was sent via wallet_sendCalls.wallet_showCallsStatus
: Requests that a wallet shows information about a given call bundle that was sent with wallet_sendCalls.wallet_getCapabilities
: This RPC allows an application to request capabilities from a wallet (e.g. batch transactions, paymaster communication).
Usage
wallet_getCapabilities Example
The wallet_getCapabilities
method is used to request information about what capabilities a wallet supports. Following EIP-5792, here’s how it should be implemented:
Request
Response
The wallet should return a response following EIP-5792, where capabilities are organized by chain ID:
Capabilities in CAIP-25 Connection Requests
CAIP-25 defines how capabilities can be expressed in wallet-to-dapp connections. These capabilities control how methods like wallet_sendCalls
behave.
Session Properties
In a connection request, dapps can request capabilities via sessionProperties
. These can be universal (across all chains) or chain-specific:
Scoped Properties
For chain-specific capabilities, dapps use scopedProperties
:
Wallet Response
A wallet’s response should indicate which capabilities it actually supports, following EIP-5792 and CAIP-25:
- Capabilities shared across all address in a namespace can be expressed at top-level
- Address-specific capabilities can include exceptions to scope-wide capabilities
Atomic Capability
According to EIP-5792, the atomic
capability specifies how the wallet will execute batches of transactions. It has three possible values:
supported
- The wallet will execute calls atomically and contiguouslyready
- The wallet can upgrade to support atomic execution pending user approvalunsupported
- The wallet provides no atomicity guarantees
This capability is expressed per chain and is crucial for determining how wallet_sendCalls
with atomicRequired: true
will be handled.