Constructs an EIP-712 payload for a spend permission and prompts the user to
sign it. Returns a
SpendPermission
object containing the signature and
normalized permission data you can later use to spend or register onchain.Parameters
Smart account that this spend permission applies to.
The spender that can move funds from
account
within the configured limits.Token address. Supports ERC-7528 native token address and ERC-20 contracts.
Chain ID where this permission is valid.
Maximum amount that can be spent during each period (in wei).
Length of each allowance period in days.
Start time when the spend permission becomes valid. Defaults to now.
Time when the spend permission expires. Defaults to never.
Arbitrary salt to differentiate otherwise identical permissions. Hex string.
Defaults to a random value.
Arbitrary data to attach to the permission. Hex string. Defaults to
0x
.EIP-1193 compliant Ethereum provider instance. Get this from
sdk.getProvider()
.Returns
Signed spend permission payload.