getUserRegistrationFunction
Import:@umbra-privacy/sdk/registration
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 sub-step. Required only whenoptions.anonymousistrue. UsegetUserRegistrationProver()from@umbra-privacy/sdk/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.hooks?: RegistrationHooks- Per-step lifecycle hooks. Slots:initUserAccount,registerX25519PublicKey,registerAnonymousUsage(eachSkippableDirectTransactionStepHooksorSkippableMpcTransactionStepHooks), plus top-levelonValidationStart/Complete,onAccountFetchStart/Complete,onKeyDerivationStart/Complete,onComplete,onError.optionalData?: OptionalData32- 32-byte caller metadata attached to on-chain instructions.
Errors
ThrowsRegistrationError. See Errors for all stages.
Example
getUserEncryptionKeyRotatorFunction
Import:@umbra-privacy/sdk/account
args / deps as getUserRegistrationFunction.
Returns a zero-argument function. Call it with no arguments to execute the rotation.
getMasterViewingKeyRotatorFunction
Import:@umbra-privacy/sdk/account
args / deps shape as getUserRegistrationFunction.
Returns a zero-argument function. Call it with no arguments to execute the rotation.
getUserEntropySeedRotatorFunction
Import:@umbra-privacy/sdk/account
Deps
accountInfoProvider?: AccountInfoProviderFunction.getLatestBlockhash?: GetLatestBlockhash.transactionForwarder?: TransactionForwarder.
Returns
newSeed: Uint8Array— the 32-byte replacement seed.
getTokenEntropySeedRotatorFunction
Import:@umbra-privacy/sdk/account
Deps
accountInfoProvider?: AccountInfoProviderFunction.getLatestBlockhash?: GetLatestBlockhash.transactionForwarder?: TransactionForwarder.
Returns
mint: Address— the token mint whose account seed to rotate.newSeed: Uint8Array— the 32-byte replacement seed.
getStagedSolRecovererFunction
Import:@umbra-privacy/sdk/account
Deps
accountInfoProvider?: AccountInfoProviderFunction.getLatestBlockhash?: GetLatestBlockhash.transactionForwarder?: TransactionForwarder.
Returns
mint: Address— the mint of the failed operation (typically the wSOL mint).
getStagedSplRecovererFunction
Import:@umbra-privacy/sdk/account
Deps
accountInfoProvider?: AccountInfoProviderFunction.getLatestBlockhash?: GetLatestBlockhash.transactionForwarder?: TransactionForwarder.
Returns
mint: Address— the token mint of the staged SPL 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"