Checking Registration Status
UsegetQueryUserAccountFunction to inspect an account’s current registration state without triggering any transactions:
When to Register
Register once, at account setup time. Check state before callingregister() so you avoid unnecessary transaction prompts for users who are already fully set up:
Registration State Fields
Thedata object returned when result.state === "exists":
isInitialised- the baseEncryptedUserAccountPDA has been created (Step 1 complete).isUserAccountX25519KeyRegistered- the X25519 public key has been stored on-chain (Step 2 complete). Required for confidential deposits.isUserCommitmentRegistered- the Poseidon user commitment has been stored (Step 3 complete). Required for the mixer.isActiveForAnonymousUsage- the account is active and cleared for anonymous usage (both Step 2 and Step 3 complete and valid).x25519PublicKey- the registered X25519 public key bytes, if Step 2 is complete.userCommitment- the registered Poseidon commitment, if Step 3 is complete.generationIndex- monotonic counter used for nonce derivation.randomGenerationSeed- entropy bytes mixed into nonces.
For the full type reference see Query.