> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Get Capabilities \[wallet.getCapabilities]

Retrieves capabilities such as paymasters and session keys from a connected wallet, as defined by
[EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).

## Usage

This example gets the capabilities supported by a connected wallet.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const capabilities = await client.wallet.getCapabilities()
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, custom, walletActions } from 'viem'
import 'viem/window'

export const client = Client.create({
  transport: custom(window.ethereum!),
}).extend(walletActions())
```
:::

### Standalone Action

Call `Actions.wallet.getCapabilities` directly by passing the Client as the first argument.

:::code-group
```ts twoslash [example.ts]
import { Actions } from 'viem'
import { client } from './viem.config'

const capabilities = await Actions.wallet.getCapabilities(client)
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, custom } from 'viem'
import 'viem/window'

export const client = Client.create({
  transport: custom(window.ethereum!),
})
```
:::

## Return Value

`{ [chainId: number]: Capabilities }`

The wallet's capabilities, keyed by chain ID. When a `chainId` is provided, the capabilities for that chain are returned directly.

## Parameters

### account

* **Type:** `Account | Address`
* **Default:** `client.account`

The Account (or address) to get capabilities for.

```ts twoslash
import { Actions } from 'viem'
// [!include ~/snippets/docs/reference-client.ts:setup]
// ---cut---
const capabilities = await Actions.wallet.getCapabilities(client, {
  account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', // [!code focus]
})
```

### chainId

* **Type:** `number`

The chain ID to scope capabilities to.

```ts twoslash
import { Actions } from 'viem'
// [!include ~/snippets/docs/reference-client.ts:setup]
// ---cut---
const capabilities = await Actions.wallet.getCapabilities(client, {
  chainId: 1, // [!code focus]
})
```
