Skip to content
xch-devPublic

About

Documentation for the Wallet SDK and Sage

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

xch.dev

Source for xch.dev, the documentation for Sage and the Chia Wallet SDK. It's built with Docusaurus.

Requirements

  • Node.js 24 (see .nvmrc; 20 or newer works)
  • pnpm, at the version pinned in package.json's packageManager field. Running corepack enable picks it up automatically.

Development

pnpm install
pnpm start

pnpm start and pnpm build both generate the RPC reference pages first. The generated pages go to docs/sage/rpc, which is gitignored. To regenerate them on their own, run pnpm gen-api-docs.

Before opening a PR, run:

pnpm format:check   # or `pnpm format` to fix
pnpm typecheck
pnpm build

CI runs the same checks on every pull request.

Wallet SDK examples

Every Rust example in docs/sdk is compiled and run against the Wallet SDK. The SDK commit the docs are written against is the rev in sdk-examples/Cargo.toml. To check the examples (this needs a Rust toolchain):

pnpm check:sdk-examples                             # every page
pnpm check:sdk-examples docs/sdk/primitives/cat.md  # specific pages
pnpm check:sdk-examples --sdk /path/to/wallet-sdk   # against a local SDK checkout

Each ```rust block is compiled as its own module, so it needs its own use lines. Mark a block ```rust ignore to skip it, which is only meant for excerpts like struct definitions. CI doesn't run this check yet.

To update the docs for a new SDK release with Claude Code, run /update-sdk-docs <tag>.

RPC reference

The RPC pages are generated from src/openapi.json, which comes from Sage. To update it to a Sage release (this needs git and a Rust toolchain):

pnpm sync-openapi v0.13.1   # omit the tag to use the latest release

To use a local Sage checkout instead, set SAGE_DIR=/path/to/sage.

Deployment

Every push to main builds the site and deploys it to GitHub Pages through .github/workflows/ci.yml.

About

Documentation for the Wallet SDK and Sage

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages