Burns PT tokens from the designated address.
Strictly restricted to the Tokenizer contract. Called when users redeem their PT for underlying assets at maturity.
from - The address burning the tokens.amount - The amount of tokens to burn.Returns Unauthorized, Paused, InvalidAmount, InsufficientBalance, or MathUnderflow.
fn burn(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovairePtError>
Mints new PT tokens to the designated address.
Strictly restricted to the Tokenizer contract. This ensures PT is only issued when underlying yield-bearing assets are securely locked.
to - The address receiving the minted tokens.amount - The amount of tokens to mint.Returns Unauthorized, Paused, InvalidAmount, or MathOverflow.
fn mint(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovairePtError>
Hardcoded to save storage gas costs.
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
Pauses Tokenizer integrations (mint/burn), freezing core issuance.
fn pause(env: soroban_sdk::Env) -> Result<(), NovairePtError>
Hardcoded to save storage gas costs.
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
Approves a spender to transfer up to amount of the caller's tokens.
from - The token owner (requires auth).spender - The address granted allowance.amount - The maximum amount the spender can transfer.expiration_ledger - Unused parameter to maintain standard token interface compatibility.fn approve(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
amount: i128,
_expiration_ledger: u32,
) -> Result<(), NovairePtError>
Returns the exact balance of a specific user.
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
Unpauses Tokenizer integrations.
fn unpause(env: soroban_sdk::Env) -> Result<(), NovairePtError>
Returns the protocol version.
fn version(env: soroban_sdk::Env) -> u32
Hardcoded to 7 decimals, consistent with Stellar assets.
fn decimals(env: soroban_sdk::Env) -> u32
Returns a comprehensive struct containing the PT Token's configuration and health metadata.
fn metadata(env: soroban_sdk::Env) -> Result
Transfers tokens from the caller to a recipient.
Note: Transfers intentionally bypass the pause mechanism to preserve
secondary market liquidity as an escape valve during protocol emergencies.
from - The caller sending the tokens (requires auth).to - The recipient of the tokens.amount - The amount to transfer.Returns InvalidAmount, InsufficientBalance, MathOverflow, or MathUnderflow.
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovairePtError>
Returns the approved allowance for a spender.
fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
Returns true if issuance/redemption is paused.
fn is_paused(env: soroban_sdk::Env) -> bool
Initializes the Novaire Principal Token (PT).
admin - Protocol administrator responsible for pausing and upgrades.tokenizer - The exclusive authority allowed to mint and burn PT tokens.Returns AlreadyInitialized if called more than once.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
tokenizer: soroban_sdk::Address,
) -> Result<(), NovairePtError>
Accepts a pending admin transfer, finalizing the change of administration.
fn accept_admin(env: soroban_sdk::Env) -> Result<(), NovairePtError>
Returns the total supply of PT tokens in circulation.
fn total_supply(env: soroban_sdk::Env) -> i128
Updates the trusted Tokenizer contract address.
fn set_tokenizer(
env: soroban_sdk::Env,
new_tokenizer: soroban_sdk::Address,
) -> Result<(), NovairePtError>
Transfers tokens from one address to another using an allowance.
spender - The address initiating the transfer (requires auth).from - The owner of the tokens.to - The recipient of the tokens.amount - The amount to transfer.fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovairePtError>
Initiates a two-step admin transfer to a new address.
fn transfer_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), NovairePtError>