Skip to content

@armada/sdk / index / buildPermitTypedData

Function: buildPermitTypedData()

buildPermitTypedData(params): PermitTypedData

Defined in: src/tx/gasless-shield.ts:156

Build the EIP-2612 permit typed data for the gasless shield's token pull. The wrapper calls token.permit(owner, spender=wrapper, value=totalAmount, deadline, v,r,s) then transferFrom, so the user signs this permit in addition to the ShieldIntent. The domain is the TOKEN's own EIP-712 domain — pass its name/version (e.g. USDC "USD Coin"/"2") and the nonce from token.nonces(owner). value must be the sum of all shield-note gross values (the wrapper pulls the total).

Parameters

params

token

{ address: `0x${string}`; name: string; version: string; }

token.address

`0x${string}`

token.name

string

token.version

string

chainId

number

owner

`0x${string}`

spender

`0x${string}`

value

bigint

nonce

bigint

deadline

bigint

Returns

PermitTypedData