For the complete documentation index, see llms.txt. This page is also available as Markdown.

Request Execution Permissions

wallet_requestExecutionPermissions is the core EIP-7715 method. A DApp/Agent uses it to request authorization from a TokenPocket user. After the user confirms in the wallet UI, it returns a permission response that can be used for subsequent redeem operations.

Prerequisites

  1. Wallet connected (eth_requestAccounts).

  2. It is recommended to call wallet_getSupportedExecutionPermissions first to confirm capabilities.

  3. A Session Account address prepared and set in the to field of the request.

RPC Method

wallet_requestExecutionPermissions

Request Parameters

type PermissionRequest = {
  chainId: `0x${string}` // hex chainId
  from?: `0x${string}` // user's account
  to: `0x${string}` // DApp/Agent Session Account / Delegate address
  permission: {
    type: string
    isAdjustmentAllowed: boolean
    data: Record<string, unknown>
  }
  rules?: {
    type: string
    data: Record<string, unknown>
  }[]
}

// params is PermissionRequest array
params: PermissionRequest[]

Complete Example: Request a Single Authorization

Response Structure

Field
Description

context

Passed to _permissionContexts when redeeming

delegationManager

Target contract for calling redeemDelegations

dependencies

Account deployment dependencies that may need to be handled before redeem; empty means no extra pre-deployment steps are required

The response may contain permission parameters adjusted by the user (when isAdjustmentAllowed: true is set). Do not assume they match the request exactly.

Batch Requests

params supports an array, allowing multiple permissions to be requested at once, but they must share the same chainId:

Cross-chain batch requests will fail.

Field Descriptions

from

  • Source account for authorization (user EOA / smart account).

  • Can be omitted when a single account is connected; the wallet uses the currently active account.

to

  • DApp/Agent Session Account / Delegate address, i.e., the permission recipient.

  • When redeeming with this permission later, this address should be the execution/signing entity.

isAdjustmentAllowed

  • true: Allows the wallet to adjust the authorization scope before the user confirms, such as amount, period, flow rate, expiry, and other fields the wallet supports editing. The DApp/Agent must treat the permission returned by the wallet as authoritative.

  • false: The user cannot adjust permission parameters; suitable when the DApp/Agent requires fixed authorization conditions.

justification

  • Authorization description shown to the user; should clearly describe the purpose.

Amount Fields

Amount fields such as periodAmount, initialAmount, maxAmount, and amountPerSecond use hex-encoded smallest units (RPC quantity):

periodDuration, startTime, and rules[].data.timestamp use plain number values.

Permission Type Quick Reference

Type
Documentation

erc20-token-periodic

ERC-20 periodic

erc20-token-stream

ERC-20 streaming

native-token-periodic

Native token periodic

native-token-stream

Native token streaming

Error Handling

Common failure reasons:

  • Permission type or chain not supported

  • Invalid parameter format (e.g., amountPerSecond is 0)

  • User rejected authorization

  • For stream types, maxAmount < initialAmount

  • Batch request contains multiple chainId values

Steps After Authorization

  1. Save context, delegationManager, and the complete permission data.

  2. Have the Session Account call redeemDelegations

Last updated