Skip to main content

Using the Network

Three ways to consume the Dispatch network: hit the gateway directly, run the local dispatch-proxy, or use the consumer SDK (trustless, signs receipts locally). Who manages on-chain GRT?
  • Gateway — the gateway is the on-chain payer. It maintains its own GRT escrow with each provider. You do not need to deposit GRT yourself; your X-Consumer-Address is used for per-consumer billing and rate-limiting only.
  • dispatch-proxy / Consumer SDK — you are the on-chain payer. You must deposit GRT into PaymentsEscrow before making requests (see Funding the escrow).

Via the Gateway

The gateway handles provider selection and TAP receipt signing. You must include your Ethereum address in every request via the X-Consumer-Address header — it is used for per-consumer billing and rate-limiting. The gateway manages its own on-chain GRT flow; you do not need to fund an escrow account to use the gateway. Live gateway: https://gateway.lodestar-dashboard.com
With ethers.js or viem:
Missing the X-Consumer-Address header returns 402 Payment Required. Routes:
Currently live: Arbitrum One (42161) — Standard and Archive tiers.

dispatch-proxy (drop-in local server)

The easiest way to point any existing app at the Dispatch network without changing application code. Starts a standard JSON-RPC HTTP server on localhost; MetaMask, Viem, Ethers.js, and curl all work against it without modification.
On first run the proxy auto-generates a consumer keypair, saves it to ./consumer.key, and tells you where to fund escrow. No key needed upfront.
Configuration: The proxy handles provider discovery, TAP receipt signing, QoS-scored provider selection, CORS, and JSON-RPC batch requests. On exit (Ctrl+C) it prints a session summary of total requests and GRT spent. Unlike the gateway, the proxy runs locally and signs receipts with your own key — you are the on-chain payer and pay providers directly from your own escrow. See Funding the escrow below.

Consumer SDK

For trustless access — signs receipts locally and talks directly to providers, no gateway in the loop.
The client discovers providers via the subgraph, selects one by QoS score, signs a TAP receipt per request, and tracks latency with an EMA.

Low-level utilities


Funding the escrow

Gateway users skip this section. The gateway manages its own on-chain escrow. If you’re calling https://gateway.lodestar-dashboard.com directly, you do not need to deposit GRT.
If you’re using dispatch-proxy or the consumer SDK, you are the on-chain payer and must deposit GRT into PaymentsEscrow on Arbitrum One before providers will serve your requests.

Via the Lodestar dashboard (easiest)

Go to lodestar-dashboard.com/dispatch. Connect MetaMask, paste your consumer address, and deposit GRT. The dashboard calls depositTo() on the PaymentsEscrow contract so you can fund any address’s escrow directly — the consumer wallet itself needs no ETH or GRT. Useful for funding dispatch-proxy from a separate hot wallet.

Manually (cast / ethers)

Deposits are keyed by (payer, collector, receiver). dispatch-service draws down automatically on each collect() cycle (hourly by default). Providers reject requests from addresses with zero escrow balance (checked on-chain every 30 seconds). Check your balance with: