Called by each of the registered attestors.
Once the 2-of-3 threshold is reached, mint_receivable_token is
called automatically and status moves to Attested.
fn attest(env: soroban_sdk::Env, attestor: soroban_sdk::Address, receivable_id: u128)
fn get_count(env: soroban_sdk::Env) -> u128
Must be called once after deployment.
fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Called by FractionalSale contract when sale closes and exporter is paid.
fn mark_active(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
receivable_id: u128,
)
Called by SettlementEscrow after successful payout.
fn mark_settled(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
receivable_id: u128,
)
Emergency clawback — issuer only.
fn mark_clawback(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
receivable_id: u128,
)
fn get_receivable(env: soroban_sdk::Env, receivable_id: u128) -> Receivable
Exporter submits a purchase order / bill of lading.
doc_hash is the SHA-256 of the uploaded document (computed off-chain).
ipfs_cid is the IPFS content identifier where the file is pinned.
attestors is a Vec of up to 3 addresses (logistics partner, export
council, NBFC) who must attest before minting.
fn register_receivable(
env: soroban_sdk::Env,
exporter: soroban_sdk::Address,
buyer_hash: soroban_sdk::BytesN<32>,
amount_usd_cents: i128,
currency: soroban_sdk::Symbol,
maturity_date: u64,
doc_hash: soroban_sdk::BytesN<32>,
ipfs_cid: soroban_sdk::Bytes,
attestors: soroban_sdk::Vec,
) -> u128