Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.This is a React-only guide.
Standard
EIP-5792 defines a standard for smart contract wallets that introduced new JSON-RPC methods. These methods allow batched, gas-sponsored, and conditional transactions through a simple interface. These endpoints make it easier for dapps and wallets to interact with smart accounts without needing to understand account abstraction internals like ERC-4337. EIP-5792 introduced the following functions:- wallet_getCapabilities
- wallet_sendCalls
- wallet_getCallsStatus
- wallet_showCallsStatus
Support
As of 04/2025 EIP-5792 is still rolling out, and you can find a list of wallets that support it here. The example below show how to handlewallet_getCapabilities for atomic (batch transactions) and paymaster support, and sendCalls with for a batched transaction.
Example
Track status
After callingsendCalls, use getCallsStatus to check whether the batch has settled:
viem ≥ 2.28:
waitForCallsStatus is available on the wallet client as a convenience wrapper that polls getCallsStatus internally and resolves once the batch reaches a terminal state. On older viem versions, poll getCallsStatus yourself in a loop with a delay.