Skip to content

Rewrite the Wallet SDK documentation - #10

Merged
Rigidity merged 7 commits into
mainfrom
rigidity/wallet-sdk-docs-overhaul
Nov 9, 2026
Merged

Rigidity merged 7 commits into
mainfrom
rigidity/wallet-sdk-docs-overhaul

Conversation

@Rigidity

@Rigidity Rigidity commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the Wallet SDK section with conceptual docs that cover the whole public API of chia-wallet-sdk. That means every crate in the workspace, plus the bindings. Every page has Rust examples that were compiled and run (see Verification).

New structure

Section Pages
Introduction (/sdk) What the SDK is, a crate map, installation, feature flags, the prelude, and how a transaction comes together
Quick Start A first transaction: by hand, with the action system, and against mainnet with coinset.org
Core Concepts CLVM Values, SpendContext, Conditions, Layers & Puzzles, Keys & Signing
Action System (/sdk/action-system) Overview, Action Reference, Custom Spends
Primitives (/sdk/primitives) Overview, Standard, CAT, Singletons, NFT, DID, Option Contracts, Vaults & MIPS, Clawback, Streamed Assets, Bulletins, DataLayer (chip-0035), Action Layer (action-layer), Partial Offers (chip-0052), Auctions (auction), Splitter (chip-0008), NFT Fusion (chip-0021), Secure the Bag
Offers, Clear Signing Standalone pages
Networking Peer Protocol (chia-sdk-client), RPC Clients (chia-sdk-coinset), Daemon (chia-sdk-daemon)
Testing (/sdk/testing) Simulator, Peer Simulator, Full Node Simulator
Utilities, Bindings Utilities covers addresses, coin selection, hex, constants, Merkle trees, cost estimation and the CLI. Bindings covers Node.js, WASM and Python
Guides Application Patterns, Troubleshooting

Redirects

These URLs still exist: /sdk, /sdk/primitives/{standard,cat,nft}, /sdk/offers, /sdk/testing, /sdk/patterns and /sdk/troubleshooting. The pages that moved or were removed redirect through @docusaurus/plugin-client-redirects, the same way the Sage move did:

  • /sdk/spend-context → /sdk/concepts/spend-context
  • /sdk/actions → /sdk/action-system
  • /sdk/connectivity → /sdk/networking/peer
  • /sdk/primitives/other → /sdk/primitives

Verification

  • Examples: pnpm check:sdk-examples (scripts/check-sdk-examples.py) extracts every ```rust block into the sdk-examples crate, with each block as its own module, and runs cargo test. Most examples are #[test]s that run against the Simulator. The networking examples are compiled async fns, or tests against the peer simulator. --sdk <path> runs the examples against a local SDK checkout.
  • SDK version: all 162 blocks compile and pass against ad7630cb, the SDK commit pinned as rev in sdk-examples/Cargo.toml, with every feature flag enabled.
  • DID parsing: Did::parse_child trusts the hint, so the DID pages check the parsed puzzle hash against the coin themselves.
  • Skipped blocks: eight struct and trait excerpts are marked ```rust ignore and skipped. Everything else is checked.
  • Bindings: the Node.js and WASM examples ran against local builds. The Python example was only checked against the .pyi stubs.
  • Site: pnpm build passes with no broken links or anchors, and prettier --check passes.

Maintenance

  • Pinned SDK commit: the rev in sdk-examples/Cargo.toml records which SDK commit the docs are written against.
  • Update skill: /update-sdk-docs <tag> (.claude/skills/update-sdk-docs/SKILL.md) is a Claude Code skill for updating the docs to a new release. It diffs the SDK from that rev, updates the affected pages, bumps the rev, runs the example check, a separate prose review and the build, then opens a PR.
  • README: documents the example check.
  • CI: doesn't run the example check yet.

Notes for review

  • Rust only: the pages no longer have the Node.js and Python tabs, which weren't verified. The bindings now have their own page, with a Rust-to-bindings mapping and an example per language.
  • Target version: the docs describe the SDK as it is on main (ad7630cb), and treat everything there as released. That includes the four new feature flags, partial offers, auctions, the splitter, NFT fusion, Secure the Bag, vault signed messages, per-NFT royalty trade prices, and the newer clear signing rules. The pages don't mention versions, and they don't label anything as unreleased.
  • SDK issues found while writing, documented where they affect users:
    • The peer simulator decodes rejections incorrectly, and its puzzle-state pagination returns the wrong resume height.
    • Peer requests have no timeout.
    • SimulatorConfig::timestamp_mode is never read.
    • CatalogRegistryConstants::get is todo!().
    • Nft::spend_with adds the coin spend before it returns MissingChild.

@Rigidity
Rigidity merged commit f59c8c9 into main Nov 9, 2026
2 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.

1 participant