getUserRegistrationFunction
Import:@umbra-privacy/sdk
GetUserRegistrationFunctionArgs
client: IUmbraClient- The configured client.
GetUserRegistrationFunctionDeps
All fields are optional overrides for SDK defaults. RPC overrides:accountInfoProvider?: AccountInfoProviderFunctiongetLatestBlockhash?: GetLatestBlockhashtransactionForwarder?: TransactionForwarder
userAccountX25519KeypairGenerator?: Curve25519KeypairGeneratorFunctionmasterViewingKeyEncryptingX25519KeypairGenerator?: Curve25519KeypairGeneratorFunctionmintX25519KeypairGenerator?: MintX25519KeypairGeneratorFunctionmasterViewingKeyGenerator?: MasterViewingKeyGeneratorFunctionmasterViewingKeyBlindingFactorGenerator?: MasterViewingKeyBlindingFactorGeneratorFunctionposeidonPrivateKeyGenerator?: PoseidonPrivateKeyGeneratorFunctionposeidonBlindingFactorGenerator?: PoseidonBlindingFactorGeneratorFunctionrescueCommitmentBlindingFactorGenerator?: RescueEncryptionCommitmentBlindingFactorGeneratorFunctionrandomFactorGenerator?: RandomFactorForPolynomialCommitmentGeneratorFunction
getRcKeyGenerator?: (privateKey: X25519PrivateKey) => RcKeyGeneratorFunctiongetRcEncryptor?: (privateKey: X25519PrivateKey) => RcEncryptorWithNonceFunctionrescueCommitmentGenerator?: RescueEncryptionCommitmentGeneratorFunction
userCommitmentGenerator?: UserCommitmentGeneratorFunction
fiatShamirChallengeGenerator?: FiatShamirChallengeGeneratorFunctionchallengePowersFunction?: ChallengePowersFunctionpolynomialEvaluator?: PolynomialEvaluatorFunction
poseidonAggregator?: PoseidonAggregatorHashFunctionbn254ModInverter?: ModuleInvFunctioncomputeLimbwiseSumInverse?: (limbs: Base85LimbTuple) => Bn254FieldElement
zkProver?: IZkProverForUserRegistration- ZK proof generator for the anonymous registration step. Required only whenoptions.anonymousistrue. UsegetRegistrationProver()from@umbra-privacy/web-zk-prover— see ZK Provers.
Returns
UserRegistrationFunction
UserRegistrationOptions
confidential?: boolean- Register for confidential (encrypted) token account usage. Default:true.anonymous?: boolean- Register for anonymous (mixer) usage. Requires a ZK proof. Default:true.callbacks?: UserRegistrationCallbacks- Per-transaction lifecycle hooks.optionalData?: OptionalData32- 32-byte caller metadata attached to on-chain instructions.
Errors
ThrowsRegistrationError. See Errors for all stages.
Example
getRotateUserAccountX25519KeyFunction
Import:@umbra-privacy/sdk
args and deps as getUserRegistrationFunction.
Returns a zero-argument function. Call it with no arguments to execute the rotation.
getRotateMvkX25519KeyFunction
Import:@umbra-privacy/sdk
args and deps as getUserRegistrationFunction.
Returns a zero-argument function. Call it with no arguments to execute the rotation.
getUpdateRandomGenerationSeedFunction
Import:@umbra-privacy/sdk
GetUpdateRandomGenerationSeedFunctionArgs
client: IUmbraClient
GetUpdateRandomGenerationSeedFunctionDeps
blockhashProvider?: GetLatestBlockhashtransactionForwarder?: TransactionForwarder
Returns
UpdateRandomGenerationSeedFunction
newSeed: Uint8Array- The 32-byte replacement seed.
getUpdateTokenAccountRandomGenerationSeedFunction
Import:@umbra-privacy/sdk
GetUpdateTokenAccountRandomGenerationSeedFunctionArgs
client: IUmbraClient
GetUpdateTokenAccountRandomGenerationSeedFunctionDeps
blockhashProvider?: GetLatestBlockhashtransactionForwarder?: TransactionForwarder
Returns
UpdateTokenAccountRandomGenerationSeedFunction
mint: Address- The token mint whose account seed to update.newSeed: Uint8Array- The 32-byte replacement seed.
getClaimStagedSolFromPoolFunction
Import:@umbra-privacy/sdk
GetClaimStagedSolFromPoolFunctionArgs
client: IUmbraClient
GetClaimStagedSolFromPoolFunctionDeps
blockhashProvider?: GetLatestBlockhashtransactionForwarder?: TransactionForwarder
Returns
ClaimStagedSolFromPoolFunction
mint: Address- The mint of the failed operation.amount: U64- The SOL amount (in lamports) to recover.destination: Address- The SOL recipient account.
getClaimStagedSplFromPoolFunction
Import:@umbra-privacy/sdk
GetClaimStagedSplFromPoolFunctionArgs
client: IUmbraClient
GetClaimStagedSplFromPoolFunctionDeps
blockhashProvider?: GetLatestBlockhashtransactionForwarder?: TransactionForwarder
Returns
ClaimStagedSplFromPoolFunction
mint: Address- The token mint of the staged SPL tokens.amount: U64- Token amount (in base units) to recover.destinationAta: Address- The associated token account to receive the recovered tokens.
RegistrationError
Thrown bygetUserRegistrationFunction. See Errors.
Stage values: "initialization" | "master-seed-derivation" | "account-fetch" | "key-derivation" | "zk-proof-generation" | "pda-derivation" | "instruction-build" | "transaction-build" | "transaction-compile" | "transaction-sign" | "transaction-validate" | "transaction-send"