docs: add an Archive Node API integration guide - #1222
Open
dkijania wants to merge 1 commit into
Open
Conversation
The Archive Node API is how o1js, zkApps, explorers and indexers read Mina's history, and it had no page here. It was mentioned only in passing from three zkApp pages, none of which say how to run it, what it serves, or how to reach it from a language other than TypeScript. Adds it to Data and History, next to Rosetta: both read the same archive database, and the pair is the whole answer to "how do I get Mina's history over a network". The section index now routes between them instead of listing Rosetta alone. The page is organized around what an integrator decides, in order: which data path fits the job, how to stand the service up, what the five root fields return, how o1js reaches it, the client SDKs for TypeScript, Rust and Go, and what to set before exposing it. Two configuration defaults get their own callouts because both fail quietly: the rate limiter stays disabled until TRUST_PROXY is set, and a browser front end cannot call the API until its origin is allowlisted in CORS_ORIGIN. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012LtdRKTkaKRAuTkEEpgPcc
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The Archive Node API is how o1js, zkApps, explorers and indexers read Mina's history, and it has no page on the docs site. Today it appears only in passing from three zkApp pages — none of which says how to run it, what it serves, or how to reach it from a language other than TypeScript. Anyone integrating has to read the repository.
This adds it to Data and History, beside Rosetta. That section already exists to answer "how do I get Mina's history over a network", and until now it answered with Rosetta alone. Both services read the same archive database; the pair is the complete answer, so the section index now routes between them rather than listing one.
The page
Organized around what an integrator decides, in the order they decide it:
curlthat proves it is serving.eventsandactionsexamples. The actions example folds from a checkpoint, which is the o1js reducer path.archiveproperty, linking through to the existing Fetch Events and Actions page.SIGTERM.Two defaults get
:::cautioncallouts because both fail quietly rather than loudly:TRUST_PROXYis set, because neither socket-keying nor blindX-Forwarded-Fortrust is safe to assume.CORS_ORIGIN.Accuracy
Every code sample was checked against the source rather than written from memory: the Rust builder chain (
EventFilterOptionsInput::for_address(..).status(..)), the Go package name and option functions (archive.NewClient(archive.WithGraphQLURI(..))), the TypeScript constructor, theghcr.io/o1-labs/archive-node-apiimage path, and thedownload_db.shCompose flow. Defaults in the configuration tables come from the repository's setup guide. The install snippets deliberately pin no versions, so they stay correct across releases.Testing
npm run build— succeeds.onBrokenLinksisthrow, so every internal link on the new page resolves; the page renders tobuild/node-operators/data-and-history/archive-node-api.html./network-upgrades/mesa/glossary.static/llms-full.txtandstatic/llms.txtregenerated, as theCheck llms-full.txt is up to dateworkflow requires. The diff is additive — the new page only.🤖 Generated with Claude Code
https://claude.ai/code/session_012LtdRKTkaKRAuTkEEpgPcc