Walos
Getting started

Quickstart

Index your first Sui package and stream typed events in under five minutes.

Prerequisites: Node 18+, a Walos account from the unified login page, and the package id you want to index. Walos replaces direct fullnode event polling with the query gateway, so this guide focuses on the migration path.

1. Create an API key

Sign in to the console and open Indexer → API Keys. Keys are scoped to this project — every key resolves all registered packages and shares the project rate quota. The key is shown once at creation — copy it into WALOS_KEY in your environment.

2. Add your first package

Open Indexer → Packages → Register, paste the Sui package id, and confirm. Walos pulls the on-chain ABI and starts indexing on the next checkpoint; the backfill is queued immediately and the package status movespending → running → done as the indexer catches up from the verified publish checkpoint.

Prefer the CLI? Install @walos/cli, sign in once, and register an already-published package from a terminal:

npm install -g @walos/cli
walos login
walos link 0x1eabed72c53feb3805120a081dc15963c204dc8d \
  --name my-package \
  --network mainnet

3. Query events

Send a GET request to /v1/events on the query gateway. Pages are cursor-based; use meta.nextCursor from the previous response as the after parameter to fetch the next page.

curl -H "x-api-key: $WALOS_KEY" \
  "http://127.0.0.1:3001/v1/events?package=0xYOUR_PACKAGE_ID&limit=10"

4. Stream events

For live feeds use the Server-Sent Events endpoint at /v1/events/stream. Each sui.event message carries the full event JSON; reconnects resume from Last-Event-ID automatically.

# Subscribe with curl
curl -N -H "x-api-key: $WALOS_KEY" \
  "http://127.0.0.1:3001/v1/events/stream?package=0xYOUR_PACKAGE_ID"

# Or in Node.js with the eventsource package (v3+)
import { EventSource } from 'eventsource';

// EventSourceInit only exposes withCredentials and a custom fetch.
// Inject the API key via the fetch hook so it reaches the gateway.
const es = new EventSource('http://127.0.0.1:3001/v1/events/stream?package=0xYOUR_PACKAGE_ID', {
  fetch: (input, init) =>
    fetch(input, {
      ...init,
      headers: { ...init.headers, 'x-api-key': process.env.WALOS_KEY }
    })
});
es.addEventListener('sui.event', (e) => {
  const event = JSON.parse(e.data);
  console.log(event.checkpoint, event.eventType, event.data);
});

See the Streaming guide for limits, browser token exchange, and the full event-type reference.

5. Pagination & filters

Prefer the REST endpoint? Send a GET request to the query gateway. Pages are cursor-based; use meta.nextCursor from the previous response.

# First page
curl -H "x-api-key: YOUR_API_KEY" \
  "http://127.0.0.1:3001/v1/events?package=0xYOUR_PACKAGE_ID&limit=10"

# Next page
curl -H "x-api-key: YOUR_API_KEY" \
  "http://127.0.0.1:3001/v1/events?package=YOUR_PACKAGE_ID&after=CURSOR_VALUE&limit=10"

All filters are optional query string parameters on GET /v1/events.

ParameterDescription
event_typeFilter by Sui event type (e.g., events::OfferMadeEvent<...>)
senderFilter by sender address
fromFilter by timestamp lower bound (ISO 8601)
toFilter by timestamp upper bound (ISO 8601)
afterCursor for pagination (value of meta.nextCursor)
orderasc or desc — sort order by checkpoint (default: desc)
limit1–500 — number of events per page (default: 50)

6. Error codes

The API uses standard HTTP status codes. Error responses include a JSON body with a message field.

StatusMeaning
401Invalid or missing API key
403Package not registered for this project
409Package backfill in progress — try again later
429Daily API quota exceeded

7. What’s next

  • Subscribe via SSE for live event feeds.
  • Wire webhooks for signed delivery to your own endpoints.
  • Browse the docs index for concepts and the API reference.