Settle an upto authorization for actual_amount, which must not exceed the signed ceiling.
The client authorizes (token, to, max_amount, expiration_ledger, nonce). actual_amount
is supplied by the facilitator at settlement and is intentionally outside the signed tuple.
token — SEP-41 token contract, signed by the client.from — the payer, whose authorization is required.to — the recipient, signed by the client so it cannot be redirected.max_amount — the authorized ceiling, signed by the client.expiration_ledger — last ledger at which this authorization is valid, signed.nonce — client-chosen unique value making the authorization single-use, signed.actual_amount — metered charge. NOT signed. Must satisfy 0 <= actual <= max_amount.fn settle(
env: soroban_sdk::Env,
token: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
max_amount: i128,
expiration_ledger: u32,
nonce: soroban_sdk::BytesN<32>,
actual_amount: i128,
hook: Option,
) -> Result<(), soroban_sdk::Error>
Whether a given (payer, nonce) authorization has already been settled.
Lets a facilitator check before submitting, turning a wasted transaction into a fast coded rejection.
fn is_used(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
nonce: soroban_sdk::BytesN<32>,
) -> bool