Skip to content
On this page

getPermissions

Gets the wallets current permissions.

Usage

ts
import { walletClient } from './client'
 
const permissions = await walletClient.getPermissions() 
ts
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'

export const walletClient = createWalletClient({
  chain: mainnet,
  transport: custom(window.ethereum)
})

Returns

WalletPermission[]

The wallet permissions.

JSON-RPC Methods

wallet_getPermissions

Released under the MIT License.