@armada/sdk / index / buildShieldRequest
Function: buildShieldRequest()
buildShieldRequest(
input,shieldPrivateKey,random?):Promise<{shieldRequest:ShieldRequest;random:string; }>
Defined in: src/tx/shield.ts:44
Build a shield request for privacyPool.shield([request], integrator) — a shielded deposit of amount of tokenAddress to shieldedAddress. random (returned) is the note's 16-byte randomness, recoverable by the recipient's viewing key via the shield ECIES bundle.
random (optional, 16-byte hex, no 0x) is normally generated fresh per deposit. Supply it to make the commitment reproducible — for parity vectors and for a consumer running this builder as a differential against another shield implementation: same key + same random → identical preimage (npk/token/value) and shieldKey. The encryptedBundle is NOT reproducible (fresh AES-GCM IV per call); its correctness property is decryptability by the recipient, not byte-equality.
Parameters
input
shieldPrivateKey
Uint8Array
random?
string = ...
Returns
Promise<{ shieldRequest: ShieldRequest; random: string; }>