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.
SubpathContents
@umbra-privacy/sdkgetUmbraClient, signers, errors, Result<T,E>, indexer + relayer + zk-prover + solana + arcium infra
@umbra-privacy/sdk/clientIUmbraClient, IUmbraSigner interfaces
@umbra-privacy/sdk/sharedUMBRA_MESSAGE_TO_SIGN and protocol-wide constants
@umbra-privacy/sdk/registrationgetUserRegistrationFunction, executors, build helpers
@umbra-privacy/sdk/depositDirect ATA→ETA deposit + 4 Stealth Pool Note creators (ATA/ETA × self/receiver)
@umbra-privacy/sdk/withdrawalETA→ATA withdrawer
@umbra-privacy/sdk/transfergetTransferorFunction — ETA-to-ETA direct transfer, 8 variants
@umbra-privacy/sdk/burnNote scanner + 3 burner factories + enrichWithMerkleProof
@umbra-privacy/sdk/queryEncrypted-balance + user-account queriers
@umbra-privacy/sdk/conversionMXE-only → Shared converter
@umbra-privacy/sdk/complianceGrant issuer / revoker / 3 reencryptors / 3 queriers
@umbra-privacy/sdk/accountStaged-token recoverers, key rotators, maintenance
@umbra-privacy/sdk/zk-proverOne factory per Groth16 circuit
@umbra-privacy/sdk/zk-prover/cdngetCdnZkAssetProvider
@umbra-privacy/sdk/store-adapterscreateBrowserStorageBackend, createFileStorageBackend, sharded + in-memory UTXO + nullifier stores
@umbra-privacy/sdk/storeBase store interfaces
@umbra-privacy/sdk/indexer, …/indexer/utxo, …/indexer/nullifierTyped indexer clients
@umbra-privacy/sdk/errorsError classes + is* type guards
@umbra-privacy/sdk/typesBranded primitives (U64, Address, …) + create* helpers
@umbra-privacy/sdk/constantsBPS_DIVISOR, mint lists, domain separators
@umbra-privacy/sdk/crypto, …/crypto/poseidon, …/crypto/rescue, …/crypto/aes, …/crypto/key-derivation, …/crypto/challenges, …/crypto/commitmentCryptographic primitives
@umbra-privacy/sdk/convertersEncoding / byte-conversion utilities
@umbra-privacy/sdk/arciumArcium MPC types + helpers + generateRandomNonce (also re-exported from main barrel)
@umbra-privacy/sdk/temporal, …/validation, …/hooks, …/pipeline, …/fee-provider, …/mathUtilities
@umbra-privacy/sdk/pda, …/solana, …/tokenSolana / PDA / token helpers
@umbra-privacy/sdk/arciumArcium types + helpers

Factory Function Pattern

Every SDK operation follows the same two-step pattern:
// 1. Build once (at setup time).
const operation = getOperationFunction({ client }, deps?);

// 2. Call per-operation at runtime.
const result = await operation(/* runtime arguments */);
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.