Initialize the contract with signer public key and metadata.
signer_pub_key - 32-byte Ed25519 public key for voucher verificationfn __constructor(env: soroban_sdk::Env, signer_pub_key: soroban_sdk::BytesN<32>)
Mint an NFT using a signed voucher from the backend.
recipient - Address to receive the NFT (must authorize)nonce - Unique nonce to prevent replay attackssignature - 64-byte Ed25519 signature from backendThe token ID of the newly minted NFT
fn mint_with_voucher(
env: soroban_sdk::Env,
slug: soroban_sdk::String,
name: soroban_sdk::String,
recipient: soroban_sdk::Address,
nonce: u64,
signature: soroban_sdk::BytesN<64>,
) -> u32
Check if a nonce has been used
fn is_nonce_used(
env: soroban_sdk::Env,
nonce: u64,
name: soroban_sdk::String,
slug: soroban_sdk::String,
) -> bool
Get the signer public key
fn get_signer(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
fn balance(env: soroban_sdk::Env, account: soroban_sdk::Address) -> u32
fn owner_of(env: soroban_sdk::Env, token_id: u32) -> soroban_sdk::Address
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
token_id: u32,
)
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
token_id: u32,
)
fn approve(
env: soroban_sdk::Env,
approver: soroban_sdk::Address,
approved: soroban_sdk::Address,
token_id: u32,
live_until_ledger: u32,
)
fn approve_for_all(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
operator: soroban_sdk::Address,
live_until_ledger: u32,
)
fn get_approved(env: soroban_sdk::Env, token_id: u32) -> Option
fn is_approved_for_all(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
operator: soroban_sdk::Address,
) -> bool
fn token_uri(env: soroban_sdk::Env, token_id: u32) -> soroban_sdk::String
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, token_id: u32)
fn burn_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
token_id: u32,
)