Initialize the escrow for one ePN.
Records the note's terms, anchors the ISET public key, and sets the note
Active. Must be authorized by the maker.
[Error::InvalidAmount] if amount <= 0.
fn init(
env: soroban_sdk::Env,
maker: soroban_sdk::Address,
lender: soroban_sdk::Address,
amount: i128,
maturity: u64,
iset_pubkey: soroban_sdk::BytesN<32>,
)
Read the note's terms.
fn terms(env: soroban_sdk::Env) -> Terms
Read the current settlement status.
fn status(env: soroban_sdk::Env) -> Status
Reclaim the note after maturity if it was never settled.
Only the maker may call this, only while the note is Active, and only
once the maturity timestamp has passed. Transitions to Defaulted.
[Error::Unauthorized] if the caller is not the maker;
[Error::NotActive] if the note is not Active;
[Error::NotMatured] if maturity has not yet passed.
fn claim_default(env: soroban_sdk::Env, caller: soroban_sdk::Address)
Endorse and settle the note to the lender.
Only the registered lender may call this, and only while the note is
Active. The iset_signature — ISET's proof that the off-chain legal
endorsement is valid — is recorded in the released event as an audit
anchor. Transitions the note to Released.
[Error::Unauthorized] if the caller is not the lender;
[Error::NotActive] if the note is not Active.
fn release_funds(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
iset_signature: soroban_sdk::BytesN<64>,
)