Umbra SDK Docs

@functions

Standalone helpers for conversions, PDA builders, and randomness.

This section groups every exported function from the Umbra SDK. The docs are auto-synced with the TypeScript source, so the signatures you see here always reflect the latest release.

Conversion helpers

Most functions in this folder convert between branded SDK types and their on-chain representations. Highlights include:

  • convert*ToTransactionInput utilities for every branded scalar, covering time units, numeric widths, hashes, and encrypted payloads.
  • convert*Bytes* helpers for endian-aware serialization.
  • convertLegacyTransactionToVersionedTransaction for mixing legacy and v0 Solana transactions.

PDA & account helpers

  • get*Pda and get*Account helpers derive every program address used by the protocol, including compliance, relayer, and fee accounts.
  • aggregateSha3HashIntoSinglePoseidonRoot explains how commitments are batched before posting proofs on-chain.

Randomness and offsets

  • generateRandom*Offset utilities produce correctly-sized randomness for fees, relayer pools, and encrypted offsets.
  • generateRandomU256 and generateRandomBlindingFactor centralize secure RNG usage so downstream code can rely on vetted primitives.

Use the left navigation or the search box to jump directly to the function you need; every page now includes titles, descriptions, and updated cross-links.