generateOutputsStatement
generateOutputsStatement(
crypto,specs,revealed):Promise<StealthTransferStatement>
Defined in: ootle/src/stealth/wallet-helpers.ts:127
Faucet / public-stealth convenience: build a complete StealthTransferStatement for a transfer that has no stealth inputs (e.g. a faucet minting confidential outputs, or any revealed → stealth transfer that doesn’t need the full StealthTransfer builder).
Generates the outputs statement, derives the matching revealed-input amount as the sum of the stealth output amounts
plus any revealed output amount (∑inputs == ∑outputs), uses a zero (Mask.zero()) input mask, signs the balance
proof, validates the result with crypto.validateTransfer, and returns a ready-to-embed statement (balanceProof
filled). The output mask is non-zero (there is ≥1 stealth output), so the proof is real — not the omitted all-zeros
case.
For multi-step transfers with revealed change / fee, prefer the StealthTransfer builder + WalletStealthAuthorizer; this is the one-shot helper.
Parameters
Section titled “Parameters”crypto
Section titled “crypto”The crypto seam (real WASM or a fake).
Output[]
The stealth outputs to create (must be non-empty).
revealed
Section titled “revealed”RevealedOutput | null
The revealed (un-confidential) output and its receiver (null for fully-stealth).
Returns
Section titled “Returns”Promise<StealthTransferStatement>
A complete transfer statement.
Throws
Section titled “Throws”if specs is empty or any spec fails assertValidOutput.
Throws
Section titled “Throws”if crypto.validateTransfer rejects the built statement (the error is propagated as-is).