Get pool stats: (total_deposits, total_settled, pending_owners_count).
fn stats(env: soroban_sdk::Env) -> (i128, i128, u32)
Deposit payment for a service. The amount goes to the pool, credited to the service owner's pending balance.
fn deposit(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
service_owner: soroban_sdk::Address,
amount: i128,
) -> Result<(), PoolError>
Withdraw pending balance for a specific owner. Owner must authorize.
fn withdraw(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
) -> Result
Initialize the pool with an admin and payment token address.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
token: soroban_sdk::Address,
) -> Result<(), PoolError>
Get pending balance for a service owner.
fn pending_for(env: soroban_sdk::Env, owner: soroban_sdk::Address) -> i128
Batch settle all pending balances. Permissionless — anyone can call this. This is the privacy mechanism: multiple deposits settle in one transaction.
fn batch_settle(env: soroban_sdk::Env) -> Result