Skip to content

Commit 845c863

Browse files
committed
feat(wallet-toolbox): add regtest chain with its proof-of-work limit
Teranode regression-network deployments run go-chaincfg RegressionNetParams: the canonical regtest genesis header and a proof-of-work limit of 0x207fffff. The toolbox had no chain for them and rejected every such header against the mainnet limit, so a wallet could not verify anything on one. - Chain gains 'regtest': genesisHeader, ChainTracks clients accept the service's 'regtest' name, REGTEST_ARCADE_URL / REGTEST_CHAINTRACKS_URL endpoint configuration, no WhatsOnChain provider (like tstn). - Header proof-of-work and chain-work checks take an optional chain; proofOfWorkLimitBits(chain) raises the limit for 'regtest' only. An omitted chain keeps the mainnet limit, so no existing validation is relaxed. - Every ChainTracks client, storage, ingestor, bulk-file path and Monitor header check passes its configured chain. BulkFileDataManager refuses to validate a file labelled with a chain other than its own. - tstn is unchanged and still enforces go-chaincfg TeraScalingTestNetParams. - Bumps @bsv/wallet-toolbox, -client and -mobile to 2.15.0.
1 parent a0c3315 commit 845c863

48 files changed

Lines changed: 547 additions & 127 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/packages/wallet/wallet-toolbox-client.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ id: pkg-wallet-toolbox-client
33
title: '@bsv/wallet-toolbox-client'
44
kind: package
55
domain: wallet
6-
version: '2.14.8'
7-
last_updated: '2026-10-12'
8-
last_verified: '2026-10-12'
6+
version: '2.15.0'
7+
last_updated: '2026-10-13'
8+
last_verified: '2026-10-13'
99
review_cadence_days: 30
1010
npm: 'https://www.npmjs.com/package/@bsv/wallet-toolbox-client'
1111
repo: 'https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox/client'
@@ -65,8 +65,8 @@ new account even if other hosts fail or return malformed records.
6565

6666
The browser build includes the fetch-based, credential-free ChainTracks v2
6767
client and reconnecting SSE adapter without Node-only modules. Public defaults
68-
cover mainnet, testnet, and TerraTestNet; STN/TSTN use an injected or configured
69-
endpoint.
68+
cover mainnet, testnet, and TerraTestNet; STN/TSTN and regtest use an injected
69+
or configured endpoint.
7070

7171
The portable local controller coalesces stale height refresh and immutable
7272
object loads, applies failed-load backoff, and validates through the asynchronous

‎docs/packages/wallet/wallet-toolbox-mobile.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ id: pkg-wallet-toolbox-mobile
33
title: '@bsv/wallet-toolbox-mobile'
44
kind: package
55
domain: wallet
6-
version: '2.14.8'
7-
last_updated: '2026-10-12'
8-
last_verified: '2026-10-12'
6+
version: '2.15.0'
7+
last_updated: '2026-10-13'
8+
last_verified: '2026-10-13'
99
review_cadence_days: 30
1010
npm: 'https://www.npmjs.com/package/@bsv/wallet-toolbox-mobile'
1111
repo: 'https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox/mobile'
@@ -65,8 +65,8 @@ new account even if other hosts fail or return malformed records.
6565

6666
The mobile build includes the fetch-based, credential-free ChainTracks v2
6767
client and reconnecting SSE adapter without Node-only modules. Public defaults
68-
cover mainnet, testnet, and TerraTestNet; STN/TSTN use an injected or configured
69-
endpoint.
68+
cover mainnet, testnet, and TerraTestNet; STN/TSTN and regtest use an injected
69+
or configured endpoint.
7070

7171
The portable local controller coalesces stale height refresh and immutable
7272
object loads, applies failed-load backoff, and validates through the asynchronous

