x402, MPP charge, and MPP session — unified behind client.pay(url). Your agent discovers the endpoint, selects the mode, and pays.
const client = new RouteDockClient({ wallet, network: 'testnet' })
const result = await client.pay('https://provider.stellar.app/price')
// result.mode → 'x402' | 'mpp-charge' | 'mpp-session'npm install @routedock/routedockRead the Docs →The problem
pay() wasn't enoughto use x402, MPP charge, and MPP session on Stellar
for MPP endpoints. Zero. Agents must hardcode every URL.
one-way-channel exists but has no safe integration path
RouteDock solves all three.
The solution
RouteDock reads the provider's manifest and picks the optimal mode for each access pattern. No configuration. No guessing.
One HTTP call, one on-chain settlement. The provider runs the facilitator in-process on testnet, or routes to OpenZeppelin on mainnet. Ideal for data queries.
~0.001 USDC · 1 settlement per request
Native Stellar SAC transfer. No facilitator needed. Lower fee, faster settlement, fully on-chain with no third-party dependency.
~0.0008 USDC · SAC transfer per call
Deposit once, stream 1000 interactions, settle once. Off-chain vouchers between open and close — 2 transactions, any number of events.
0.0001 USDC/voucher · 2 on-chain txs total
How it works
One Express middleware call. The SDK validates the manifest at startup. Providers declare their modes, pricing, and payee address once.
The SDK fetches the manifest, picks the optimal mode, and pays. For sustained access, openSession() manages the full channel lifecycle.
A 50-event MPP session produces 2 transactions: open + close. Every settlement is logged with a Stellar transaction hash.
Live demo
Every transaction below is a real Stellar testnet settlement.
No. It's stellar-experimental/one-way-channel. RouteDock wraps it with safe defaults and a durable server-side SessionStore that enforces the monotonic-amount invariant. Production use should await an independent audit.
On testnet, the provider runs an in-process facilitator that sponsors x402 fees. On mainnet, the OpenZeppelin facilitator handles it. MPP charge uses server-sponsored paths. Your agent holds only USDC.
Stellar testnet and mainnet. Switch via a single STELLAR_NETWORK env var. The SDK, providers, and agent all respect the same flag.
Providers serve routedock.json at /.well-known/routedock.json. The SDK fetches and validates it before every pay() call (60s TTL cache). The Supabase registry indexes manifests with trigram search so agents can query by capability description.