← all adapters

dune-style

simulates Dune Analytics API v1

restadapter v0.1.06 routes

verification

VMVM tier — no SDK suite yet· surface 6 · not implemented 5 · differs 4

use it

# add to stunt.yaml
services:
  dune:
    adapter: embedded:dune-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the Dune Analytics API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Dune Analytics API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Dune Analytics API v1 surface — the data is fake, the behavior is real.

backing stores

executions

api surface (6)

generated from the adapter manifest — exactly what boots, nothing more

6 routes
POST/api/v1/query/{query_id}/execute
POST/api/v1/query/{query_id}/result
GET/api/v1/auth/validate
GET/api/v1/execution/{execution_id}/status
GET/api/v1/execution/{execution_id}/results/csv
GET/api/v1/execution/{execution_id}/results

VM-verified behaviors (7)

  • the api-key gate rejects missing, empty and non-bearer authorization
  • an execution walks PENDING -> EXECUTING -> COMPLETED as the clock advances
  • a missing required parameter is the 400 envelope and both SDK parameter shapes resolve
  • simulate_fail terminates QUERY_STATE_FAILED and results carry the failure envelope
  • the inline-result route completes synchronously
  • results pages honor limit/offset with a followable next_uri
  • the CSV variant streams text/csv for the same page

Not implemented (5)

  • No query management: GET/POST/PATCH/DELETE /api/v1/query endpoints
  • No execution cancel (POST /api/v1/execution/{id}/cancel)
  • No stateless execution endpoint (DuneStateless /stateless/executions)
  • No CSV transfer to external storage (transfers endpoints)
  • No table metadata endpoints (GET /api/v1/table/{namespace}/{table})

Differs from the real API (4)

  • executions follow a fixed clock: EXECUTING at +1s, COMPLETED at +3s after execute
  • queries come from a static 3-entry catalog; no real SQL is executed
  • simulate_fail body flag forces QUERY_STATE_FAILED; real API has no failure trigger
  • Auth is a presence-only Bearer; real Dune uses the x-dune-api-key header
want more of the Dune Analytics API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.