Quickstart
Get from zero to a decoded Soroban event in three steps.
1. Set your API key
Use a NaraLabs API key (nl_api_…) for programmatic access:
export NARALABS_API_KEY="nl_api_your_key_here"
export ATLAS_URL="http://localhost:8080"See API Credentials for how keys and publish tokens differ.
2. Decode a raw event
curl -X POST "$ATLAS_URL/v1/decode" \
-H "Authorization: Bearer $NARALABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "testnet",
"contractId": "CBGROPHYFCL5FNTNJF6HXVJEWPLOMHZJ3MNISPTB2JHXLGKQMO2MCWK4",
"topicsJson": [{"symbol":"cntr"},{"symbol":"incr"}],
"valueJson": {"u32": 42}
}'If a matching schema is registered, you get decodeStatus: "decoded" with semantic fields.
3. Query indexed events
List events Naralabs has already indexed and decoded:
curl "$ATLAS_URL/v1/events?network=testnet&decode_status=decoded&page_size=5" \
-H "Authorization: Bearer $NARALABS_API_KEY"Other useful read endpoints:
| Endpoint | Description |
|---|---|
GET /v1/events/{id} | Full event payload |
GET /v1/contracts | Active contracts |
GET /v1/schemas/{contractId} | Published schemas |
Publish schemas (publish token)
Schema publishing uses publish tokens (nl_live_…), not API keys:
cd my-schema
naralabs registry publishNext steps
- Decode Playground: try decoding in the browser (testnet, no API key)
- Decode API: request/response reference
- Atlas API overview: events, contracts, registry
- Decoding & schemas
- Atlas OpenAPI : interactive Scalar docs (local Atlas server)
Last updated on