Preface
Permissions Standard Pre-draft | Notion
In this document, I am not highlighting how the interface to requesting permission will look like. The standard should be built on top of a ETH JSON RPC like eth_requestPermission defined above can be used or any other standard that we eventually settle on.
The purpose of this doc is to solve only one problems for AA wallets:
For a dapp to create a user operation these three things are necessary:
If a dapp has a way to build the above three things, a dapp with valid permissions will be able to create and send user operations.
eth_requestPermissions
secpk1 | secpr1 . We will have to define all the possible values here. Though wallet can chose to reject this if they don’t support the specific signing method for session key.grantedPermissions - list of granted permissionspermissionsContext - bytes that encode the permissions that have been granted to the Dapp - this is wallet specific information and standard has no limitation on how this is encoded. Use of these bytes:
encodeCallData to help wallet decide how to encode the call data.getHashToSign to help wallet generate a unique reply protection hash that will be signed by the dapp’s session keynonceKey - a valid nonce key valid only for this DappgetNonce
nonceKeynonce a valid nonce valid for the user operationencodeCallData
txns - Array of transactions with to, data, valuepermissionsContext - this can encode info if some module transaction has to be sent and callData can be modified accordingly