Skip to main content
Defined in the Base Account SDK
Returns one or two calls your app’s spender can submit to execute a spend. If the permission is not yet registered onchain, an approveWithSignature call is prepended before the spend call.

Parameters

SpendPermission
required
Signed permission returned from requestSpendPermission or fetched via fetchPermissions.
bigint
Amount to spend (in wei). Omit to spend the remaining allowance.

Returns

Call[]
Array of calls to submit in order.

Error Handling

Always wrap the call in a try-catch block to handle these errors gracefully.
Use getPermissionStatus to check isActive and remainingSpend before preparing a spend.