Skip to content

WalletActions.revokePermissions

Viem Action for revoking permissions. Uses wallet_revokePermissions under the hood.

Usage

example.ts
import { WalletActions } from 'porto/viem'
import { client } from './config'
 
await WalletActions.revokePermissions(client, { 
  id: '0x...', // Permission ID to revoke 
}) 

Parameters

address

Address | undefined

Address of the account to revoke permissions for. Defaults to the client's account.

feeToken

  • Type: 'native' | Token.Symbol | Address.Address

Token to use to cover fees. Accepts:

  • "native" (Default): The native token of the chain.
  • Symbol: Symbol of the fee token (e.g. "USDC").
  • Address: Address of the fee token (e.g. "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef").

id

string

ID of the permission to revoke.