Skip to content

Rewrite Rosetta samples as wrappers over mina-repo examples#1201

Draft
dkijania wants to merge 1 commit into
mainfrom
dkijania/rosetta-integration-guide
Draft

Rewrite Rosetta samples as wrappers over mina-repo examples#1201
dkijania wants to merge 1 commit into
mainfrom
dkijania/rosetta-integration-guide

Conversation

@dkijania
Copy link
Copy Markdown
Member

@dkijania dkijania commented May 7, 2026

Summary

Rewrites the Rosetta Code Samples pages as narrative wrappers over the runnable TypeScript examples being added to the mina repo in MinaProtocol/mina#18833. Same pattern as the docker-compose docs: docs2 owns narrative and Mina-specific knowledge, mina repo owns runnable artifacts.

Why

The current pages (landed in #1192) replaced TypeScript samples with curl + jq. That made the pages shorter but pushed integrators toward fragile shell heredocs for production code. Looking at how comparable chains handle this:

  • Coinbase blesses one JS Rosetta SDK (dfinity/rosetta-client); it was archived August 2025
  • Cardano's official examples use axios + hand-rolled wrappers + their in-tree signer
  • Stacks bundles Rosetta into their main TS API

So the TS path that integrators actually use is exactly what Cardano ships. This PR replicates that approach for Mina by linking each samples page to a runnable script in mina/src/app/rosetta/examples/ts/.

What changed

Page Before After
index.mdx curl shell variable setup Quickstart pointing at runnable examples; explains the SDK gap
scan-blocks.mdx ~50 LOC of curl + jq polling Core loop excerpt + Mina notes (reorgs, confirmations, skipped slots)
track-deposits.mdx ~60 LOC of jq filters Deposit filter excerpt + Mina notes (operation types, account creation fee, memo guidance)
send-transactions.mdx 9 manual curl steps with shell-escaped JSON Full flow using mina-signer.rosettaCombinePayload, plus cold-signing variant pointing at offline-sign.ts
requests.mdx curl-heavy reference Trimmed intro; curl snippets remain for quick exploration

static/llms-full.txt regenerated.

Dependency

Links to runnable examples won't resolve until MinaProtocol/mina#18833 merges into develop. Hence this PR is opened as draft — same workflow as #1175 → mina#18827.

Test plan

  • Local npm start and click through /node-operators/rosetta/samples/* pages
  • After mina#18833 merges, verify all GitHub permalinks resolve
  • Mark ready for review

🤖 Generated with Claude Code

The samples pages now narrate the integration patterns and Mina-specific
spec deltas, with each page linking to the corresponding TypeScript
example in src/app/rosetta/examples/ts/ in the mina repo (PR
MinaProtocol/mina#18833).

Same pattern as the docker-compose docs: docs2 owns narrative and
Mina-specific knowledge, mina repo owns runnable artifacts. Examples
stay in sync with the daemon they target via co-location and CI.

Pages updated:

- index.mdx: explains the SDK situation (no maintained TS Rosetta SDK,
  Cardano/Stacks use the same axios pattern) and points at the
  examples directory for quickstart
- scan-blocks.mdx: 10-line core loop excerpt + Mina notes (reorgs,
  confirmations, skipped slots)
- track-deposits.mdx: deposit filter excerpt + Mina notes (operation
  types, account creation fee, memo guidance)
- send-transactions.mdx: full Construction API flow with mina-signer's
  rosettaCombinePayload helper, plus cold-signing variant
- requests.mdx: trimmed intro to point at runnable scripts; curl
  snippets remain as illustrative quick-exploration tools

Regenerate llms-full.txt accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs2 Error Error May 7, 2026 4:46pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant