Runnable field recipe
Run your own Wallet Storage
Boot the maintained Wallet Infrastructure reference server and MySQL locally, then connect a BRC-100 wallet without giving the storage service custody of user keys.
- Git
- Docker with Compose
- A free local port 8080
Local runbook
Start it, then inspect it
- 01
Fetch the reference stack
Work from the official TypeScript stack so the server, wallet toolbox, and storage wire format stay aligned.
Terminalgit clone --depth 1 https://github.com/bsv-blockchain/ts-stack.git cd ts-stack/infra/wallet-infra - 02
Create a disposable identity and boot
The included Compose file starts Wallet Infrastructure and MySQL. Database migrations run when the service starts.
Terminalexport SERVER_PRIVATE_KEY="$(openssl rand -hex 32)" docker compose up --buildBoundary: Local development only: do not reuse this key, the sample database password, or the unmodified Compose topology in production.
- 03
Check the service boundary
Wait for both containers to become healthy, then verify the HTTP edge. The storage RPC itself uses mutual authentication rather than anonymous database-style access.
Terminalcurl --fail --show-error http://127.0.0.1:8080/ # In a second terminal when finished: docker compose down
Code callout
Connect from Wallet Toolbox
Keep the example small enough to understand. Follow the linked source before adding funds, users, or public traffic.
import { SetupWallet } from '@bsv/wallet-toolbox'
const wallet = await SetupWallet({
env: 'main',
endpointUrl: 'http://127.0.0.1:8080'
})
const outputs = await wallet.listOutputs({
basket: 'my application records',
limit: 20
}) Carry it further
Turn the local proof into a deployment plan
Read before shipping