Skip to content

chore: actualize documentation#372

Merged
HealthyBuilder merged 2 commits into
solana-foundation:mainfrom
sonicfromnewyoke:sonic/update-docs
Apr 9, 2026
Merged

chore: actualize documentation#372
HealthyBuilder merged 2 commits into
solana-foundation:mainfrom
sonicfromnewyoke:sonic/update-docs

Conversation

@sonicfromnewyoke
Copy link
Copy Markdown
Contributor

Problem

README.md served as both project documentation and a complete API cookbook with 2k lines of inline code examples for every RPC and WebSocket method. This caused several issues:

  • stale examples - code snippets used removed APIs (bin.NewDecoder, CommitmentRecent, GetParsedTransaction) and wrong types (PublicKey vs *PublicKey) that silently broke without anyone noticing
  • missing coverage - 3 methods implemented in the codebase (BlockSubscribe, SlotsUpdatesSubscribe) or in the Solana RPC spec (GetStakeMinimumDelegation) were absent from documentation
  • unmaintainable size - at ~3000 lines, the README was difficult to navigate and update, discouraging contributions

Summary of Changes

  • fixed 4 bugs found during migration: bin.NewDecoder -> NewBinDecoder, CommitmentRecent -> CommitmentProcessed, Mint/VotePubkey pointer types, removed nonexistent GetParsedTransaction
  • implemented GetStakeMinimumDelegation - new RPC client method + result type to match the Solana spec
  • extracted all examples into testable Example* functions - rpc/example_test.go (52 methods) and rpc/ws/example_test.go (11 subscriptions) that compile-check on every go build and render on pkg.go.dev
  • slimmed README from ~3k to ~865 lines - kept project overview, install, key usage patterns; replaced the method catalog with compact reference tables linking to pkg.go.dev

@HealthyBuilder HealthyBuilder merged commit 6a4dd23 into solana-foundation:main Apr 9, 2026
9 checks passed
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