Add a commitment (leaf = Poseidon(secret, nullifier)) and return new root.
fn commit(
env: soroban_sdk::Env,
secret: soroban_sdk::U256,
nullifier: soroban_sdk::U256,
) -> Result
Phase 4: Mark nullifiers as used (withdraw). Caller must have proven ownership off-chain; in production, verify ZK proof here. Recipient is for event/logging; actual payout is off-chain.
fn withdraw(
env: soroban_sdk::Env,
recipient: soroban_sdk::Address,
nullifiers: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>
Get current pool state (root + size).
fn get_state(env: soroban_sdk::Env) -> PoolState
Initialize pool with empty root (Poseidon of zero).
fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address) -> PoolState