Skip to content

Commit

Permalink
types: wallet_revokePermissions
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed May 9, 2024
1 parent d6ae8fa commit 477ca53
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-stingrays-hide.md
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added `wallet_revokePermissions` to EIP-1193 types.
12 changes: 12 additions & 0 deletions src/types/eip1193.ts
Expand Up @@ -1370,6 +1370,18 @@ export type WalletRpcSchema = [
Parameters: [permissions: { eth_accounts: Record<string, any> }]
ReturnType: WalletPermission[]
},
/**
* @description Revokes the given permissions from the user.
* @link https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-2.md
* @example
* provider.request({ method: 'wallet_revokePermissions', params: [{ eth_accounts: {} }] })
* // => { ... }
*/
{
Method: 'wallet_revokePermissions'
Parameters: [permissions: { eth_accounts: Record<string, any> }]
ReturnType: null
},
/**
* @description Requests the connected wallet to send a batch of calls.
* @link https://eips.ethereum.org/EIPS/eip-5792
Expand Down

0 comments on commit 477ca53

Please sign in to comment.