@umbra-privacy/sdk. Pages are organized by feature area - each section documents factory functions alongside their parameter types, result types, and associated errors.
Import Paths
@umbra-privacy/sdk-getUmbraClientFromSigner, all service factory functions, cryptographic primitives@umbra-privacy/sdk/errors- All error classes, type guards, and stage union types@umbra-privacy/sdk/types- Branded primitive types and assertion functions@umbra-privacy/sdk/interfaces- TypeScript function type definitions@umbra-privacy/sdk/utils- Converter utilities, PDA derivation helpers, address utilities@umbra-privacy/sdk/constants- Network configs, program constants, domain separators
Factory Function Pattern
Every SDK operation follows the same two-step pattern:getOperationFunction) captures configuration and optional dependency overrides. The returned function is what you call per-operation. The optional deps argument accepts injectable overrides for RPC providers, key generators, and ZK provers - 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 (stringbranded).TransactionSignature- Base58-encoded transaction signature string.U64- Brandedbigintconstrained to unsigned 64-bit range.U128- Brandedbigintfor unsigned 128-bit values.U256- Brandedbigintfor unsigned 256-bit values.U512- Brandedbigintfor unsigned 512-bit values.X25519PublicKey- 32-byteUint8ArrayDiffie-Hellman public key.RcEncryptionNonce- Rescue cipher encryption nonce (brandedUint8Array).OptionalData32- 32-byteUint8Arrayfor caller-defined metadata attached to on-chain instructions. Defaults to 32 zero bytes when omitted.TransactionCallbacks-{ pre?: (tx: CompiledTransaction) => Promise<void>; post?: (tx: CompiledTransaction, sig: TransactionSignature) => Promise<void> }. Hooks invoked before signing and after confirmation.IUmbraClient- The client configuration object produced bygetUmbraClientFromSigner. Passed to every factory function asargs.client.Network-"mainnet" | "devnet" | "localnet".
Pages in This Reference
- Client -
getUmbraClientFromSigner,IUmbraClient,IUmbraSigner - Registration - User registration, key rotation, seed updates, staged fund recovery
- Deposit - Direct deposit, self-claimable and receiver-claimable UTXO creation
- Withdrawal - Direct withdrawal from encrypted balance to public balance
- Query - User account and encrypted balance queries
- Conversion - Convert to shared encryption, rotate per-mint X25519 key
- Mixer - Fetch claimable UTXOs, claim into encrypted or public balance
- Compliance - Compliance grants, re-encryption operations
- Errors - All error classes, stage enums, type guards, and the error hierarchy