Skip to main content

Client-Level Defaults

getUmbraClient accepts its own deps object that sets the default for every downstream function. Any function-level deps override takes precedence.

Infrastructure Providers

These appear as optional overrides across virtually every function’s deps type.

accountInfoProvider

Fetches raw on-chain account data. Used by every function that reads on-chain state.
Default: RPC batch fetch via rpcUrl. Override for: unit tests (no live node), custom RPC middleware, account caching, or simulated state.

blockhashProvider / getLatestBlockhash

Returns the latest confirmed blockhash and last valid block height for transaction construction.
Default: RPC call via rpcUrl. Override for: deterministic transaction snapshots in tests, or to fetch from an alternative source.

transactionForwarder

Handles transaction broadcast and confirmation. Used by every function that submits on-chain transactions.
Default: WebSocket-based forwarder using signatureSubscribe for confirmation. Override for Jito bundle submission, priority fee management, dry-run recording in tests, or custom retry logic:

epochInfoProvider

Returns current Solana epoch information. Used for Token-2022 transfer fee schedule selection.
Default: RPC call via rpcUrl.

Master Seed Storage

Controls how the master seed is persisted and derived between sessions. Provided at the client level only.
Default: re-derive from signer.signMessage(UMBRA_MESSAGE_TO_SIGN) on every client construction. No persistence across page loads.
Never persist the master seed in plaintext localStorage / IndexedDB. The seed is equivalent in sensitivity to a private key. Production persistence requires encrypted-at-rest storage keyed by a user-controlled secret (WebAuthn-derived, password-derived via Argon2id, or wallet-signed challenge) and scoped per-wallet (key includes the wallet pubkey). The scaffold defaults to re-derive every session.
See Key Derivation for how the master seed is structured and derived from the wallet signature.