Skip to main content
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
string
required

A wallet address.

Pattern: ^0x[0-9a-fA-F]{40}$


Chain IDs
array

An array of chain IDs to get capabilities for.

Chain ID
string

An EIP-155 chain ID in hexadecimal format.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Returns

Capabilities
object

An 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:

  • 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.
If the 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
string
[]
array

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"
}
}
}