Pull native XLM from the payer through the configured native XLM SAC.
fn pay(env: soroban_sdk::Env, invoice_id: u64) -> Result<(), soroban_sdk::Error>
fn admin(env: soroban_sdk::Env) -> Result
fn cancel(env: soroban_sdk::Env, invoice_id: u64) -> Result<(), soroban_sdk::Error>
A payer may recover a paid invoice before it is settled to the school.
fn refund(env: soroban_sdk::Env, invoice_id: u64) -> Result<(), soroban_sdk::Error>
native_xlm_sac is the official native-XLM SAC address for the target network.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
native_xlm_sac: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn get_invoice(
env: soroban_sdk::Env,
invoice_id: u64,
) -> Result
The admin confirms the external school/anchor settlement and releases the held XLM to the school in the same invocation.
fn mark_settled(
env: soroban_sdk::Env,
invoice_id: u64,
) -> Result<(), soroban_sdk::Error>
The school creates an invoice for a payer. The contract only accepts
native XLM SAC transfers in pay.
fn create_invoice(
env: soroban_sdk::Env,
invoice_id: u64,
payer: soroban_sdk::Address,
school: soroban_sdk::Address,
amount: i128,
due_ledger: u32,
) -> Result<(), soroban_sdk::Error>
fn native_xlm_sac(
env: soroban_sdk::Env,
) -> Result