@umbra-privacy/sdk/deposit.
getATAIntoETADirectDepositorFunction
Import:@umbra-privacy/sdk/deposit
Deps
accountInfoProvider?: AccountInfoProviderFunction.getLatestBlockhash?: GetLatestBlockhash.transactionForwarder?: TransactionForwarder.getEpochInfo?: GetEpochInfo— required for Token-2022 transfer-fee calculation.
Returns
Options (ATAIntoETADirectDepositorOptions)
optionalData— 32 bytes of opaque caller metadata. Must be pre-hashed or pre-encrypted. Default 32 zero bytes.accountInfoCommitment— per-call commitment for RPC reads.epochInfoCommitment— per-call commitment for epoch-info fetches (Token-2022 transfer-fee schedule).hooks— per-phase lifecycle hooks. Keys:onValidationStart,onValidationComplete,onMintFetchStart,onMintFetchComplete,onAccountFetchStart,onAccountFetchComplete,onArciumSetupStart,onArciumSetupComplete,onInstructionBuildStart,onInstructionBuildComplete,queueComputation(MpcTransactionStepHooks),onComplete,onError.
priorityFees, awaitCallback, skipPreflight, maxRetries, or purpose options at call time. Priority fees and retry policy are configured at factory time via deps.microLamportsPerAcuPolicy and deps.transactionForwarder.
DepositResult
signatures— every tx signature submitted, in submission order (handler, callback, rent claim).queueSignature— handler (queue computation) signature.callback— present once the callback round-trip completes (always awaited)."finalized"exposes the MPC callbacksignature; other statuses indicate the callback did not land.rentClaim— best-effort.claimed: falsedoes not invalidate the deposit.
Errors
ThrowsEncryptedDepositError. See Errors.
Example
getETAIntoSelfBurnableStealthPoolNoteCreatorFunction
Import:@umbra-privacy/sdk/deposit
deps.zkProver is required — use getETAIntoStealthPoolNoteCreatorProver from @umbra-privacy/sdk/zk-prover.
Returns
CreateStealthPoolNoteArgs
amount: U64— net amount locked into the note (pre-fee).destinationAddress: Address— unlocker address (must equal the caller for self-burnable).mint: Address— token mint address.
CreateStealthPoolNoteOptions (ETA-source)
generationIndex?: U256— deterministic generation index. Default: randomU256. Pass the same value on retry to allow the pipeline’scloseProofAccountstep to reclaim a proof-account orphan from a prior failed attempt.optionalData?: OptionalData32— caller metadata. Pre-hashed only. Default 32 zero bytes.accountInfoCommitment?: Commitment— per-call RPC commitment. Default"confirmed".
deps.hooks: ETAIntoStealthPoolNoteCreatorHooks, not on the per-call options object.)
Errors
ThrowsCreateUtxoError. See Errors.
getETAIntoReceiverBurnableStealthPoolNoteCreatorFunction
Import:@umbra-privacy/sdk/deposit
Same shape as the self variant. deps.zkProver is IZkProverForETAIntoStealthPoolNote — use getETAIntoStealthPoolNoteCreatorProver from @umbra-privacy/sdk/zk-prover.
Recipient prerequisite: must have all three registration sub-step flags (isInitialised, isUserAccountX25519KeyRegistered, isUserCommitmentRegistered). Pre-check with getUserAccountQuerierFunction from @umbra-privacy/sdk/query before calling — fall back to the self-burnable creator if the recipient is not ready.
getATAIntoSelfBurnableStealthPoolNoteCreatorFunction
Import:@umbra-privacy/sdk/deposit
deps.zkProver is required — use getATAIntoStealthPoolNoteCreatorProver from @umbra-privacy/sdk/zk-prover.
Returns
ATAIntoStealthPoolNoteCreatorOptions (ATA-source)
generationIndex?: U256.optionalData?: OptionalData32.accountInfoCommitment?: Commitment— default"confirmed".epochInfoCommitment?: Commitment— default"confirmed".hooks?: ATAIntoStealthPoolNoteCreatorHooks— per-phase + per-step lifecycle hooks. Step slot names:closeProofAccount,populateProofAccount,createStealthPoolNote— eachSkippableDirectTransactionStepHookswith{ onPreSend, onPostSend, onSkipped }.
Errors
ThrowsCreateUtxoError. See Errors.
getATAIntoReceiverBurnableStealthPoolNoteCreatorFunction
Import:@umbra-privacy/sdk/deposit
Same shape as the self-ATA variant. deps.zkProver is IZkProverForATAIntoStealthPoolNote — use getATAIntoStealthPoolNoteCreatorProver from @umbra-privacy/sdk/zk-prover.
Recipient prerequisite: must have all three registration sub-step flags. Pre-check and fall back to self-burnable when needed.
EncryptedDepositError
Thrown by the ATA→ETA depositor. 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.
CreateUtxoError
Thrown by all four Stealth Pool Note creators. 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.