Overview
IUmbraClient is the entry point to the SDK. It is a plain configuration object (not a class) that holds your wallet, network settings, and all pre-constructed Solana infrastructure providers.
You create one client at startup and pass it to every service factory function throughout your application.
getUmbraClientFromSigner
getUmbraClientFromSigner is async. It returns a Promise<IUmbraClient>. By default the wallet is prompted to sign the master seed derivation message at construction time - the client resolves only after the seed is cached. Pass deferMasterSeedSignature: true to defer this prompt until the first operation that needs key material instead - see Master Seed Derivation below.
Required Arguments
Your wallet signer. Must implement
signTransaction, signTransactions, signMessage, and expose an address property. See Wallet Adapters.The Solana network to connect to. Determines which program addresses and Arcium cluster endpoints are used.
HTTP endpoint for your Solana JSON-RPC node. Used to fetch account data, submit transactions, and query blockhashes.
WebSocket endpoint for the same RPC node. Used by the transaction forwarder to subscribe to signature confirmations instead of polling.
Base URL for the Umbra indexer. Required for UTXO discovery and Merkle proof generation when using the mixer. Omit if you are only using encrypted balances (deposit/withdraw) and not the mixer.
Transaction confirmation level.
"confirmed" is recommended for most applications. Use "finalized" if you need absolute finality before proceeding.Controls when the wallet is prompted to sign the master seed derivation message.
false(default) - eager derivation.getUmbraClientFromSignerawaits the wallet signature before resolving. The seed is cached before the function returns. Use this to surface the prompt at a predictable point in your onboarding flow (e.g., immediately after the user clicks “Connect Wallet”).true- lazy derivation. The client is constructed instantly with no wallet prompt. The prompt fires on the first operation that needs cryptographic key material (typicallyregister()).
U512 key rotation offsets. All default to
0n. Increment a specific offset to rotate that key without changing your wallet. See the Key Derivation guide for details.Available keys: masterViewingKey, poseidonPrivateKey, x25519UserAccountPrivateKey, x25519MasterViewingKeyEncryptingPrivateKey, mintX25519PrivateKey, rescueCommitmentBlindingFactor, randomCommitmentFactor.Optional Dependency Overrides
The second argument,deps, lets you override individual infrastructure providers. This is primarily used for testing - you can inject mocks without a live RPC node or wallet.
Override the function used to fetch on-chain account data. Defaults to an RPC-based implementation constructed from
rpcUrl.Override the function used to fetch the latest blockhash for transaction lifetime. Defaults to an RPC-based implementation.
Override how transactions are broadcast and confirmed. Defaults to a WebSocket-based forwarder. Swap this out to use Jito bundles or a custom priority fee strategy.
Override the epoch info provider used for Token-2022 transfer fee calculations. Defaults to an RPC-based implementation.
Custom persistence for the master seed. Defaults to in-memory storage (lost on reload). Override
load, store, and generate to persist the seed in secure storage. See Wallet Adapters - Persisting the Master Seed.What the Client Stores
Once constructed, the client exposes these properties (read-only):client.signer- your wallet signerclient.network-"mainnet"|"devnet"|"localnet"client.networkConfig- resolved program addresses and cluster configclient.accountInfoProvider- pre-built RPC account fetcherclient.blockhashProvider- pre-built blockhash fetcherclient.transactionForwarder- pre-built transaction broadcasterclient.epochInfoProvider- pre-built epoch info providerclient.masterSeed.getMasterSeed()- async function that derives (and caches) the master seed
Master Seed Derivation
The master seed is a 64-byte root secret derived from a deterministic wallet signature. It is the root of Umbra’s key hierarchy - all encryption keys and commitments flow from it.The signer is critical to this process. The master seed is generated by having the signer sign a deterministic message; the resulting signature is passed through KMAC256 to produce the seed. This means the signer’s identity directly determines every derived key - the viewing keys, nullifier keys, X25519 keypairs, and all cryptographic commitments for that wallet.This requirement can be bypassed entirely by overriding
deps.masterSeedStorage.generate with a custom implementation. If you supply your own generate function, the signer’s signMessage is never called for seed derivation - your function is responsible for returning the master seed. In that case the signer is still used only for transaction signing. See Understanding the SDK for details.Eager mode (default)
WithdeferMasterSeedSignature: false (the default), the wallet prompt fires at getUmbraClientFromSigner call time. The seed is cached before the function resolves. All subsequent operations use the cached seed with no further prompts.
Lazy mode
WithdeferMasterSeedSignature: true, the client is constructed instantly with no wallet prompt. The seed is derived on demand - the first time any operation needs cryptographic key material. For most users, this happens during register().