Skip to content

Commit f531179

Browse files
committed
Add a path for blockchain devs coming from other chains
1 parent 69ffe4e commit f531179

8 files changed

Lines changed: 49 additions & 19 deletions

File tree

docs/architecture/brc-100.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ On mobile, BSV Browser embeds the web app and exposes the same method surface th
4141

4242
1. The app calls the same BRC-100 method.
4343
2. The browser WebView sends the request to native code over `postMessage`.
44-
3. The native wallet selects outputs and signs on the device.
45-
4. The wallet may use Wallet Infra, ARC, Chaintracks, or other services.
44+
3. The native wallet selects outputs from its local database and signs on the device.
45+
4. The wallet may still use network services such as ARC or Chaintracks for broadcast, headers, and proofs.
4646
5. The result returns to the web app through the bridge.
4747

4848
The application does not need separate business logic for desktop and mobile if it stays on the BRC-100 interface.

docs/assets/diagrams/brc100-wallet-flows.svg

Lines changed: 11 additions & 10 deletions
Loading

docs/get-started/choose-your-stack.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Browser app using a user's wallet?
2121
Backend agent with its own key?
2222
-> @bsv/simple/server
2323
24+
Coming from another chain and want to build transactions explicitly?
25+
-> @bsv/wallet-helper
26+
2427
Wallet implementation or wallet infrastructure?
2528
-> @bsv/wallet-toolbox + BRC-100 spec
2629
@@ -51,6 +54,22 @@ console.log(result.txid)
5154

5255
The web app does not hold private keys. The wallet client finds an available substrate and forwards BRC-100 calls to the user's wallet application.
5356

