Repay outstanding debt for a commitment. from funds the repayment.
fn repay(
env: soroban_sdk::Env,
commitment: soroban_sdk::BytesN<32>,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), soroban_sdk::Error>
fn debt_of(env: soroban_sdk::Env, commitment: soroban_sdk::BytesN<32>) -> i128
Liquidity provider supplies amount of the pool asset.
fn deposit(
env: soroban_sdk::Env,
lender: soroban_sdk::Address,
amount: i128,
) -> Result<(), soroban_sdk::Error>
Admin: upgrade the contract WASM.
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
Liquidity provider withdraws amount of their supplied funds.
fn withdraw(
env: soroban_sdk::Env,
lender: soroban_sdk::Address,
amount: i128,
) -> Result<(), soroban_sdk::Error>
fn pool_info(env: soroban_sdk::Env) -> PoolInfo
fn deposit_of(env: soroban_sdk::Env, lender: soroban_sdk::Address) -> i128
Configure the pool with its asset token and the identity registry.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
token: soroban_sdk::Address,
registry: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
Borrow amount against an anonymous, whitelisted commitment.
The recipient is the wallet that receives funds and must authorize. The
pool checks the commitment's eligibility with the registry; the borrow
must carry a non-empty authorization proof.
fn borrow_with_zk(
env: soroban_sdk::Env,
commitment: soroban_sdk::BytesN<32>,
recipient: soroban_sdk::Address,
amount: i128,
proof: soroban_sdk::Bytes,
public_inputs: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>