MetaMask
wallet_getCapabilities
Summary: Gets the capabilities of the wallet.
Returns information about the wallet's support for the
atomic
capability. The atomic
capability specifies how the wallet will execute batches of transactions sent using wallet_sendCalls
. wallet_getCapabilities
is specified by EIP-5792.
Parameters
Address
stringA wallet address.
Pattern: ^0x[0-9a-fA-F]{40}$
Chain IDs
arrayAn array of chain IDs to get capabilities for.
Returns
Capabilities
objectAn object specifying the status of the atomic
capability for specific EIP-155 chain IDs. For each chain, the atomic
capability can have a status
of:
If the supported
- The wallet will execute calls sent using
wallet_sendCalls
atomically.ready
- The wallet can upgrade to supported
pending user
approval to upgrade their account via EIP-7702.atomic
capability is not supported
or ready
for a specified chain ID, the wallet will not return anything for that chain ID.
Errors
Code
Message
-32602
The wallet cannot parse the request.
4100
The requested account and/or method has not been authorized by the user.
Customize request
Parameter
Value
Connect your MetaMask wallet to run requests successfully.
Request
await window.ethereum.request({
"method": "wallet_getCapabilities",
"params": [
"0xd46e8dd67c5d32be8058bb8eb970870f07244567",
[
"0xaa36a7"
]
],
});
Example response
{
"0xaa36a7": {
"atomic": {
"status": "ready"
}
}
}