Initializes the contract with required dependencies.
Can only be called once. Subsequent calls panic.
admin - Administrator address (must authorize this call).lbx_token - Address of the LBX token contract for fee transfers.distributor - Distributor address stored for reference.fee_amount - Per-request tracking fee in LBX base units (i128).vk - BN254 Groth16 verification key (must be 448 bytes).// The verifier key length invariant used by init.
let expected_vk_len = 448usize;
assert_eq!(expected_vk_len, 448);
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.
new_vk - Replacement verification key (must be exactly 448 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.
stealth_vk - The BN254 verification key for the stealth_signal circuit (448 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.
caller - Address of the Satellite Operator (must authorize).zk_proof - Groth16 proof bytes (A, B, C, L) — exactly 320 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).hostname - Satellite hostname for downstream validation.primary - Primary Lockb0x Node recipient for fee split.let valid_request_types = [1u32, 2u32, 3u32, 4u32, 5u32, 6u32];
assert!(valid_request_types.contains(&1));
assert!(!valid_request_types.contains(&0));
let proof_len = 320usize;
assert
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:
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)