Retrieves permissions associated with a specific account and chain. If a spender is provided, returns only permissions for that spender. Otherwise, returns all permissions for the account. This method excludes permissions that have expired or been revoked, returning only active spend permissions. Sorted by creation date, oldest first.
Parameters
The entity granted with the permission to spend funds. This is the address whose permissions are being queried.
The ID of the blockchain, in hexadecimal format.
Optional. The address of the account whose permissions are being queried. If not provided, returns all permissions for the spender.
Optional pagination settings for the request.
Returns
The permissions response object.
Error Handling
Code | Message | Description |
---|---|---|
4001 | User rejected the request | User denied the permission request |
4100 | Requested method not supported | The method is not supported by the wallet |
-32602 | Invalid params | Invalid account, chainId, or spender parameters |
Ensure the
chainId
and spender
parameters are correctly formatted and valid for the blockchain you are querying. If provided, the account
parameter must also be a valid address.