Skip to main content

wallet_getPermissions

MetaMask

Gets the user's permissions. Introduced by EIP-2255.

Params

(0)

Result

(PermissionsList)
array of:
id
string

The permission ID.

@context
array[string]

When two people communicate with one another, the conversation takes place in a shared environment, typically called 'the context of the conversation.' This shared context allows the individuals to use shortcut terms, such as the first name of a mutual friend, to communicate more quickly without losing accuracy. A context in JSON-LD works the same way: it allows two applications to use shortcut terms to communicate more efficiently without losing accuracy.

invoker
string

A URI of the dapp being granted this permission.

caveats
array[Caveat]

A capability document modifies the caveat property to specify usage restrictions. Capabilities inherit restrictions from the caveat properties of their parent documents and can add new caveats in addition to those inherited from their parents.

type
string

Type of caveat.

value
any

Value of the caveat.

name
string

Name of the caveat.


Request

await window.ethereum.request({
"method": "wallet_getPermissions",
"params": []
});