Initialize once after deploy.
age_verifier — address of the AgeVerifier contract on this network.
fn initialize(
env: soroban_sdk::Env,
age_verifier: soroban_sdk::Address,
admin: soroban_sdk::Address,
treasury: soroban_sdk::Address,
usdc_token: soroban_sdk::Address,
) -> Result<(), SoulboundNftError>
Mint a soulbound identity NFT.
Requirements:
to must have a verified credential in age_verifierto must not already have a token (one per address)tier: 0 = Basic ($10), 1 = Premium ($25), 2 = Rare ($100)avatar_uri: IPFS or HTTPS URI pointing to the avatar imageThe tier fee is forwarded directly to the treasury (same as age_verifier model).
fn mint(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
tier: u32,
avatar_uri: soroban_sdk::String,
) -> Result<(), SoulboundNftError>
Change the avatar URI. Free — no fee charged. Only the token holder can change their own avatar.
fn set_avatar(
env: soroban_sdk::Env,
holder: soroban_sdk::Address,
avatar_uri: soroban_sdk::String,
) -> Result<(), SoulboundNftError>
Burn (revoke) the token. Permanently removes the NFT from the holder. Only the holder can burn their own token.
fn burn(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), SoulboundNftError>
fn token_uri(
env: soroban_sdk::Env,
id: soroban_sdk::Address,
) -> Option
fn token_tier(env: soroban_sdk::Env, id: soroban_sdk::Address) -> Option
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
fn approve(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
amount: i128,
expiration_ledger: u32,
) -> Result<(), SoulboundNftError>
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), SoulboundNftError>
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), SoulboundNftError>
fn burn_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), SoulboundNftError>