The whole chain, already decoded
Write an indexer against every Stacks event since genesis, in one TypeScript file. Run it on Railway, Render, Fly or your own box. We meter the rows it reads.
No schema decisions up front
Filter events by type, contract, sender or recipient before you commit to a table shape.
Finality is in the envelope
Every page reports the tip, the finalized height and any reorg that crossed your cursor.
You can audit the whole set
Coverage, row counts and a digest are published and signed. Checking your copy costs nothing.
Your indexer is one file
consume walks every transfer since sBTC deployed at block 328,228, then keeps following the tip. Kill it mid-backfill and it resumes from the last committed row. No queue, no cron, no cursor table to design.
7backfill first, then the tip
10block sBTC was deployed
13rolled back on a reorg
17rows + checkpoint, one commit
Tables that can't drift
The CLI writes typed tables from the same read contract the API serves. Change the event type and the compiler tells you which column broke.
Ship it where you ship everything else
One Dockerfile, any host that keeps a process running. A health route that tells a long backfill from a stuck loop, and a shutdown that always finishes the batch in flight.
We meter the rows. You own the rest.
We run the decoded index, finality and the signed manifest.
You run the code, the host, the database and the uptime. Filter tighter and the bill drops with the output.
Rows delivered, dropping to $2 per 1M past $50 of monthly spend. Filters cut the bill along with the output.
Plus block headers and every verify, on any account. Reading the index stores nothing, so there is no capacity charge.
Look before you write the loop
The CLI reads the same index with the same filters. Find the shape you want, then move those flags into consume unchanged.
Checking us is free, forever
The canonical set is published as one signed manifest: coverage, counts, a digest and the finality rule. Check your own database against it read-only, as often as you like, and repair only what is broken.
| Dataset | Rows | Share of the set | Coverage |
|---|---|---|---|
| events | 299,680,847 | 0 → 9,266,609 | |
| transactions | 30,154,578 | 0 → 9,266,609 | |
| blocks | 9,266,610 | 0 → 9,266,609 |
Data nobody else decodes
Same rows, same price as any other event. Each one says exactly what it covers.
PoX-5
Stacking prints by signer and cycle. The print log, not a position scoreboard.
sBTC
Deposits in and withdrawals out, each tied to its Bitcoin transaction.
Contract state writes
Every var and map a contract committed, keyed, including contracts that never print.
Runes
Etchings, mints and balances from block 840,000, checked against ord with 0 mismatches.
Thirteen event types, every contract
Scope any of them to one contract, a set of up to twenty, a trait, or the addresses a factory deployed.
They read the same index. The difference is who holds the state.
You hold the cursor
Best when you already run a sink and a supervisor, and want no state on our side.
Streams →We hold the table
Best when the shape is settled and you would rather read a computed table than rebuild it on every boot.
Subgraphs →We hold the retry queue
Best when you want chain events pushed to your server, with failed deliveries logged and requeueable.
Webhooks →Run it yourself
Hosted is api.secondlayer.tools. Point SECONDLAYER_API_URL at your own instance and the same CLI, SDK and /v1 routes answer. Reads over loopback need no key. bootstrap stands a fresh box up from the same signed partitions instead of replaying the chain.
Index questions
How do I know the history is complete?
secondlayer verify checks your own copy against the signed document for free.