57+
## Transaction Builder
58+
59+
Use `@bsv/wallet-helper` when you want to construct transactions directly, but you do not want to drop all the way into raw `WalletClient.createAction` and `signAction` calls.
60+
61+
This is often the clearest starting point for developers coming from other blockchain stacks: you can think in terms of explicit transaction outputs, scripts, ordinals, metadata, inputs, and change, while the user's BRC-100 wallet still controls keys and signing.
62+
63+
```bash
64+
npm install @bsv/wallet-helper
65+
```
66+
67+
Read this with the BRC-100 method reference when you need to understand what the builder sends to the wallet:
68+
69+
- [@bsv/wallet-helper](../packages/helpers/wallet-helper.md)
70+
- [`createAction`](../specs/brc-100-wallet.md#createaction)
71+
- [`signAction`](../specs/brc-100-wallet.md#signaction)
72+
5473
## Server Agent
5574

5675
Use this for automated services, bots, funding agents, or test harnesses where the service owns a key.
@@ -115,6 +134,7 @@ Use the infrastructure docs when you need shared services rather than npm packag
115134
| What you're building | Start with | Usually adds |
116135
|----------------------|------------|--------------|
117136
| Browser app | `@bsv/simple/browser` | `@bsv/message-box-client`, overlays |
137+
| Transaction-building app | `@bsv/wallet-helper` | `@bsv/templates`, BRC-100 method reference |
118138
| Server agent | `@bsv/simple/server` | `@bsv/402-pay`, Message Box |
119139
| BRC-100 wallet | `@bsv/wallet-toolbox` | Wallet Infra, WAB, Chaintracks |
120140
| Protocol library | `@bsv/sdk` | Conformance vectors |

docs/get-started/concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ BRC-100 is the wallet-to-application interface. Application code can ask for act
2323
Two common substrates use the same method surface:
2424

2525
- **BSV Desktop**: a web app calls a wallet client; the request reaches a localhost wallet server; BSV Desktop selects outputs, signs locally, optionally uses Wallet Infra, and returns the result.
26-
- **BSV Browser**: the web app runs inside an embedded browser; the request crosses a postMessage bridge into the native mobile wallet; signing happens on-device and the result returns over the bridge.
26+
- **BSV Browser**: the web app runs inside an embedded browser; the request crosses a postMessage bridge into the native mobile wallet; wallet state comes from a local database, signing happens on-device, and the result returns over the bridge.
2727

2828
For a method-level contract, link directly to [BRC-100 Wallet Interface](../specs/brc-100-wallet.md). For example: [`createAction`](../specs/brc-100-wallet.md#createaction), [`signAction`](../specs/brc-100-wallet.md#signaction), [`internalizeAction`](../specs/brc-100-wallet.md#internalizeaction), and [`listOutputs`](../specs/brc-100-wallet.md#listoutputs).
2929

docs/get-started/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ npm install @bsv/simple
2222

2323
Use `@bsv/sdk` directly only when you need protocol-level control over keys, scripts, transactions, BEEF, BUMP, or the raw BRC-100 `WalletClient`.
2424

25+
If you are coming from another blockchain stack and want to build transactions explicitly, start with [`@bsv/wallet-helper`](../packages/helpers/wallet-helper.md). It is more technical than `@bsv/simple`, but easier to work with than direct `WalletClient.createAction` and `signAction` calls.
26+
2527
## Step 2: Connect to a User Wallet
2628

2729
Browser apps use `@bsv/simple/browser`. Under the hood it creates a BRC-100 wallet client and discovers an available wallet substrate such as BSV Desktop over localhost or BSV Browser over a postMessage bridge.
@@ -100,6 +102,7 @@ Do not generate and discard a production private key at runtime. Persist it in y
100102
| Need | Read |
101103
|------|------|
102104
| Pick packages by use case | [Choose Your Stack](./choose-your-stack.md) |
105+
| Build explicit transactions with a wallet | [@bsv/wallet-helper](../packages/helpers/wallet-helper.md) |
103106
| Understand BEEF, wallets, overlays, and BRC-100 | [Key Concepts](./concepts.md) |
104107
| See every BRC-100 method shape | [BRC-100 Wallet Interface](../specs/brc-100-wallet.md) |
105108
| Build a wallet or wallet-like implementation | [@bsv/wallet-toolbox](../packages/wallet/wallet-toolbox.md) |

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This repository is the TypeScript reference stack for BSV application developmen
2828
| You are | Use first | Why |
2929
|---------|-----------|-----|
3030
| Web application developer | [`@bsv/simple/browser`](./get-started/index.md) | Connects to a local BRC-100 wallet without putting keys in app code. |
31+
| Developer coming from another chain | [`@bsv/wallet-helper`](./packages/helpers/wallet-helper.md) | Builds explicit transactions with a fluent builder while the wallet keeps keys and signing. |
3132
| Backend or automation developer | [`@bsv/simple/server`](./get-started/choose-your-stack.md#server-agent-automated-self-custodial) | Runs a self-custodial server wallet from a private key and storage endpoint. |
3233
| Wallet developer | [`@bsv/wallet-toolbox`](./packages/wallet/wallet-toolbox.md) | Reference components for building a BRC-100 wallet. |
3334
| Protocol engineer | [`@bsv/sdk`](./packages/sdk/bsv-sdk.md) | Core crypto, scripts, transactions, BEEF, BUMP, and wallet interface types. |
@@ -59,7 +60,7 @@ For raw BRC-100 work, use `WalletClient` from `@bsv/sdk` and call methods such a
5960
| Overlays | `@bsv/overlay`, `@bsv/overlay-express`, topics, discovery, GASP | Shared on-chain context, topic validation, lookup services, sync. |
6061
| Messaging | Message Box, Authsocket, Paymail | Store-and-forward messages, live authenticated channels, identity-based addressing. |
6162
| Middleware | Auth, HTTP 402, payment express | Express middleware for identity and payment-gated APIs. |
62-
| Helpers | `@bsv/simple`, templates, DID, wallet helper, amount utilities | Higher-level developer ergonomics on top of the core protocols. |
63+
| Helpers | `@bsv/simple`, `@bsv/wallet-helper`, templates, DID, amount utilities | Higher-level developer ergonomics, including wallet-aware app helpers and fluent transaction building. |
6364

6465
## Important References
6566

docs/packages/helpers/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: domain-helpers
33
title: Helpers
44
kind: reference
5-
last_updated: "2026-04-28"
5+
last_updated: "2026-04-30"
66
version: "n/a"
77
last_verified: "2026-04-28"
88
review_cadence_days: 90
@@ -19,7 +19,7 @@ Utility libraries and helper tools for common BSV operations. Includes high-leve
1919
| Package | Purpose |
2020
|---------|---------|
2121
| [@bsv/simple](simple.md) | High-level wallet API for browser and server — manage payments, tokens, inscriptions, DIDs, and credentials |
22-
| [@bsv/wallet-helper](wallet-helper.md) | Fluent transaction builder with BRC-29 derivation and ordinal support |
22+
| [@bsv/wallet-helper](wallet-helper.md) | Fluent transaction builder for explicit wallet-backed transactions, BRC-29 derivation, and ordinal support |
2323
| [@bsv/templates](templates.md) | Low-level script templates (OpReturn, MultiPushDrop, P2MSKH) with lock/unlock patterns |
2424
| [@bsv/did-client](did-client.md) | DID client for creating, revoking, and querying on-chain DIDs with overlay broadcast |
2525
| [@bsv/amountinator](amountinator.md) | Multi-currency converter (SATS↔BSV↔15+ fiat) with exchange rate caching |

docs/packages/helpers/wallet-helper.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ domain: helpers
66
version: "0.0.6"
77
source_repo: "bsv-blockchain/wallet-helper"
88
source_commit: "unknown"
9-
last_updated: "2026-04-28"
10-
last_verified: "2026-04-28"
9+
last_updated: "2026-04-30"
10+
last_verified: "2026-04-30"
1111
review_cadence_days: 30
1212
npm: "https://www.npmjs.com/package/@bsv/wallet-helper"
1313
repo: "https://github.com/bsv-blockchain/wallet-helper"
@@ -19,6 +19,10 @@ tags: [helpers, wallet, transaction-builder]
1919

2020
> Fluent transaction builder and wallet-compatible script templates for BSV — construct multi-output transactions (P2PKH, ordinals, custom) with method chaining, BRC-29 key derivation, and no private key exposure.
2121
22+
`@bsv/wallet-helper` is a good starting point for developers coming from other blockchain ecosystems who expect to build transactions explicitly. It gives you a transaction-builder shape for outputs, scripts, ordinals, metadata, inputs, and change, while still delegating keys and signing to a BRC-100 wallet.
23+
24+
Use it when `@bsv/simple` feels too task-oriented, but raw `@bsv/sdk` `WalletClient.createAction` / `signAction` calls are more protocol surface than you want to handle directly.
25+
2226
## Install
2327

2428
```bash
@@ -110,6 +114,7 @@ const ordResult = await new TransactionBuilder(wallet, "Mint ordinal")
110114

111115
## When to use this
112116

117+
- You are coming from another blockchain stack and want an explicit transaction-building workflow
113118
- Building transactions with method chaining
114119
- Creating complex multi-output transactions readably
115120
- Working with ordinals and inscriptions
@@ -143,7 +148,7 @@ const ordResult = await new TransactionBuilder(wallet, "Mint ordinal")
143148

144149
- [@bsv/simple](simple.md) — High-level wallet operations
145150
- [@bsv/templates](templates.md) — Low-level script templates
146-
- [@bsv/sdk](https://github.com/bsv-blockchain/sdk-ts) — Core transaction building
151+
- [@bsv/sdk](../sdk/bsv-sdk.md) — Core primitives, raw transactions, and the BRC-100 `WalletClient`
147152

148153
## Reference
149154

0 commit comments

Comments
 (0)