Contract 7fb80059088d523730858e6ab8b90c5de8066b4bb369672c87d514cc36e695c2

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 27.0.0#e5cb4b52c3da8e56fc48adfd7b85d85976c1a059
rsver 1.96.0

Instances

  • CBDFHJ2V7YBQGF4PNDPTKAALHIE6PYRBL6PVAGMJA5OFFEUMHJYQLL7O

Interface

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.

Panics

[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.

Panics

[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.

Panics

[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>,
)

Imports

WebAssembly Text (WAT) ▶