Skip to Content
DocsQuickstart

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:

EndpointDescription
GET /v1/events/{id}Full event payload
GET /v1/contractsActive 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 publish

Next steps

Last updated on