One-time, immutable configuration. No admin/owner is stored — there is deliberately no upgrade or withdrawal path.
fn init(
env: soroban_sdk::Env,
usdc: soroban_sdk::Address,
fee_recipient: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
The USDC asset this splitter settles (immutable).
fn usdc(env: soroban_sdk::Env) -> Result
Settle one payment: transfer the provider share + protocol fee directly from the buyer under their authorization, atomically, in one transaction.
payer.require_auth() binds every routing arg into the buyer's signed
authorization, so the buyer's signature authorizes exactly this split.
A wrong route/total recomputes a different authorization payload and the
host rejects it; a reused authorization fails on the consumed nonce.
fn settle(
env: soroban_sdk::Env,
payer: soroban_sdk::Address,
provider: soroban_sdk::Address,
provider_amount: i128,
fee_amount: i128,
total: i128,
resource_id: soroban_sdk::BytesN<32>,
payment_config_version: u32,
valid_before: u64,
payer_salt: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
The protocol-fee recipient (immutable).
fn fee_recipient(
env: soroban_sdk::Env,
) -> Result