Skip to content

@armada/sdk / index / buildGaslessShield

Function: buildGaslessShield() ​

buildGaslessShield(input, shieldPrivateKey): Promise<{ shieldRequests: ShieldRequest[]; requestsHash: `0x${string}`; typedData: ShieldIntentTypedData; userRandom: string; feeRandom: string; }>

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

Assemble a gasless shield: the two shield requests (user note + relayer fee note), their bound requestsHash, and the EIP-712 typed data to sign. The caller signs typedData (the intent) and a separate EIP-2612 permit, then submits gaslessShield(params, intentSig, shieldRequests) via the relayer (buildGaslessShieldCalldata). Each note's random is returned too: the relayer needs feeRandom to rebuild its fee note's npk and verify it (verifyShieldFeeNote).

Parameters ​

input ​

GaslessShieldInput

shieldPrivateKey ​

Uint8Array

Returns ​

Promise<{ shieldRequests: ShieldRequest[]; requestsHash: `0x${string}`; typedData: ShieldIntentTypedData; userRandom: string; feeRandom: string; }>