Skip to content

Add complete Chainhooks guide section faithfully migrated from Hiro docs#1855

Draft
huth-stacks wants to merge 1 commit intostacks-network:masterfrom
huth-stacks:feat/chainhooks-guide
Draft

Add complete Chainhooks guide section faithfully migrated from Hiro docs#1855
huth-stacks wants to merge 1 commit intostacks-network:masterfrom
huth-stacks:feat/chainhooks-guide

Conversation

@huth-stacks
Copy link
Collaborator

@huth-stacks huth-stacks commented Mar 24, 2026

Summary

  • Migrates 13 files covering the complete Chainhooks developer guide from Hiro docs
  • All content faithfully preserved from Hiro source - no truncation, no rewording
  • Addresses every content issue identified in the PR Migrate curated Hiro docs into Stacks docs #1847 review

Files Added (13)

Guide Pages

  • docs/build/chainhooks/overview.md - Product overview with v1/v2 context, three management approaches
  • docs/build/chainhooks/quickstart.md - SDK introduction with TypeScript types section restored
  • docs/build/chainhooks/create.md - Registration with "(maximum 200)" UUID limit restored
  • docs/build/chainhooks/fetch.md - Paginated listing and single fetch
  • docs/build/chainhooks/update.md - Updates with anti-pattern example restored
  • docs/build/chainhooks/evaluate.md - Block replay by height or hash
  • docs/build/chainhooks/secrets.md - Secret rotation with server.listen() restored
  • docs/build/chainhooks/migration.md - v1→v2 migration with accurate mapping table
  • docs/build/chainhooks/faq.md - All 11 FAQ questions restored (was 6)

Reference Pages

  • docs/build/chainhooks/reference/README.md - Reference landing
  • docs/build/chainhooks/reference/filters.md - 373 lines with all 31 code examples (was 170 lines)
  • docs/build/chainhooks/reference/options.md - Per-option subsections with individual code examples
  • docs/build/chainhooks/reference/payload-anatomy.md - Complete JSON with all metadata fields

Files Modified (2)

  • docs/build/SUMMARY.md - Added Chainhooks section navigation
  • docs/build/get-started/clarity-crash-course.md - Updated Chainhooks link to local path

Reviewer Feedback Addressed (ALL items from the reviewer)

Issue Fix
Naming inconsistency Enforced: "Chainhooks" (product), "Chainhooks SDK" (npm), "Chainhooks API" (REST)
Missing v1/v2 context in overview Restored
Missing TypeScript types in quickstart Restored (ChainhookDefinitionSchema, ChainhookStatusSchema, etc.)
Missing "(maximum 200)" UUID limit Restored in create.md
Missing anti-pattern example in update Restored ("Bad: Will overwrite any existing events")
Missing server.listen() in secrets Restored in Fastify example
MEANING CHANGE in migration table Fixed: "v2 handles secrets automatically" (was "Delivery target stays the same")
Missing rotateConsumerSecret() note Restored
Missing "Extras" column in migration Restored
5 missing FAQ questions All 11 restored including beta pricing, "Can I test locally?"
Missing "Where to Get Help" Restored (Discord + email)
9+ missing code examples in filters All 31 examples present (ft_mint, ft_burn, nft variants, contract_call/log variants, tenure_change extended)
Per-option docs collapsed to table Restored per-option subsections with individual code examples
JSON examples gutted in payload-anatomy Complete JSON with realistic data and all metadata fields

Context

PR 3 of 7 decomposing the Hiro docs migration (#1847). This was the most heavily criticized section.

Test plan

  • Verify filters.md has all 31 code examples (was 170 lines → now 373)
  • Verify faq.md has all 11 questions (was 6)
  • Verify migration.md row 3 says "v2 handles secrets automatically"
  • Verify quickstart.md has TypeScript types section
  • Verify update.md has anti-pattern example
  • Verify naming consistency across all 13 files
  • Run markdown link checker

🤖 Generated with Claude Code

Migrates 13 files covering Chainhooks overview, quickstart, CRUD
operations, secrets management, migration guide, FAQ, and complete
reference documentation (filters, options, payload anatomy).

All content faithfully preserved from Hiro source including:
- All code examples (9+ that were missing in original attempt)
- All FAQ questions (11 total, vs 6 in original)
- Complete filter reference with all variant examples
- Accurate migration mapping table
- TypeScript types and anti-pattern examples

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

CLAassistant commented Mar 24, 2026

CLA assistant check
All committers have signed the CLA.

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