Contract 90ea0c2e20538e273c738019a38d9f250f430b10382a5708a17ba325128ef668

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 25.3.0#dcbea44513feb7734af6b6c4aced2c4a7a2715d0
rsver 1.93.1

Instances

  • CDRGECNIO26CHKQFULJ4FS3NUQOZG2QJHPJOR3GM5W7NW5AMJBAYAVQQ

Interface

Initializes the contract with required dependencies.

Can only be called once. Subsequent calls panic.

Arguments

  • admin - Administrator address (must authorize this call).
  • lbx_token - Address of the LBX token contract for fee transfers.
  • distributor - Legacy distributor address retained for compatibility.
  • fee_amount - Per-request tracking fee in LBX base units (i128).
  • vk - BN254 Groth16 verification key (must be 512 bytes).

Examples

// The verifier key length invariant used by init.
let expected_vk_len = 512usize;
assert_eq!(expected_vk_len, 512);
fn init(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    lbx_token: soroban_sdk::Address,
    distributor: soroban_sdk::Address,
    fee_amount: i128,
    vk: soroban_sdk::Bytes,
)

Admin-only function to update the VK if the circuit changes.

The stored admin address must authorize this call.

Arguments

  • new_vk - Replacement verification key (must be exactly 512 bytes).
fn update_vk(env: soroban_sdk::Env, new_vk: soroban_sdk::Bytes)

Admin-only function to set the stealth_signal verification key.

This is additive — it does not modify the existing tracking VK. When set, request_type 3 (Store/stealth) verifies proofs against this VK instead of the default tracking VK.

Arguments

  • stealth_vk - The BN254 verification key for the stealth_signal circuit (512 bytes).
fn set_stealth_vk(env: soroban_sdk::Env, stealth_vk: soroban_sdk::Bytes)

Submits a tracking request.

Transfers the LBX fee from caller split as: 1/3 to satellite, 1/3 to primary, remainder to admin. Verifies the ZK proof then emits the tracking event.

Arguments

  • caller - Address of the Satellite Operator (must authorize).
  • zk_proof - Groth16 proof bytes (A, B, C) — exactly 256 bytes.
  • ephemeral_pubkey- BN254 G1 point (uncompressed X, Y) generated by satellite.
  • ciphertext - Poseidon-encrypted target account (C_low ‖ C_high).
  • satellite - Satellite reward address for fee split.
  • request_type - Request enum (1=Register, 2=Track, 3=Store, 4=InitProfile, 5=AddContact, 6=AcceptContact, 7=PaymentSignal).
  • hostname - Satellite hostname for downstream validation.
  • primary - Primary Lockb0x Node recipient for fee split.

Examples

let valid_request_types = [1u32, 2u32, 3u32, 4u32, 5u32, 6u32, 7u32];
assert!(valid_request_types.contains(&1));
assert!(!valid_request_types.contains(&0));

let proof_le
fn request_tracking(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    zk_proof: soroban_sdk::Bytes,
    ephemeral_pubkey: soroban_sdk::BytesN<64>,
    ciphertext: soroban_sdk::BytesN<64>,
    satellite: soroban_sdk::Address,
    request_type: u32,
    hostname: soroban_sdk::Bytes,
    primary: soroban_sdk::Address,
)

Admin-only identity signaling configuration.

This is additive and does not change the existing request_tracking ABI.

fn set_identity_config(
    env: soroban_sdk::Env,
    identity_vk: soroban_sdk::Bytes,
    identity_fee_amount: i128,
)

Submit an opaque identity signal with replay protection.

The encrypted payload is intentionally opaque on-chain. Identities should not be emitted directly; downstream ingestion resolves private metadata off-chain.

Canonical action map:

  • 1: invite
  • 2: accept
  • 3: reject
  • 4: profile_tag
fn request_identity_signal(
    env: soroban_sdk::Env,
    relayer: soroban_sdk::Address,
    identity_proof: soroban_sdk::Bytes,
    encrypted_payload: soroban_sdk::Bytes,
    action_type: u32,
    nullifier: soroban_sdk::BytesN<32>,
    expires_at_ledger: u32,
    satellite: soroban_sdk::Address,
    hostname: soroban_sdk::Bytes,
    primary: soroban_sdk::Address,
)
fn set_verify_diag_enabled(env: soroban_sdk::Env, enabled: bool)

Imports

WebAssembly Text (WAT) ▶