requestPermissions
Requests permissions for a wallet.
Usage
ts
import { walletClient } from './client'
const permissions = await walletClient.requestPermissions({ eth_accounts: {} })
import { walletClient } from './client'
const permissions = await walletClient.requestPermissions({ eth_accounts: {} })
ts
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
export const walletClient = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum)
})
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
export const walletClient = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum)
})
Returns
The wallet permissions.