HAL-08: operator handle to refresh TTL on the router's persistent pointers
(Admin / OfferBook / SettlementEngine). The router has no other writes after
initialize, so without a periodic bump these keys can be archived on a long-lived
deployment and every create_request_bundle would revert until a RestoreFootprint
is performed off-chain. Admin-gated against the construction-bound admin.
fn bump_ttl(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), ProtocolError>
fn initialize(
env: soroban_sdk::Env,
offer_book: soroban_sdk::Address,
settlement_engine: soroban_sdk::Address,
) -> Result<(), ProtocolError>
One-shot configuration. Writes the offer_book and settlement_engine addresses the router will forward to. The router has no admin-only entrypoints beyond initialization — past these two immutable pointers it is stateless; deploy a fresh instance at a new address to change them.
admin is bound atomically with deployment by __constructor, so the
deploy→configure window an attacker could otherwise front-run does not exist.
initialize only wires the two immutable pointers and is gated on the
construction-bound admin's auth, preventing an attacker from pointing the router
at attacker-controlled offer_book / settlement_engine addresses (which would
otherwise turn every create_request_bundle call into a confused-deputy on
attacker contracts signed under the user's auth root).
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
View: configured offer_book address (or None before initialize).
fn get_offer_book(env: soroban_sdk::Env) -> Option
Atomically create a borrow request, deploy its per-request lending vault, and pledge
the borrower's collateral into the collateral vault — all under a single auth root
signed by creator.
Returns (request_id, vault_address) so callers can reference both new entities
without an extra read. Any failure in any of the three underlying calls aborts the
whole transaction — no partial state is ever persisted across the bundle.
fn create_request_bundle(
env: soroban_sdk::Env,
creator: soroban_sdk::Address,
params: CreateRequestBundleParams,
) -> Result<(u64, soroban_sdk::Address), ProtocolError>
View: configured settlement_engine address (or None before initialize).
fn get_settlement_engine(env: soroban_sdk::Env) -> Option