getCapabilities
Extract capabilities (grouped by chain ID) that a connected wallet supports (e.g. paymasters, session keys, etc).
Usage
example.ts
import { account, walletClient } from './config'
const capabilities = await walletClient.getCapabilities({
account,
})
{ 8453: { paymasterService: { supported: true, }, sessionKeys: { supported: true, }, }, 84532: { paymasterService: { supported: true, }, }, }
Account Hoisting
If you do not wish to pass an account
to every getCapabilities
, you can also hoist the Account on the Wallet Client (see config.ts
).
example.ts
import { walletClient } from './config'
const capabilities = await walletClient.getCapabilities()
Returns
WalletCapabilities
Capabilities of the wallet.
Parameters
account
- Type:
Address
The account to get capabilities for.
example.ts
const capabilities = await walletClient.getCapabilities({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
})