Skip to content

Coinbase Wallet API

wallet_fetchPermissions

A utility API endpoint for recalling permissions previously granted for a specific user. Excludes any permissions that have been revoked or are expired.

Schema

type FetchPermissionsRequest = {
  chainId: string; // uint256, hex formatted
  account: string; // address
  spender: string; // address
  pageOptions?: {
    pageSize number; // number of items requested, defaults to 50
    cursor string; // identifier for where the page should start
  }
}
 
type FetchPermissionsResult = {
  permissions: FetchPermissionsResultItem[];
  pageDescription: {
    pageSize number; // number of items returned
    nextCursor string; // identifier for where the next page should start
  }
}
 
type PageDescription = 
 
type FetchPermissionsResultItem = {
  createdAt: number; // UTC timestamp for when the permission was granted
  permissionHash: string;
  signature: string;
  permission: {
    account: string; // address
    spender: string; // address
    token: string; // address
    allowance: string; // base 10 numeric string
    period: number; // unix time, seconds
    start: number; // unix time, seconds
    end: number; // unix time, seconds
    salt: string; // base 10 numeric string
    extraData: string // hex formatted bytes, i.e. "0x" for empty data
  };
}