‎docs/packages/wallet/wallet-toolbox.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: '@bsv/wallet-toolbox'
44
kind: package
55
domain: wallet
66
npm: '@bsv/wallet-toolbox'
7-
version: '2.14.8'
8-
last_updated: '2026-10-12'
9-
last_verified: '2026-10-12'
7+
version: '2.15.0'
8+
last_updated: '2026-10-13'
9+
last_verified: '2026-10-13'
1010
review_cadence_days: 30
1111
status: stable
1212
tags: ['wallet', 'brc100']

‎docs/reference/package-api-migrations.md‎

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

‎docs/reference/stack-facts.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ authorized release action.
6767
| wallet | `@bsv/btms-permission-module` | `1.2.2` | node-library | node-esm | node | `>=22` | [packages/wallet/btms-permission-module](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/btms-permission-module) |
6868
| wallet | `@bsv/ecpm-permission-module` | `0.1.2` | browser-library | browser-bundler, browser-esm, node-esm | browser, node | `>=22` | [packages/wallet/ecpm-permission-module](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/ecpm-permission-module) |
6969
| wallet | `@bsv/wallet-relay` | `0.5.2` | cli-library | browser-bundler, browser-esm, cli, node-cjs, node-esm | browser, node | `>=22` | [packages/wallet/ts-wallet-relay](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/ts-wallet-relay) |
70-
| wallet | `@bsv/wallet-toolbox` | `2.14.8` | node-library | node-cjs | node | `>=22` | [packages/wallet/wallet-toolbox](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox) |
71-
| wallet | `@bsv/wallet-toolbox-client` | `2.14.8` | browser-library | browser-bundler, browser-esm, node-cjs, node-esm | browser, node | `>=22` | [packages/wallet/wallet-toolbox/client](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox/client) |
72-
| wallet | `@bsv/wallet-toolbox-mobile` | `2.14.8` | react-native-library | react-native-metro | react-native | `>=22` | [packages/wallet/wallet-toolbox/mobile](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox/mobile) |
70+
| wallet | `@bsv/wallet-toolbox` | `2.15.0` | node-library | node-cjs | node | `>=22` | [packages/wallet/wallet-toolbox](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox) |
71+
| wallet | `@bsv/wallet-toolbox-client` | `2.15.0` | browser-library | browser-bundler, browser-esm, node-cjs, node-esm | browser, node | `>=22` | [packages/wallet/wallet-toolbox/client](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox/client) |
72+
| wallet | `@bsv/wallet-toolbox-mobile` | `2.15.0` | react-native-library | react-native-metro | react-native | `>=22` | [packages/wallet/wallet-toolbox/mobile](https://github.com/bsv-blockchain/ts-stack/tree/main/packages/wallet/wallet-toolbox/mobile) |
7373

7474
## Standalone infrastructure manifests
7575

‎governance/package-release-notes.json‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,24 @@
208208
},
209209
{
210210
"name": "@bsv/wallet-toolbox",
211-
"publishedVersion": "2.14.7",
212-
"releaseType": "patch",
213-
"summary": "Preserves the existing empty attempted-TXID sentinel when storage detects an explicit-input double spend before constructing an action. Requires one doubleSpend result, empty send results, no constructed transaction fields and bounded nonempty competing evidence; other empty identifiers remain invalid. Confirmed internalizeAction resolves the block header before the storage writer opens, so IndexedDB stores a valid mined AtomicBEEF after an asynchronous header lookup. Invalid proofs and missing or malformed headers still reject with no partial proven-transaction, transaction, or output records. Adds restart-safe WAB registration checkpoints that preserve the original root across interrupted faucet redemption and UMP publication; retries recover the prior faucet action instead of creating a second root. CWIStyleWalletManager commits added or deleted profiles only when the replacement UMP token is published. Failed factor retrieval or publication preserves the previous profile list and permits retry; failed active-profile deletion attempts to restore that profile while preserving the update error. Pending case-insensitive profile names are reserved until creation settles, preventing overlapping duplicate names. A failure restoring the active wallet after publication retains the committed token and profile list. internalizeAction stores basket customInstructions with one metadata encryption when encryptWalletMetadata is enabled, including a normal basket on a call that also carries a registered permission-module label.",
214-
"migration": "For pre-construction conflict recovery, upgrade the wallet parser with an application SDK that validates competing evidence against requested inputs. Use the existing JSON error transport; binary framing is unchanged. Parsing alone does not authorize retry or prove competing transaction validity. For confirmed IndexedDB internalization, upgrade active storage, including the browser client; no API, wire or schema migration is required. For restart-safe WAB registration, persist token bytes through pendingRegistrationTokenSaver before funding, load them with loadPendingRegistrationToken before authentication after restart, and retain them until an authenticated snapshot is saved and hasPendingRegistrationToken returns false. Recover older pending registrations without checkpoints using the original wallet state; do not redeem again with a new root. No public API, wire, database, or consumer migration is required. Upgrade the wallet manager package used by the host. This fixes failed-update bookkeeping, not the underlying factor-decryption error. After a post-publication profile-restoration error, inspect listProfiles before retrying: the profile change has already committed. A failed restoration may leave the default profile active. Newly internalized normal-basket customInstructions are encrypted once, matching createAction. Values already stored under the previous double encryption remain ciphertext after one listOutputs decrypt."
211+
"publishedVersion": "2.14.8",
212+
"releaseType": "minor",
213+
"summary": "Adds a regtest Chain for Teranode regression-network deployments: the canonical regtest genesis header, ChainTracks clients that accept the service's 'regtest' chain name, REGTEST_ARCADE_URL and REGTEST_CHAINTRACKS_URL endpoint configuration, and no WhatsOnChain provider. Header proof-of-work and chain-work checks take an optional chain, and proofOfWorkLimitBits(chain) reports its limit: only 'regtest' raises it to 0x207fffff; every other chain, and every check that names no chain, keeps the mainnet limit of 0x1d00ffff, so no existing validation is relaxed.",
214+
"migration": "Chain gains the 'regtest' member, so a consumer with an exhaustive switch over Chain needs a case for it. Header validation helpers gain an optional trailing chain parameter; omitting it keeps the mainnet limit, and the 'tstn' chain is unchanged. No API or schema migration is required."
215215
},
216216
{
217217
"name": "@bsv/wallet-toolbox-client",
218-
"publishedVersion": "2.14.7",
219-
"releaseType": "patch",
220-
"summary": "Preserves the existing empty attempted-TXID sentinel when storage detects an explicit-input double spend before constructing an action. Requires one doubleSpend result, empty send results, no constructed transaction fields and bounded nonempty competing evidence; other empty identifiers remain invalid. Confirmed internalizeAction resolves the block header before the storage writer opens, so IndexedDB stores a valid mined AtomicBEEF after an asynchronous header lookup. Invalid proofs and missing or malformed headers still reject with no partial proven-transaction, transaction, or output records. Adds restart-safe WAB registration checkpoints that preserve the original root across interrupted faucet redemption and UMP publication; retries recover the prior faucet action instead of creating a second root. CWIStyleWalletManager commits added or deleted profiles only when the replacement UMP token is published. Failed factor retrieval or publication preserves the previous profile list and permits retry; failed active-profile deletion attempts to restore that profile while preserving the update error. Pending case-insensitive profile names are reserved until creation settles, preventing overlapping duplicate names. A failure restoring the active wallet after publication retains the committed token and profile list. internalizeAction stores basket customInstructions with one metadata encryption when encryptWalletMetadata is enabled, including a normal basket on a call that also carries a registered permission-module label.",
221-
"migration": "For pre-construction conflict recovery, upgrade the wallet parser with an application SDK that validates competing evidence against requested inputs. Use the existing JSON error transport; binary framing is unchanged. Parsing alone does not authorize retry or prove competing transaction validity. For confirmed IndexedDB internalization, upgrade active storage, including the browser client; no API, wire or schema migration is required. For restart-safe WAB registration, persist token bytes through pendingRegistrationTokenSaver before funding, load them with loadPendingRegistrationToken before authentication after restart, and retain them until an authenticated snapshot is saved and hasPendingRegistrationToken returns false. Recover older pending registrations without checkpoints using the original wallet state; do not redeem again with a new root. No public API, wire, database, or consumer migration is required. Upgrade the wallet manager package used by the host. This fixes failed-update bookkeeping, not the underlying factor-decryption error. After a post-publication profile-restoration error, inspect listProfiles before retrying: the profile change has already committed. A failed restoration may leave the default profile active. Newly internalized normal-basket customInstructions are encrypted once, matching createAction. Values already stored under the previous double encryption remain ciphertext after one listOutputs decrypt."
218+
"publishedVersion": "2.14.8",
219+
"releaseType": "minor",
220+
"summary": "Adds a regtest Chain for Teranode regression-network deployments: the canonical regtest genesis header, ChainTracks clients that accept the service's 'regtest' chain name, REGTEST_ARCADE_URL and REGTEST_CHAINTRACKS_URL endpoint configuration, and no WhatsOnChain provider. Header proof-of-work and chain-work checks take an optional chain, and proofOfWorkLimitBits(chain) reports its limit: only 'regtest' raises it to 0x207fffff; every other chain, and every check that names no chain, keeps the mainnet limit of 0x1d00ffff, so no existing validation is relaxed.",
221+
"migration": "Chain gains the 'regtest' member, so a consumer with an exhaustive switch over Chain needs a case for it. Header validation helpers gain an optional trailing chain parameter; omitting it keeps the mainnet limit, and the 'tstn' chain is unchanged. No API or schema migration is required."
222222
},
223223
{
224224
"name": "@bsv/wallet-toolbox-mobile",
225-
"publishedVersion": "2.14.7",
226-
"releaseType": "patch",
227-
"summary": "Preserves the existing empty attempted-TXID sentinel when storage detects an explicit-input double spend before constructing an action. Requires one doubleSpend result, empty send results, no constructed transaction fields and bounded nonempty competing evidence; other empty identifiers remain invalid. Confirmed internalizeAction resolves the block header before the storage writer opens, so IndexedDB stores a valid mined AtomicBEEF after an asynchronous header lookup. Invalid proofs and missing or malformed headers still reject with no partial proven-transaction, transaction, or output records. Adds restart-safe WAB registration checkpoints that preserve the original root across interrupted faucet redemption and UMP publication; retries recover the prior faucet action instead of creating a second root. CWIStyleWalletManager commits added or deleted profiles only when the replacement UMP token is published. Failed factor retrieval or publication preserves the previous profile list and permits retry; failed active-profile deletion attempts to restore that profile while preserving the update error. Pending case-insensitive profile names are reserved until creation settles, preventing overlapping duplicate names. A failure restoring the active wallet after publication retains the committed token and profile list. internalizeAction stores basket customInstructions with one metadata encryption when encryptWalletMetadata is enabled, including a normal basket on a call that also carries a registered permission-module label.",
228-
"migration": "For pre-construction conflict recovery, upgrade the wallet parser with an application SDK that validates competing evidence against requested inputs. Use the existing JSON error transport; binary framing is unchanged. Parsing alone does not authorize retry or prove competing transaction validity. For confirmed IndexedDB internalization, upgrade active storage, including the browser client; no API, wire or schema migration is required. For restart-safe WAB registration, persist token bytes through pendingRegistrationTokenSaver before funding, load them with loadPendingRegistrationToken before authentication after restart, and retain them until an authenticated snapshot is saved and hasPendingRegistrationToken returns false. Recover older pending registrations without checkpoints using the original wallet state; do not redeem again with a new root. No public API, wire, database, or consumer migration is required. Upgrade the wallet manager package used by the host. This fixes failed-update bookkeeping, not the underlying factor-decryption error. After a post-publication profile-restoration error, inspect listProfiles before retrying: the profile change has already committed. A failed restoration may leave the default profile active. Newly internalized normal-basket customInstructions are encrypted once, matching createAction. Values already stored under the previous double encryption remain ciphertext after one listOutputs decrypt."
225+
"publishedVersion": "2.14.8",
226+
"releaseType": "minor",
227+
"summary": "Adds a regtest Chain for Teranode regression-network deployments: the canonical regtest genesis header, ChainTracks clients that accept the service's 'regtest' chain name, REGTEST_ARCADE_URL and REGTEST_CHAINTRACKS_URL endpoint configuration, and no WhatsOnChain provider. Header proof-of-work and chain-work checks take an optional chain, and proofOfWorkLimitBits(chain) reports its limit: only 'regtest' raises it to 0x207fffff; every other chain, and every check that names no chain, keeps the mainnet limit of 0x1d00ffff, so no existing validation is relaxed.",
228+
"migration": "Chain gains the 'regtest' member, so a consumer with an exhaustive switch over Chain needs a case for it. Header validation helpers gain an optional trailing chain parameter; omitting it keeps the mainnet limit, and the 'tstn' chain is unchanged. No API or schema migration is required."
229229
},
230230
{
231231
"name": "create-bsv-app",

‎governance/repository-health/baselines.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@
327327
"@bsv/btms-permission-module": "1.2.2",
328328
"@bsv/ecpm-permission-module": "0.1.2",
329329
"@bsv/wallet-relay": "0.5.2",
330-
"@bsv/wallet-toolbox-client": "2.14.8",
331-
"@bsv/wallet-toolbox-mobile": "2.14.8",
332-
"@bsv/wallet-toolbox": "2.14.8"
330+
"@bsv/wallet-toolbox-client": "2.15.0",
331+
"@bsv/wallet-toolbox-mobile": "2.15.0",
332+
"@bsv/wallet-toolbox": "2.15.0"
333333
}
334334
}

