Skip to main content
type SpendPermissionInput = Omit<SpendPermission, "token" | "period" | "start" | "end" | "salt" | "extraData"> & {
  token:   | "eth"
     | "usdc"
     | EvmAddress;
  period?: number;
  periodInDays?: number;
  start?: Date;
  end?: Date;
  salt?: bigint;
  extraData?: Hex;
};
Dev-friendly input for creating a spend permission.

Type declaration

NameTypeDescription
token| "eth" | "usdc" | EvmAddressToken symbol (“eth”, “usdc”) or contract address.
period?numberTime duration for resetting used allowance on a recurring basis (seconds)
periodInDays?numberTime duration for resetting used allowance on a recurring basis (days) This can be used instead of period to specify a human-friendly value, like periodInDays: 7.
start?DateThe start timestamp for the spend permission. Defaults to now.
end?DateThe end timestamp for the spend permission. Defaults to max uint48 (no expiration).
salt?bigintThe salt for the spend permission. Defaults to random salt.
extraData?HexThe extra data for the spend permission. Defaults to “0x”.