fn root(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
Upgrade the contract's WASM code in place (admin-gated). Keeps the full ASP Merkle tree (frontier, root, leaves) intact.
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
Verify membership: check that the leaf exists in storage. The ZK circuit handles the actual Merkle proof verification off-chain, and the on-chain contract verifies the Groth16 proof that includes the ASP root. This on-chain check is a secondary validation.
fn is_member(env: soroban_sdk::Env, leaf: soroban_sdk::BytesN<32>) -> bool
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn leaf_count(env: soroban_sdk::Env) -> u32
Insert an approved leaf into the ASP Merkle tree (admin-gated). Uses frontier-based insertion identical to VayylPool's Merkle tree.
fn insert_leaf(
env: soroban_sdk::Env,
leaf: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
True if root is the current ASP root or any root still inside the
historical-roots window. The pool calls this to bind a deposit's caller-
supplied asp_root to a trusted root, accepting recent roots so in-flight
deposits survive concurrent ASP-set updates.
fn is_known_root(env: soroban_sdk::Env, root: soroban_sdk::BytesN<32>) -> bool
Get the leaf index for a given leaf
fn get_leaf_index(
env: soroban_sdk::Env,
leaf: soroban_sdk::BytesN<32>,
) -> Result