‎packages/wallet/wallet-toolbox/CHANGELOG.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ This document captures the history of significant changes to the wallet-toolbox
44
The git commit history contains the details but is unable to draw
55
attention to changes that materially alter behavior or extend functionality.
66

7+
## wallet-toolbox 2.15.0
8+
9+
- Adds a `regtest` `Chain` for Teranode regression-network deployments
10+
(go-chaincfg `RegressionNetParams`). `genesisHeader('regtest')` returns the
11+
canonical regtest genesis header; `ChaintracksServiceClient` and
12+
`GoChaintracksServiceClient` accept a service that reports its chain as
13+
`regtest`; Arcade and ChainTracks endpoints come from `REGTEST_ARCADE_URL` and
14+
`REGTEST_CHAINTRACKS_URL` (`regtestArcadeUrl`, `regtestChaintracksUrl`); and,
15+
like `tstn`, no WhatsOnChain provider is registered.
16+
- Header proof-of-work and chain-work checks take an optional `chain`, and the
17+
new `proofOfWorkLimitBits(chain)` reports the limit it selects. Only
18+
`regtest` raises it, to `0x207fffff`. Every other chain, and every check that
19+
names no chain, keeps the mainnet limit of `0x1d00ffff`, so no existing
20+
validation is relaxed. Every ChainTracks client, storage, ingestor, bulk-file
21+
path and Monitor header check now passes its configured chain.
22+
- `tstn` is unchanged: it keeps go-chaincfg's `TeraScalingTestNetParams`
23+
genesis and proof-of-work limit. A deployment that runs regtest parameters
24+
should configure `regtest`, not `tstn`.
25+
726
## wallet-toolbox 2.14.8
827

928
- `WalletPermissionsManager.internalizeAction` stores basket `customInstructions`

0 commit comments

Comments
 (0)