Contract a93a2825d908a475cf7e6bd337064fd7aca4adba41d03d625541e7c6ce4bab42

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.8#f46e9e0610213bbb72285566f9dd960ff96d03d8
rsver 1.92.0

Instances

  • CBHWV5F4H3HAJZUX3WXRQANKYV5QT63ZLLQKLYZ2FHWGW3BZSH4BT7OV

Interface

Burn an identity NFT permanently (wallet owner only)

fn burn(env: soroban_sdk::Env, wallet: soroban_sdk::Address)

Mint a new soulbound identity NFT (wallet mints own identity)

This is the self-sovereign path - no admin required. Wallet signs the transaction to mint their own identity.

Arguments

  • wallet - The wallet address that will own this identity
  • commitment - The ZK identity commitment (32 bytes)
  • recovery_commitment - Recovery commitment for key rotation
  • channels - Bitmap of configured recovery channels

Events

  • ("mint", wallet) -> (commitment, channels, version)
fn mint(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    commitment: soroban_sdk::BytesN<32>,
    recovery_commitment: soroban_sdk::BytesN<32>,
    channels: u32,
)
fn name(env: soroban_sdk::Env) -> soroban_sdk::Symbol

Rotate identity by burning the old NFT and minting a new version

Only the wallet owner can rotate their identity.

fn rotate(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    new_commitment: soroban_sdk::BytesN<32>,
    new_recovery_commitment: soroban_sdk::BytesN<32>,
    new_channels: u32,
)
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::Symbol
fn transfer(
    env: soroban_sdk::Env,
    _from: soroban_sdk::Address,
    _to: soroban_sdk::Address,
)

Get the current admin address

fn get_admin(env: soroban_sdk::Env) -> Option

Change the admin address (current admin only)

Arguments

  • current_admin - The current admin (must match stored)
  • new_admin - The new admin address

Events

  • ("admin", "set") -> new_admin
fn set_admin(
    env: soroban_sdk::Env,
    current_admin: soroban_sdk::Address,
    new_admin: soroban_sdk::Address,
)

Mint a soulbound identity NFT on behalf of a user (admin only)

Enables gasless onboarding - deployer mints during wallet creation. Admin can ONLY mint, not modify/burn (those require wallet auth).

Arguments

  • admin - The admin address (must match stored admin)
  • wallet - The wallet address that will own this identity
  • commitment - The ZK identity commitment (32 bytes)
  • recovery_commitment - Recovery commitment for key rotation
  • channels - Bitmap of configured recovery channels

Events

  • ("admin_mint", wallet) -> (commitment, recovery_commitment, channels, version)
fn admin_mint(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    wallet: soroban_sdk::Address,
    commitment: soroban_sdk::BytesN<32>,
    recovery_commitment: soroban_sdk::BytesN<32>,
    channels: u32,
)
fn add_channel(env: soroban_sdk::Env, wallet: soroban_sdk::Address, channel: u32)
fn get_version(env: soroban_sdk::Env, wallet: soroban_sdk::Address) -> u32
fn has_channel(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    channel: u32,
) -> bool
fn get_channels(env: soroban_sdk::Env, wallet: soroban_sdk::Address) -> u32
fn get_identity(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
) -> Option
fn has_identity(env: soroban_sdk::Env, wallet: soroban_sdk::Address) -> bool
fn total_supply(env: soroban_sdk::Env) -> u32

Initialize the contract with metadata and admin address

Arguments

  • admin - The admin address that can mint on behalf of users
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
fn get_commitment(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
) -> Option>
fn remove_channel(env: soroban_sdk::Env, wallet: soroban_sdk::Address, channel: u32)

Update channels (wallet owner only)

fn update_channels(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    new_channels: u32,
)

Imports

WebAssembly Text (WAT) ▶