Skip to content

Add interactive RPC playground - #12

Open
ibutterbot wants to merge 6 commits into
Chia-Network:mainfrom
ibutterbot:playground-phase1
Open

ibutterbot wants to merge 6 commits into
Chia-Network:mainfrom
ibutterbot:playground-phase1

Conversation

@ibutterbot

@ibutterbot ibutterbot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Phase 1 of the interactive RPC playground (blind review section 21). Zero-install, browser-based tool for executing Chia RPC calls against Coinset's public nodes.

Features:

  • All RPC methods with real mainnet examples organized by category
  • Network toggle (mainnet/testnet11)
  • Utility tools: address encode/decode (bech32m), coin ID computation
  • Client-side rate limiting (1s between requests)
  • CORS fallback with curl command generation
  • Response truncation at 100KB
  • Copy response and 'Show as curl' buttons
  • Dark theme with Chia brand colors
  • Mobile-responsive layout

Static site — no backend needed.


Note

Low Risk
Static read-only UI calling public Coinset APIs; CI only adds live smoke checks and doc/index updates with no auth or server-side changes.

Overview
Adds a zero-install interactive RPC playground (playground/) so developers can run Coinset Chia RPCs from the browser against mainnet or testnet11, with no install or keys.

Explore mode catalogs RPC methods (with real example params), editable JSON, rate limiting, response truncation, copy/curl helpers, and CORS fallbacks. Walkthroughs guide multi-step flows (balance, coin lineage, blocks, coin ID verification) mixing live RPCs, local utilities, and computed summaries. Client-side helpers cover bech32m address encode/decode and coin ID (SHA-256) computation.

CI gains playground-examples-check, which hits Coinset with the same sample calls used in the catalog so examples stay valid. README, EVALUATION, llms.txt, and regenerated llms-full.txt now point at the playground and describe read-only chain queries as seconds instead of minutes.

Reviewed by Cursor Bugbot for commit b3def25. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread playground/index.html Resolved
Comment thread playground/index.html Resolved
Comment thread playground/index.html Resolved
Comment thread playground/index.html Resolved
Butter Bot and others added 2 commits November 2, 2026 07:57
- get_fee_estimate: add required cost param to example
- showCurl: always rebuild from current form state
- coin ID amount: use text input to preserve BigInt precision
- hexToBytes/puzzleHashToAddress: validate hex chars
Four interactive step-by-step walkthroughs:

1. Check a Balance — decode address, find unspent coins, sum balance
2. Trace a Coin's History — follow parent chain through 3 levels
3. Explore a Block — get blockchain state, block record, coin movements
4. Verify a Coin ID — fetch coin, recompute SHA256, compare

Each walkthrough uses real mainnet data from blocks around height
8,999,000. Steps are declarative (JSON-driven engine), so adding new
walkthroughs requires no UI code changes.

UI additions:
- Explore/Walkthroughs mode toggle in header
- Walkthrough picker with card-based selection
- Vertical stepper showing step progress
- Context banner explaining each step
- Summary cards with computed results (balances, lineage tables,
  block summaries, verification results)
- Navigation (previous/next) between steps

All existing explore-mode functionality preserved.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread playground/index.html Resolved
Comment thread playground/index.html Resolved
Comment thread playground/index.html Resolved
Comment thread playground/index.html Resolved
1. Coin verification uses dynamic ID from step 1 input instead of
   hardcoded hash — works correctly when user edits the lookup coin.

2. Compute summaries (HTML) render properly on revisit via stepper
   navigation — track which step results are HTML vs plain text.

3. Rate limit countdown targets the correct element in walkthrough
   mode (wt-countdown) instead of the hidden explore-mode countdown.

4. Walkthrough RPC steps show curl fallback on CORS/fetch failure,
   matching the explore-mode behavior.
@danieljperry

Copy link
Copy Markdown
Member

bugbot review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread playground/index.html Resolved
Prevents Copy button from returning stale data from a previous step
when the current RPC step failed with a CORS/fetch error.
@danieljperry

Copy link
Copy Markdown
Member

bugbot review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Split playground/index.html (1,194 lines) into separate files:
- style.css (113 lines) — all CSS
- utils.js (161 lines) — bech32m, SHA256 coin ID, hex helpers
- rpc-catalog.js (173 lines) — METHODS + WALKTHROUGHS data
- app.js (618 lines) — DOM wiring, RPC execution, walkthrough engine
- index.html (130 lines) — HTML shell only

No build step — vanilla script tags in load order.

Documentation updates:
- README: add 'Try RPC calls in the browser' to routing table
- llms.txt: add Interactive Playground to Agent Resources
- EVALUATION.md: update 'Query the chain' from Minutes to Seconds
- llms-full.txt: regenerated

CI: add playground-examples-check job that verifies example coin
IDs and block heights still resolve against Coinset API.
@danieljperry

Copy link
Copy Markdown
Member

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b3def25. Configure here.

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.

2 participants