Architecture
packages/
types/ Outcome<T> result type + decimal-safe Money
manifest/ Zod schema for a corridor + loader
adapter-kit/ AnchorAdapter port + conformance probes + mock adapter
sep31/ ONE generic adapter (SEP-10 auth + SEP-12 KYC)
stellar/ the ONLY chain-touching package: settlement submitter + SEP-10 signer
router/ RouteResolver seam — open interface + static default
engine/ orchestration: state machine, crash-resume, recovery, audit, metrics
service/ thin HTTP API over the engine (auth + rate limiting)
cli/ validate a manifest; print an offline runnability plan
The five verbs
| Step | Verb | Standard |
|---|---|---|
| 1 | quote | SEP-38 POST /quote |
| 2 | comply | SEP-10 auth + SEP-12 KYC handoff |
| 3 | open | SEP-31 POST /transactions |
| 4 | settle | native Stellar payment of the bridge asset |
| 5 | reconcile | SEP-31 GET /transactions/:id |
A persisted state machine drives created → quoted → compliant → opened → settling → settled → reconciled → completed, with recovering → refunded / held
for failures. Every transition is logged, audited, and counted.