Built for the Stellar Agent Economy

One interface.
Three payment modes.
Zero hardcoding.

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 enough

3
separate SDKs

to use x402, MPP charge, and MPP session on Stellar

0
discovery layer

for MPP endpoints. Zero. Agents must hardcode every URL.

1
unaudited contract

one-way-channel exists but has no safe integration path

RouteDock solves all three.

The solution

The right payment mode, selected automatically

RouteDock reads the provider's manifest and picks the optimal mode for each access pattern. No configuration. No guessing.

x402

Pay per request

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

MPP Charge

Pay per action

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

MPP Session

Pay per time

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

Three steps. No ceremony.

01

Provider adds middleware + serves routedock.json

One Express middleware call. The SDK validates the manifest at startup. Providers declare their modes, pricing, and payee address once.

02

Agent calls client.pay(url)

The SDK fetches the manifest, picks the optimal mode, and pays. For sustained access, openSession() manages the full channel lifecycle.

03

On-chain settlement — one tx covers everything

A 50-event MPP session produces 2 transactions: open + close. Every settlement is logged with a Stellar transaction hash.

Live demo

It's live on testnet right now

Every transaction below is a real Stellar testnet settlement.

Live Feed — Testnet

FAQ

Is the one-way-channel contract audited?

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.

Do I need XLM for gas?

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.

What networks are supported?

Stellar testnet and mainnet. Switch via a single STELLAR_NETWORK env var. The SDK, providers, and agent all respect the same flag.

How does endpoint discovery work?

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.