Documentation Index
Fetch the complete documentation index at: https://sdk.umbraprivacy.com/llms.txt
Use this file to discover all available pages before exploring further.
getPublicBalanceToEncryptedBalanceDirectDepositorFunction
Import:@umbra-privacy/sdk
GetPublicBalanceToEncryptedBalanceDirectDepositorFunctionArgs
client: IUmbraClient
GetPublicBalanceToEncryptedBalanceDirectDepositorFunctionDeps
accountInfoProvider?: AccountInfoProviderFunctiongetLatestBlockhash?: GetLatestBlockhashtransactionForwarder?: TransactionForwardergetEpochInfo?: GetEpochInfo- Required for Token-2022 transfer fee calculation.
Returns
PublicBalanceToEncryptedBalanceDirectDepositorFunction
destinationAddress: Address- The Umbra-registered recipient.mint: Address- Token mint address.transferAmount: U64- Amount in base token units.
DepositIntoEncryptedBalanceOptions
priorityFees?: U64- Compute unit price in micro-lamports. Default:0n.purpose?: number- Caller-defined purpose tag stored on-chain. Default:0.optionalData?: OptionalData32- 32-byte caller metadata. Default: 32 zero bytes.awaitCallback?: boolean- Whether to wait for the MPC callback. Default:true.skipPreflight?: boolean- Skip Solana preflight simulation. Default:false.maxRetries?: number- Max RPC retry attempts for transaction sending.accountInfoCommitment?: Commitment- Per-call commitment for RPC account reads. Default:"confirmed".epochInfoCommitment?: Commitment- Per-call commitment for epoch info fetches. Default:"confirmed".
DepositResult
queueSignature- Signature of the handler (queue computation) transaction.callbackStatus- The outcome of computation monitoring:"finalized","pruned", or"timed-out". Present whenawaitCallbackistrue.callbackSignature- Signature of the Arcium MPC callback. Present whencallbackStatusis"finalized".callbackElapsedMs- Milliseconds spent waiting for the callback.rentClaimSignature- Signature for reclaiming rent from the computation account. Attempted regardless of callback outcome.rentClaimError- Error from rent reclaim attempt, if any. The deposit itself still succeeded.
Errors
ThrowsEncryptedDepositError. See Errors.
Example
getEncryptedBalanceToSelfClaimableUtxoCreatorFunction
Import:@umbra-privacy/sdk
deps.zkProver is required.
GetCreateSelfClaimableUtxoFromEncryptedBalanceFunctionArgs
client: IUmbraClient
GetCreateSelfClaimableUtxoFromEncryptedBalanceFunctionDeps
zkProver: IZkProverForSelfClaimableUtxo- Required. ZK proof generator for UTXO commitments. UsegetCreateSelfClaimableUtxoFromEncryptedBalanceProverfrom@umbra-privacy/web-zk-prover— see ZK Provers. This operation submits two transactions: a proof account creation followed by the UTXO instruction.blockhashProvider?: GetLatestBlockhashaccountInfoProvider?: AccountInfoProviderFunctiontransactionForwarder?: TransactionForwardergetEpochInfo?: GetEpochInfo- Additional cryptographic dependency overrides (key derivation, Poseidon, AES, commitment generators - all optional, default to SDK implementations).
Returns
CreateSelfClaimableUtxoFromEncryptedBalanceFunction
[proofAccountSignature, utxoCreationSignature].
CreateUtxoArgs
amount: U64- Token amount in base units to lock into the UTXO.destinationAddress: Address- The Umbra-registered owner of the UTXO (must equal the caller for self-claimable).mint: Address- Token mint address.
CreateUtxoOptions
generationIndex?: U256- Override the generation index used for key derivation. Defaults to the on-chain value.optionalData?: OptionalData32- 32-byte caller metadata.createProofAccount?: TransactionCallbacks- Lifecycle hooks for the proof account creation transaction.createUtxo?: TransactionCallbacks- Lifecycle hooks for the UTXO creation transaction.
Errors
ThrowsCreateUtxoError. See Errors.
getEncryptedBalanceToReceiverClaimableUtxoCreatorFunction
Import:@umbra-privacy/sdk
deps.zkProver (required).
GetCreateReceiverClaimableUtxoFromEncryptedBalanceFunctionArgs
client: IUmbraClient
GetCreateReceiverClaimableUtxoFromEncryptedBalanceFunctionDeps
zkProver: IZkProverForReceiverClaimableUtxo- Required. UsegetCreateReceiverClaimableUtxoFromEncryptedBalanceProverfrom@umbra-privacy/web-zk-prover— see ZK Provers.blockhashProvider?: GetLatestBlockhashaccountInfoProvider?: AccountInfoProviderFunctiontransactionForwarder?: TransactionForwardergetEpochInfo?: GetEpochInfo- Additional cryptographic dependency overrides (all optional).
Returns
CreateReceiverClaimableUtxoFromEncryptedBalanceFunction
CreateUtxoArgs and CreateUtxoOptions above.
Errors
ThrowsCreateUtxoError. See Errors.
getPublicBalanceToSelfClaimableUtxoCreatorFunction
Import:@umbra-privacy/sdk
deps.zkProver is required.
GetCreateSelfClaimableUtxoFromPublicBalanceFunctionArgs
client: IUmbraClient
GetCreateSelfClaimableUtxoFromPublicBalanceFunctionDeps
zkProver: ZkProverForSelfClaimableUtxoFromPublicBalance- Required. UsegetCreateSelfClaimableUtxoFromPublicBalanceProverfrom@umbra-privacy/web-zk-prover— see ZK Provers.blockhashProvider?: GetLatestBlockhashaccountInfoProvider?: AccountInfoProviderFunctiontransactionForwarder?: TransactionForwardergetEpochInfo?: GetEpochInfomasterViewingKeyGenerator?: MasterViewingKeyGeneratorFunctionmasterViewingKeyBlindingFactorGenerator?: MasterViewingKeyBlindingFactorGeneratorFunctionposeidonPrivateKeyGenerator?: PoseidonPrivateKeyGeneratorFunctionposeidonBlindingFactorGenerator?: PoseidonBlindingFactorGeneratorFunctionuserAccountX25519KeypairGenerator?: Curve25519KeypairGeneratorFunctionsecondViewingKeyGenerator?: SecondViewingKeyGeneratorFunctionephemeralUtxoMasterViewingKeyGenerator?: EphemeralUtxoMasterViewingKeyGeneratorFunctionephemeralUtxoMasterViewingKeyBlindingFactorGenerator?: EphemeralUtxoMasterViewingKeyBlindingFactorGeneratorFunctionephemeralUtxoPoseidonKeyGenerator?: EphemeralUtxoPoseidonPrivateKeyGeneratorFunctionephemeralUtxoPoseidonKeyBlindingFactorGenerator?: EphemeralUtxoPoseidonPrivateKeyBlindingFactorGeneratorFunctionposeidonKeystreamBlindingFactorGenerator?: PoseidonKeystreamBlindingFactorGeneratorFunctionposeidonHasher?: PoseidonHashFunctionaesEncryptor?: AesEncryptorFunctionuserCommitmentGenerator?: UserCommitmentGeneratorFunctionh2Generator?: H2GeneratorFnskeystreamCommitmentGenerator?: KeystreamCommitmentFunctionposeidonEncryptor?: PoseidonEncryptorFunctionposeidonKeystreamGenerator?: PoseidonKeystreamGeneratorFunctiongetUtcNow?: () => UtcTimestampComponents
Returns
CreateSelfClaimableUtxoFromPublicBalanceFunction
CreateUtxoFromPublicBalanceOptions
generationIndex?: U256optionalData?: OptionalData32createUtxo?: TransactionCallbacks- Lifecycle hooks for the single UTXO creation transaction.
Errors
ThrowsCreateUtxoError. See Errors.
getPublicBalanceToReceiverClaimableUtxoCreatorFunction
Import:@umbra-privacy/sdk
deps.zkProver is required.
GetCreateReceiverClaimableUtxoFromPublicBalanceFunctionArgs
client: IUmbraClient
GetCreateReceiverClaimableUtxoFromPublicBalanceFunctionDeps
zkProver: ZkProverForReceiverClaimableUtxoFromPublicBalance- Required. UsegetCreateReceiverClaimableUtxoFromPublicBalanceProverfrom@umbra-privacy/web-zk-prover— see ZK Provers.blockhashProvider?: GetLatestBlockhashaccountInfoProvider?: AccountInfoProviderFunctiontransactionForwarder?: TransactionForwardergetEpochInfo?: GetEpochInfo- Additional cryptographic dependency overrides (all optional).
Returns
CreateReceiverClaimableUtxoFromPublicBalanceFunction
CreateReceiverClaimableUtxoFromPublicBalanceOptions
generationIndex?: U256optionalData?: OptionalData32createUtxo?: TransactionCallbacks
Errors
ThrowsCreateUtxoError. See Errors.
EncryptedDepositError
Thrown bygetPublicBalanceToEncryptedBalanceDirectDepositorFunction.
Stage values: "initialization" | "validation" | "mint-fetch" | "fee-calculation" | "pda-derivation" | "account-fetch" | "instruction-build" | "transaction-build" | "transaction-compile" | "transaction-sign" | "transaction-validate" | "transaction-send"
See Errors for full documentation.
CreateUtxoError
Thrown by all four UTXO creation functions. Stage values:"initialization" | "validation" | "account-fetch" | "mint-fetch" | "fee-calculation" | "key-derivation" | "zk-proof-generation" | "pda-derivation" | "instruction-build" | "transaction-build" | "transaction-compile" | "transaction-sign" | "transaction-validate" | "transaction-send"
See Errors for full documentation.