A minimal Vite + React + TypeScript demo app that creates a BSV transaction using the @bsv/sdk and submits it as BEEF to a remote endpoint.
- The user enters a BSV address and a session ID.
- Clicking Pay Bridget uses
WalletClientfrom@bsv/sdkto construct a transaction with a single P2PKH output of 1000 satoshis locked to the provided address. - The transaction is created with
noSend: trueso it is not broadcast — instead the raw BEEF hex is POSTed to the hummingbox endpoint with the given session. - A live, syntax-highlighted code block below the button shows developers exactly what code is running, updating in real time as the address and session inputs change.
npm install
npm run dev| Command | Description |
|---|---|
npm run dev |
Start the Vite dev server |
npm run build |
Type-check with tsc then build for production |
npm run typecheck |
Run TypeScript type checking only |
npm run preview |
Preview the production build locally |
- Vite — build tool
- React 19 — UI
- TypeScript — strict type checking
- @bsv/sdk — BSV wallet & transaction construction
- Prism.js — syntax highlighting for the code preview