Stateless API Surface vs Stateful Execution Core
WAproxy exposes a minimal HTTP API surface,
but internally operates as a strictly stateful execution engine.
This separation is intentional.
------------------------------------------------------------
STATELESS API LAYER
------------------------------------------------------------
Each HTTP request is independent.
Endpoints such as:
/v1/<coin>?mode=wallet_send
/v1/<coin>?mode=wallet_balance
/v1/<coin>?mode=wallet_receive
do not rely on client session state.
Authentication is key-based.
Idempotency is request-scoped.
No session memory exists at API layer.
------------------------------------------------------------
STATEFUL EXECUTION CORE
------------------------------------------------------------
Internally, WAproxy maintains:
- wallet balance state
- idempotency records
- transaction history
- confirmation tracking
- atomic execution logs
Execution correctness depends on persistent state.
------------------------------------------------------------
WHY THIS DISTINCTION MATTERS
------------------------------------------------------------
Stateless API layer provides:
- horizontal scalability
- load balancer compatibility
- retry-friendly behavior
- simple integration model
Stateful core provides:
- deterministic execution
- economic integrity
- atomic balance mutation
- replay protection
------------------------------------------------------------
DESIGN RULE
------------------------------------------------------------
The API must remain simple.
The core must remain consistent.
Stateless input.
Stateful correctness.
------------------------------------------------------------
FAILURE HANDLING IMPLICATION
------------------------------------------------------------
If API layer restarts:
- Idempotency must remain valid.
- Balance state must remain correct.
- Broadcast history must persist.
State must never depend on memory-only cache.
------------------------------------------------------------
ARCHITECTURAL STATEMENT
------------------------------------------------------------
WAproxy is stateless at the interface,
but stateful at the execution core.
Deterministic transport requires persistent state discipline.