Getting Started
Wallets
For a wallet to be EIP-5792 compliant, it must implement support for the four new RPC methods specified in the EIP.
-
wallet_getCapabilities
- Returns, per chain ID, the capabilities a wallet supports. An example of a capability is
atomicBatch
, which specifies that a wallet can submit multiple calls as part of a single transaction.
- Returns, per chain ID, the capabilities a wallet supports. An example of a capability is
-
wallet_sendCalls
- Requests that a wallet submits a batch of calls. This method also supports communicating with a wallet about capabilities it supports.
-
wallet_getCallsStatus
- Returns the status of a call batch that was sent via
wallet_sendCalls
. This method returns a subset of the fields thateth_getTransactionReceipt
returns, excluding any fields that may differ across wallet implementations.
- Returns the status of a call batch that was sent via
-
wallet_showCallsStatus
- Requests that a wallet shows information about a given call bundle that was sent with
wallet_sendCalls
.
- Requests that a wallet shows information about a given call bundle that was sent with
See the reference section for details on how these should be implemented.
Apps
The easiest way for apps to start using EIP-5792 is to use Wagmi and the experimental EIP-5792 Wagmi hooks.
App.tsx
import { useCapabilities } from 'wagmi/experimental'
function App() {
const { data: capabilities } = useCapabilities()
{ 84532: { atomicBatch: { supported: true, }, } } return <div />
}
See the Wagmi documentation for more.
Alternatively, see thirdweb's EIP-5792 hooks.