Open a one-input/one-output escrow order using the actual post-fee/source-swap amount.
amount is positive source-token base units, argument index 2 excluding Env;
router registration uses amount_arg_index = 2, amount_field = None.
terms supplies the signed destination floor and fixed-point quote multiplier.
The user authorizes these full arguments plus escrow's order-ID commitment and
exact transfer subcalls. Never transfers funds or authorizes on the user's behalf.
Calls escrow open, emits IntentOpened, and returns the canonical order ID.
Any error rolls back the whole transaction, including router fees/source swaps.
Quote/conversion errors from build_order, configuration errors, or
escrow/token/auth failures. Changed realized amounts require new authorization.
The router ignores the return; recover the full order from escrow's Opened event.
fn open(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
token: soroban_sdk::Address,
amount: i128,
terms: IntentTerms,
) -> Result, AdapterError>
Return immutable escrow and chain configuration without user authorization.
Maintains instance/code TTL. Returns NotConfigured when configuration is missing.
The adapter stores no per-order data.
fn get_config(env: soroban_sdk::Env) -> Result
Bind the immutable native escrow, OIF origin chain_id, and Stellar network_id.
No admin or later configuration path exists. AddressType rejects a non-contract
escrow; WrongNetwork rejects a mismatching ledger network. The constructor does
not query escrow's chain configuration: choose matching values or escrow will
reject orders. Stores instance configuration and maintains instance/code TTL.
fn __constructor(
env: soroban_sdk::Env,
escrow: soroban_sdk::Address,
chain_id: soroban_sdk::U256,
network_id: soroban_sdk::BytesN<32>,
) -> Result<(), AdapterError>