Burn an NFT (e.g. when stream is depleted or voided). Only admin (Router) can burn.
fn burn(env: soroban_sdk::Env, token_id: i128)
Mint a new NFT representing a stream. Only the admin (Router) can mint.
fn mint(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
stream_type: StreamType,
stream_id: u64,
token_id: i128,
)
Get token name
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
Get token symbol
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
Get the number of NFTs owned by an address.
fn balance(env: soroban_sdk::Env, owner: soroban_sdk::Address) -> i128
Admin can upgrade the contract logic.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Get the owner of an NFT.
fn owner_of(env: soroban_sdk::Env, token_id: i128) -> soroban_sdk::Address
Transfer an NFT to a new owner.
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
token_id: i128,
)
Initialize the NFT contract with the Router contract address as admin.
Note: admin is the Router contract address, which cannot authorize off-chain transactions.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
)
Get the stream details associated with an NFT.
fn get_stream_data(env: soroban_sdk::Env, token_id: i128) -> (StreamType, u64)