Skip to main content
This reference covers the full public API surface of @umbra-privacy/sdk@5.x (V18). Pages are organised by feature area — each section documents factory functions alongside their parameter types, result types, and associated errors.

Main barrel + subpaths

The main @umbra-privacy/sdk barrel re-exports a small, stable surface — getUmbraClient, the four signer factories, the full error hierarchy, the Result<T,E> helpers, and everything from infrastructure/{arcium, indexer, relayer, solana, zk-prover}. Operation factories require named subpath imports.

Factory Function Pattern

Every SDK operation follows the same two-step pattern:
The factory (getOperationFunction) captures configuration and optional dependency overrides. The optional deps argument accepts injectable overrides for RPC providers, key generators, ZK provers, and (for burners) relayer adapters — useful for unit testing or custom infrastructure (e.g. Jito bundles, hardware key storage).

Common Types

Types referenced across all pages:
  • Address — Base58-encoded Solana public key string (string-branded).
  • TransactionSignature — Base58-encoded transaction signature string.
  • U64 — Branded bigint constrained to the unsigned 64-bit range.
  • U128 — Branded bigint for unsigned 128-bit values.
  • U256 — Branded bigint for unsigned 256-bit values.
  • U512 — Branded bigint for unsigned 512-bit values.
  • X25519PublicKey — 32-byte Uint8Array Diffie-Hellman public key.
  • RescueCipherEncryptionNonce — Rescue cipher encryption nonce (branded Uint8Array).
  • OptionalData32 — 32-byte Uint8Array for caller-defined metadata attached to on-chain instructions. Defaults to 32 zero bytes when omitted. Must be pre-hashed or pre-encrypted — never store plaintext identifiers.
  • IUmbraClient — The client configuration object produced by getUmbraClient. Passed to every factory as args.client.
  • Network"mainnet" | "devnet" | "localnet".
  • DecryptedStealthPoolNoteData — A decrypted note returned by the scanner. Passed directly to a burner factory.
  • ScannedStealthPoolNoteResult — The scanner’s return value; four buckets of notes by (kind, source) plus scannedTrees progress.

Pages in this reference

  • ClientgetUmbraClient, IUmbraClient, IUmbraSigner.
  • RegistrationgetUserRegistrationFunction, sub-step executors.
  • Deposit — Direct ATA→ETA deposit + 4 Stealth Pool Note creators.
  • Withdrawal — Direct ETA→ATA withdrawal.
  • Query — User-account and encrypted-balance queriers.
  • Conversion — MXE-only → Shared converter.
  • Stealth Pool (Mixer) — Note scanner + 3 burner factories.
  • Compliance — Grants, re-encryption, viewing-key derivers.
  • Errors — All error classes, stage enums, type guards, and the error hierarchy.