getETAIntoATAWithdrawerFunction
Import:@umbra-privacy/sdk/withdrawal
Deps
All fields are optional.accountInfoProvider?: AccountInfoProviderFunction.getLatestBlockhash?: GetLatestBlockhash.transactionForwarder?: TransactionForwarder.
Returns
destinationAddress: Address— wallet whose ATA receives the tokens.mint: Address— token mint address.withdrawalAmount: U64— amount in base token units to withdraw from the ETA.
Options (ETAIntoATAWithdrawerOptions)
optionalData— 32-byte caller metadata. Pre-hashed only. Default 32 zero bytes.accountInfoCommitment— per-call commitment for RPC account reads.computationOffset,mpcCallbackDataOffset— PDA offsets. Default to fresh CSPRNG values per call.feeVaultOffset,destinationProgram— observer-forward CPI configuration. Leave at defaults unless you are intentionally routing post-callback into another program.hooks— per-phase lifecycle hooks (onValidationStart,onAccountFetchComplete,queueComputation,onComplete,onError, etc.).
priorityFees, awaitCallback, skipPreflight, maxRetries, or epochInfoCommitment options on the V18 withdrawer.
WithdrawResult
Errors
ThrowsEncryptedWithdrawalError. See Errors.
Example
Dropped-callback recovery
If the handler succeeds but the Arcium callback never lands, tokens stay staged in the pool ATA. Reclaim them withgetStagedSplRecovererFunction / getStagedSolRecovererFunction from @umbra-privacy/sdk/account — synchronous, no MPC, no ZK proof.
EncryptedWithdrawalError
Thrown by the withdrawer factory. Stage values:"initialization" | "validation" | "mint-fetch" | "pda-derivation" | "instruction-build" | "transaction-build" | "transaction-compile" | "transaction-sign" | "transaction-send".
See Errors.