Contract df6f458a63c7909794b1abb479e62aeacb092aa6b967695c1ace500f9420e381

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CAEDRB37EL3DSO5ZOSI55LHF4GBDSAMTV5QFRYDBHBR6FSVKLUOYLIAL
  • CCY7565XMD6W35RCJC7CYBXTZTUOB5NZA4B77QHD2G4IOJ44NAPDGIEW

Interface

Wire the registry to an admin and a deployed verifier contract.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    verifier: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Whether a commitment is whitelisted. Used by the lending pool.

fn is_eligible(env: soroban_sdk::Env, commitment: soroban_sdk::BytesN<32>) -> bool

Fetch the full identity record, if present.

fn get_identity(
    env: soroban_sdk::Env,
    commitment: soroban_sdk::BytesN<32>,
) -> Option

Admin: rotate the verifier contract address.

fn set_verifier(
    env: soroban_sdk::Env,
    verifier: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Whether a nullifier has already been spent.

fn is_nullifier_used(env: soroban_sdk::Env, nullifier: soroban_sdk::BytesN<32>) -> bool

Register an anonymous identity.

  1. Reject reused nullifiers (anti double-registration).
  2. Ask the verifier contract to validate the ZK proof.
  3. On success, persist the commitment as verified and spend the nullifier.
fn register_identity(
    env: soroban_sdk::Env,
    commitment: soroban_sdk::BytesN<32>,
    nullifier: soroban_sdk::BytesN<32>,
    proof: soroban_sdk::Bytes,
    public_inputs: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