Contract 91949be675750faf37b6825409514a055ee18722e5f6d2d8614defe2eb6196d2

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 26.0.0#e1bf74ba6c3ddb591593f5eb5dfb85458ff714c1
rsver 1.95.0

Instances

  • CCJUISYGMTZUMFGOBZI5BTXWR37I6FGE37BCZFVDXNXAK4BFOPAXKI6W

Interface

User locks funds while online. Sets a 24-hour timelock to guarantee the merchant has time to text the receipt.

fn deposit(
    env: soroban_sdk::Env,
    customer: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
)

Customer withdraws remaining funds once the 24-hour escrow window closes.

fn withdraw(
    env: soroban_sdk::Env,
    customer: soroban_sdk::Address,
    token: soroban_sdk::Address,
)

View function for frontend dashboards

fn get_vault(env: soroban_sdk::Env, customer: soroban_sdk::Address) -> i128

The Trusted Gateway (Next.js) submits the offline SMS transaction.

fn spend_offline(
    env: soroban_sdk::Env,
    gateway: soroban_sdk::Address,
    customer: soroban_sdk::Address,
    merchant: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    nonce: soroban_sdk::BytesN<32>,
    expiry_ledger: u32,
)

Imports

WebAssembly Text (WAT) ▶