wallet_getCapabilities
, wallet_sendCalls
, and wallet_getCallsStatus
. It shows how to check if atomic batch transactions are supported and how to use them.
wallet_getCapabilities
Appkit checks theatomic
capability from wallet_getCapabilities
of the wallet in order to know if a wallet required to handle the batch of calls atomically or not.
Wallets should include the EIP-5792 capabilities in CAIP-25.
wallet_sendCalls
Depending on the 3 different values from theatomic
capability, AppKit will trigger the wallet_sendCalls
:
supported
means that the wallet supports atomic batch transactions for the account and chain ID. The wallet executes calls atomically and contiguouslyready
means that the wallet can upgrade to support atomic execution, pending user approval.unsupported
means that the wallet does not provide any atomicity or contiguity guarantees, and it will not suggest an upgrade to the user. The dApp should fallback toeth_sendTransaction
instead ofwallet_sendCalls
, andeth_getTransactionReceipt
instead ofwallet_getCallsStatus
atomicRequired
- can be set to eithertrue
orfalse
.- If the
atomic
capability is not supported set tofalse
- If the
atomic
capability is supported set totrue
- If the
wallet_getCallsStatus
Call this function to get the information about the batch execution.-
The
batchId
field, returned from thewallet_sendCalls
will be used to identify the batch call. -
The
atomic
field specifies how the wallet handled the batch of calls, which affects the structure of thereceipts
field.
Response Example
-
if
atomic
is true, the batch was executed atomically by a wallet -
if
atomic
is false, the batch was executed non-atomically by a wallet