Contract f9593c2adb9c3e841bd40be20bd4623934062d20d75bb3aee50fe86deb365585

← Back to Index 📥 Download WASM

Meta

rssdkver 25.0.2#59a2e01a26f9330f8d516690911cb2ca87a6f1b3
rsver 1.93.1
source_repo lumenbro/escrow-satellite

Instances

  • CAHJSHTNNDPM2GHLTKCMZTQFY6FOZVRVMI2SPMHRGV75FVS7L66QUMEX
  • CAIH6CPTMKJPAALTOKUU6NYXKMT26IZMQW6KOSCVGMWYI4DQFDSTI6Y6
  • CBCWBXJHHPDKMJ5VKDEU4IPTDF4HNICNA7T624PINKJ674SOU6AUTNNY
  • CBJANSQ2MF2VB2RMX27CD3FMLG3EHZJLAJXJ4ZP35ZEPFQ6LDMMOUAXK
  • CBWKST2O2RDXURDMCTUQIU3F4VEPTKRGXBDJCEYWBAJQCWUGK2N46R6G
  • CCDOJYUZPKGGFOE3G5T4EGBSJRC5MTKQT2Z4SOZIDP53KZXTFNMEPMBO
  • CCWNK3SXRXBZGT2QBRJQV6NWLS3WA4QJB6J4P6TRXUXWHJ652AFWPLQZ
  • CDNGRHD6UBMPQNVPB37HRH4DPBHD4OQQJ2SUU57G6OAFGL4R42N7WHHU

Interface

Legacy claim with preimage (for backwards compatibility). Only works for deposits with zk_version = 0.

fn claim(
    env: soroban_sdk::Env,
    preimage: soroban_sdk::Bytes,
    commitment: soroban_sdk::BytesN<32>,
    recipient: soroban_sdk::Address,
)
fn get_vk(env: soroban_sdk::Env) -> Option

Deposit funds with a commitment (ZK-compatible).

The commitment can be:

  • SHA256 hash of preimage (legacy, zk_version=0)
  • Poseidon commitment (ZK, zk_version=1)

V2: Deposits stored in persistent storage with per-deposit TTL. No global cap — each deposit is an independent storage entry.

fn deposit(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    asset: soroban_sdk::Address,
    amount: i128,
    commitment: soroban_sdk::BytesN<32>,
    timeout_ledger: u32,
    zk_version: u32,
)

ZK claim with Groth16-style proof verification. Uses BN254 pairing check for verification (Ethereum-compatible).

The proof demonstrates knowledge of private data that corresponds to the commitment, without revealing the actual data.

fn claim_zk(
    env: soroban_sdk::Env,
    commitment: soroban_sdk::BytesN<32>,
    proof: ZkProof,
    recipient: soroban_sdk::Address,
)
fn get_pending(
    env: soroban_sdk::Env,
    commitment: soroban_sdk::BytesN<32>,
) -> Option
fn is_deployed(env: soroban_sdk::Env) -> bool

Constructor called once at deployment.

Args:

  • owner: The wallet C-address that owns this escrow satellite
  • vk: The BN254 Groth16 verification key for ZK claims
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    vk: VerificationKey,
)

Public reclaim after timeout. Anyone can relay this — funds always return to the original sender.

fn reclaim_expired(env: soroban_sdk::Env, commitment: soroban_sdk::BytesN<32>)
fn get_pending_count(env: soroban_sdk::Env) -> u32

Set/update the verification key for ZK proofs (owner only). Emits a vk_set event for auditability.

fn set_verification_key(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    vk: VerificationKey,
)

Imports

WebAssembly Text (WAT) ▶