> **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 cross-app 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 `atomic`, 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 = {
  /** Decimal chain ID, for example "84532". */
  [chainId: string]: {
    atomic: {
      supported: true
    },
    paymasterService: {
      supported: true
    },
    permissions: {
      supported: true
    }
  }
}
```

| Field                          | Description                                                                                                                   |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `atomic.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).                        |

Response for Base Sepolia (chain ID `84532`):

```json
{
  "84532": {
    "atomic": { "supported": true },
    "paymasterService": { "supported": true },
    "permissions": { "supported": true }
  }
}
```

## Example

:::warning
To make these instructions concrete, we have created a sample cross-app 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['84532']
if (baseSepolia?.atomic?.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 does not follow the published ERC-5792 text exactly. The current spec takes `[address, chainIds?]` as params, keys the result by hex chain ID, and reports atomicity as an `atomic` capability whose `status` is `supported`, `ready`, or `unsupported`; `paymasterService` appears there only as an illustrative example.

The Openfort cross-app wallet ignores params, keys the result by decimal chain ID, and returns `atomic.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 `atomic` gates.
* [`wallet_grantPermissions`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/wallet_grantPermissions) is gated by the `permissions` capability.
* [Batch transactions](https://www.openfort.io/docs/products/cross-app-wallet/usage/batch-transactions) covers the wagmi equivalent of these calls.
