> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# wallet\_getCapabilities

Gets supported capabilities of the global wallet. Based on [ERC-5792](https://eips.ethereum.org/EIPS/eip-5792).

Call it right after connecting and use the result for feature detection: only show a one-click batch flow when the connected chain reports `atomicBatch`, only skip the "you need gas" copy when it reports `paymasterService`, and only ask for a session when it reports `permissions`. The result is keyed by chain ID, so a capability enabled on one chain says nothing about another.

:::info
The Application must call [`eth_requestAccounts`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/eth_requestAccounts) first. The provider serves the capabilities it received during that handshake, without opening the Wallet UI.
:::

## Request

```ts
type Request = {
  method: 'wallet_getCapabilities',
}
```

### Parameters

`wallet_getCapabilities` takes no parameters. The Wallet returns an entry for every chain it supports.

## Response

```ts
type Response = {
  [chainId: `0x${string}`]: {
    atomicBatch: {
      supported: true
    },
    paymasterService: {
      supported: true
    },
    permissions: {
      supported: true,
      signerTypes: string[],
      keyTypes: string[],
      permissionTypes: string[],
    }
  }
}
```

| Field                          | Description                                                                                                                   |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `atomicBatch.supported`        | The chain accepts a bundle from [`wallet_sendCalls`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/wallet_sendCalls) as a single atomic unit. |
| `paymasterService.supported`   | The chain can sponsor gas, which is what [gas policies](https://www.openfort.io/docs/products/cross-app-wallet/usage/gas-policies) rely on.               |
| `permissions.supported`        | The chain accepts [`wallet_grantPermissions`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/wallet_grantPermissions).                        |
| `permissions.signerTypes`      | Signer types accepted in the `signer.type` field of a grant request.                                                              |
| `permissions.keyTypes`         | Key formats accepted for the signer the permission is granted to.                                                                 |
| `permissions.permissionTypes`  | Permission types accepted in the `permissions[].type` field of a grant request.                                                   |

Trimmed response for Base Sepolia (`0x14a34`, chain ID `84532`):

```json
{
  "0x14a34": {
    "atomicBatch": { "supported": true },
    "paymasterService": { "supported": true },
    "permissions": { "supported": true }
  }
}
```

## Example

:::warning
To make these instructions concrete, we have created a sample global wallet called **Rapidfire ID**. To interact with it, you can find its SDK in the NPM package directory: [@rapidfire/id](https://www.npmjs.com/package/@rapidfire/id).

You can check out the GitHub [repository for Rapidfire Wallet](https://github.com/openfort-xyz/ecosystem-sample) to learn how to create your own wallet.
:::

An interactive demo, runnable on this page.

```ts
import RapidfireID from '@rapidfire/id'

const rapidfire = new RapidfireID()
const provider = rapidfire.getEthereumProvider()

const capabilities = await provider.request({
  method: 'wallet_getCapabilities',
})

const baseSepolia = capabilities['0x14a34']
if (baseSepolia?.atomicBatch?.supported) {
  // Batch the approve and the mint into one confirmation.
}
```

Read the entry with optional chaining, as shown above: a chain the Wallet does not support has no entry at all, and a capability the Wallet does not implement is absent rather than set to `false`.

## Spec revision

The response above follows an earlier revision of ERC-5792 than the one published today. The current spec text takes `[address, chainIds?]` as params and reports atomicity as a single `atomic` capability whose `status` is `supported`, `ready`, or `unsupported`; `paymasterService` appears there only as an illustrative example.

The Openfort global wallet is called with no params and returns `atomicBatch.supported`. Read the response shape documented on this page rather than the current spec text, and expect a mismatch when comparing against wagmi or another client that tracks the newer revision.

## Errors

| Code   | Meaning      | When it happens                                                                     |
| ------ | ------------ | ------------------------------------------------------------------------------------- |
| `4100` | Unauthorized | The Application calls the method before `eth_requestAccounts` has connected it.        |

## Related

* [`wallet_sendCalls`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/wallet_sendCalls) sends the bundle that `atomicBatch` gates.
* [`wallet_grantPermissions`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/wallet_grantPermissions) uses the signer, key, and permission types listed here.
* [Batch transactions](https://www.openfort.io/docs/products/cross-app-wallet/usage/batch-transactions) covers the wagmi equivalent of these calls.
