Skip to content

docs: add browser, node, and nextjs examples#49

Draft
darioAnongba wants to merge 2 commits intomainfrom
docs/examples-and-tutorials
Draft

docs: add browser, node, and nextjs examples#49
darioAnongba wants to merge 2 commits intomainfrom
docs/examples-and-tutorials

Conversation

@darioAnongba
Copy link
Copy Markdown
Collaborator

@darioAnongba darioAnongba commented Apr 13, 2026

Description

Closes #23.

This PR adds ready-to-copy onboarding examples for the published JavaScript packages:

  • examples/browser-vite for a minimal browser wallet setup with Vite
  • examples/node-wallet for descriptor-based wallet creation, Esplora sync, PSBT signing, and transaction broadcast in Node.js
  • examples/nextjs for the client-only loading pattern inside a Next.js app
  • examples/README.md as the landing page for safety notes and example selection
  • README links to the new examples section
  • a mandatory CHANGELOG.md entry under [Unreleased]

It also hardens CI by retrying the wasm-pack download step in the GitHub workflows after repeated HTTP 504 failures from GitHub's release endpoint.

Notes to the reviewers

  • The browser-facing examples intentionally use throwaway signet descriptors copied from the repository test fixtures so the snippets stay self-contained.
  • The docs explicitly warn against shipping private descriptors or xprvs in production browser bundles.
  • Local validation run before opening the PR: cargo fmt --check, cargo clippy --all-features --all-targets -- -D warnings, cargo test --all-features, and corepack yarn lint.
  • The CI retry change was added only after the first PR runs failed on the same external wasm-pack download step.

Changelog notice

Added an examples/ directory with browser (Vite), Node.js, and Next.js tutorials, plus README links for quicker onboarding.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

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.

docs: add examples and tutorials

1 participant