@bopen-io/wallet-toolbox 2.15.0-bopen.2 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +183 -0
- package/README.md +127 -25
- package/docs/client.md +312 -154
- package/docs/monitor.md +2 -2
- package/docs/no-send-expiry.md +7 -2
- package/docs/services.md +143 -60
- package/docs/wallet.md +208 -117
- package/out/src/CWIStyleWalletManager.d.ts +36 -5
- package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
- package/out/src/CWIStyleWalletManager.js +356 -60
- package/out/src/CWIStyleWalletManager.js.map +1 -1
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +8 -3
- package/out/src/Wallet.js.map +1 -1
- package/out/src/WalletAuthenticationManager.d.ts +3 -0
- package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
- package/out/src/WalletAuthenticationManager.js +86 -3
- package/out/src/WalletAuthenticationManager.js.map +1 -1
- package/out/src/WalletPermissionsManager.d.ts +63 -9
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js +213 -49
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/monitor/Monitor.js +1 -1
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/monitorValidation.d.ts +2 -1
- package/out/src/monitor/monitorValidation.d.ts.map +1 -1
- package/out/src/monitor/monitorValidation.js +2 -2
- package/out/src/monitor/monitorValidation.js.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.js +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.js +2 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
- package/out/src/sdk/WERR_errors.d.ts +4 -0
- package/out/src/sdk/WERR_errors.d.ts.map +1 -1
- package/out/src/sdk/WERR_errors.js +4 -0
- package/out/src/sdk/WERR_errors.js.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.d.ts.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.js +23 -2
- package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +11 -0
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/sdk/types.d.ts +12 -1
- package/out/src/sdk/types.d.ts.map +1 -1
- package/out/src/sdk/types.js +19 -2
- package/out/src/sdk/types.js.map +1 -1
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +5 -3
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.js +2 -2
- package/out/src/services/chaintracker/BHServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js +2 -2
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +3 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js +3 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +2 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js +2 -2
- package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +6 -6
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +2 -2
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js +2 -2
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +1 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +11 -3
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +13 -9
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js +2 -2
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.js +2 -2
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +23 -5
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +58 -16
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts +6 -3
- package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.js +18 -6
- package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
- package/out/src/services/networkConfig.d.ts +7 -0
- package/out/src/services/networkConfig.d.ts.map +1 -1
- package/out/src/services/networkConfig.js +25 -2
- package/out/src/services/networkConfig.js.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.d.ts +8 -2
- package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.js +17 -6
- package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
- package/out/src/services/validateMerklePathResult.d.ts +4 -3
- package/out/src/services/validateMerklePathResult.d.ts.map +1 -1
- package/out/src/services/validateMerklePathResult.js +6 -6
- package/out/src/services/validateMerklePathResult.js.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchWorkspace.d.ts.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchWorkspace.js +3 -2
- package/out/src/signer/actionBatch/ActionBatchWorkspace.js.map +1 -1
- package/out/src/signer/methods/createAction.d.ts +32 -1
- package/out/src/signer/methods/createAction.d.ts.map +1 -1
- package/out/src/signer/methods/createAction.js +56 -1
- package/out/src/signer/methods/createAction.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.js +1 -1
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/signer/methods/signAction.js +8 -1
- package/out/src/signer/methods/signAction.js.map +1 -1
- package/out/src/storage/StorageIdb.js +4 -4
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +6 -2
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +114 -0
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +5 -0
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.js +84 -0
- package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js +7 -3
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts +5 -0
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +13 -6
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/generateChange.d.ts +6 -0
- package/out/src/storage/methods/generateChange.d.ts.map +1 -1
- package/out/src/storage/methods/generateChange.js +10 -3
- package/out/src/storage/methods/generateChange.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts +8 -1
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +106 -42
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.js +1 -1
- package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
- package/out/src/storage/methods/noSendExpiry.d.ts.map +1 -1
- package/out/src/storage/methods/noSendExpiry.js +14 -4
- package/out/src/storage/methods/noSendExpiry.js.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.js +15 -5
- package/out/src/storage/remoting/StorageClientBase.js.map +1 -1
- package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageServer.js +12 -1
- package/out/src/storage/remoting/StorageServer.js.map +1 -1
- package/out/src/storage/remoting/syncChunkBinary.d.ts +10 -0
- package/out/src/storage/remoting/syncChunkBinary.d.ts.map +1 -1
- package/out/src/storage/remoting/syncChunkBinary.js +15 -11
- package/out/src/storage/remoting/syncChunkBinary.js.map +1 -1
- package/out/src/storage/schema/KnexMigrations.d.ts +1 -0
- package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
- package/out/src/storage/schema/KnexMigrations.js +26 -4
- package/out/src/storage/schema/KnexMigrations.js.map +1 -1
- package/out/src/storage/sync/liveSyncGuards.d.ts +11 -0
- package/out/src/storage/sync/liveSyncGuards.d.ts.map +1 -0
- package/out/src/storage/sync/liveSyncGuards.js +22 -0
- package/out/src/storage/sync/liveSyncGuards.js.map +1 -0
- package/out/src/utility/actionOutputAuthorizations.d.ts +10 -0
- package/out/src/utility/actionOutputAuthorizations.d.ts.map +1 -0
- package/out/src/utility/actionOutputAuthorizations.js +25 -0
- package/out/src/utility/actionOutputAuthorizations.js.map +1 -0
- package/out/src/utility/index.all.d.ts +1 -0
- package/out/src/utility/index.all.d.ts.map +1 -1
- package/out/src/utility/index.all.js +1 -0
- package/out/src/utility/index.all.js.map +1 -1
- package/out/src/utility/index.client.d.ts +1 -0
- package/out/src/utility/index.client.d.ts.map +1 -1
- package/out/src/utility/index.client.js +1 -0
- package/out/src/utility/index.client.js.map +1 -1
- package/out/src/utility/numericTotalOutputs.d.ts +7 -0
- package/out/src/utility/numericTotalOutputs.d.ts.map +1 -0
- package/out/src/utility/numericTotalOutputs.js +15 -0
- package/out/src/utility/numericTotalOutputs.js.map +1 -0
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +2 -0
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/package.json +18 -22
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,189 @@ This document captures the history of significant changes to the wallet-toolbox
|
|
|
4
4
|
The git commit history contains the details but is unable to draw
|
|
5
5
|
attention to changes that materially alter behavior or extend functionality.
|
|
6
6
|
|
|
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`). Like
|
|
15
|
+
TTN, the default regtest services use Arcade as broadcaster and Merkle-path
|
|
16
|
+
provider and register no legacy ARC fallback; like `tstn`, no WhatsOnChain
|
|
17
|
+
provider is registered.
|
|
18
|
+
- Header proof-of-work and chain-work checks take an optional `chain`, and the
|
|
19
|
+
new `proofOfWorkLimitBits(chain)` reports the limit it selects. Only
|
|
20
|
+
`regtest` raises it, to `0x207fffff`. Every other chain, and every check that
|
|
21
|
+
names no chain, keeps the mainnet limit of `0x1d00ffff`, so no existing
|
|
22
|
+
validation is relaxed. Every ChainTracks client, storage, ingestor, bulk-file
|
|
23
|
+
path and Monitor header check now passes its configured chain.
|
|
24
|
+
- `tstn` is unchanged: it keeps go-chaincfg's `TeraScalingTestNetParams`
|
|
25
|
+
genesis and proof-of-work limit. A deployment that runs regtest parameters
|
|
26
|
+
should configure `regtest`, not `tstn`.
|
|
27
|
+
- A WhatsOnChain instance for a network with no WhatsOnChain service (`tstn`,
|
|
28
|
+
`regtest`) now refuses every request (`isAvailable` is `false`) instead of
|
|
29
|
+
sending it to a relative URL, which a browser resolves against the page's
|
|
30
|
+
origin. `Services.hashToHeader` no longer falls back to WhatsOnChain on those
|
|
31
|
+
networks, so their headers come only from ChainTracks.
|
|
32
|
+
- `WalletPermissionsManager` passes `signAction` through the permission modules
|
|
33
|
+
that handled the action's `createAction`, both for a caller's `signAction`
|
|
34
|
+
and for the signing step of a one-call `createAction`. Modules receive it via
|
|
35
|
+
`onRequest` and `onResponse` with method `signAction` and may add `spends`
|
|
36
|
+
for inputs they supplied. Both calls carry `action` (`reference`, the
|
|
37
|
+
signable `transaction`, `noSend` and `createArgs`, the `createAction`
|
|
38
|
+
arguments as the modules returned them), so a module keeps no state between
|
|
39
|
+
`createAction` and `signAction`. A module request failure aborts the action; a
|
|
40
|
+
module response failure is thrown without aborting the signed action. A
|
|
41
|
+
module that rejects unknown methods must accept `signAction`.
|
|
42
|
+
- `encryptMetadata(wallet, plaintext, originator?)` and
|
|
43
|
+
`maybeDecryptMetadata(wallet, value, originator?)` are exported. They encrypt
|
|
44
|
+
and decrypt metadata as a permissions manager with `encryptWalletMetadata`
|
|
45
|
+
does, so a permission module can store and read its own baskets' custom
|
|
46
|
+
instructions through the underlying wallet. The manager uses the same
|
|
47
|
+
functions.
|
|
48
|
+
- `createAction` encrypts P-basket output custom instructions after the
|
|
49
|
+
permission modules run, as `internalizeAction` already does, so instructions a
|
|
50
|
+
module adds or replaces are stored encrypted.
|
|
51
|
+
- New `listOutputs` special operation `specOpBasketPrefixOutputs`: with a
|
|
52
|
+
basket namespace such as `p color` in tag 0, it lists outputs from every
|
|
53
|
+
basket in that namespace that are unspent or reserved as an input of a
|
|
54
|
+
pending action (`spendable` false), ordered by txid and vout. Spent outputs
|
|
55
|
+
are excluded. The permissions manager reserves it for the admin originator.
|
|
56
|
+
- `listOutputs` rejects a `balance p <module> <basket>` query with
|
|
57
|
+
`WERR_INVALID_PARAMETER`, as BRC-112 requires: the satoshi sum of a BRC-99
|
|
58
|
+
module basket is never reported past its module. `balance <basket>` on other
|
|
59
|
+
baskets is unchanged, and a module may offer `p <module> balance <basket>`.
|
|
60
|
+
- `WalletPermissionsManager.getVersion` advertises the BRC-205 capability
|
|
61
|
+
attributes of the configured permission modules: a `PermissionsModule` may
|
|
62
|
+
declare `capabilities` (attribute key to value), appended to the underlying
|
|
63
|
+
version string as `base; key=value;` in scheme-id and key order, merged with
|
|
64
|
+
attributes the wallet already reports and never repeating a key. The built-in
|
|
65
|
+
BRC-177 module advertises `brc177-nosend=2`. `withBrc205Capabilities` is
|
|
66
|
+
exported.
|
|
67
|
+
- `createAction` locks the known inputs it marks spent on MySQL and Postgres,
|
|
68
|
+
so of two concurrent actions spending the same input, the second sees it spent
|
|
69
|
+
and fails with the existing double-spend or unspendable-input error instead of
|
|
70
|
+
overwriting `spentBy`. SQLite and IndexedDB already serialize these writes.
|
|
71
|
+
- Callers that count `listOutputs` results narrow `totalOutputs` to a number
|
|
72
|
+
with the exported `numericTotalOutputs`, following the `@bsv/sdk` change that
|
|
73
|
+
lets BRC-112 module balance queries return decimal text.
|
|
74
|
+
- `@bsv/sdk` 4.0.0 is accepted as a peer alongside the existing 2.x and 3.x
|
|
75
|
+
ranges.
|
|
76
|
+
|
|
77
|
+
## wallet-toolbox 2.14.10
|
|
78
|
+
|
|
79
|
+
- Live `syncToWriter` / `syncFromReader` compare reader and writer
|
|
80
|
+
`TableSettings.chain` before any chunk moves and throw `WERR_NETWORK_CHAIN`
|
|
81
|
+
on mismatch. The class remains a public sdk export with its deserializer and
|
|
82
|
+
JSON round-trip. Portable BRC-38 import still throws a generic `Error`.
|
|
83
|
+
Custom `processSyncChunk` writers may set `ProcessSyncChunkResult.error`;
|
|
84
|
+
both live-sync loops throw that error and stop. First-party providers still
|
|
85
|
+
throw. No API or schema migration is required.
|
|
86
|
+
|
|
87
|
+
## wallet-toolbox 2.14.9
|
|
88
|
+
|
|
89
|
+
- Complete per-transaction broadcast results when the refreshed request is
|
|
90
|
+
already `unmined` or `completed`, preserving that durable state. Successful
|
|
91
|
+
first receipt without a mining proof no longer throws an internal unknown
|
|
92
|
+
status error on shared storage or when another worker advances the request.
|
|
93
|
+
Negative broadcast results and competing-transaction evidence remain negative;
|
|
94
|
+
they do not authorize recipient output credit. Repeated successful receipt
|
|
95
|
+
remains idempotent, and valid mined payments retain the proof path.
|
|
96
|
+
- SQL storage uses a durable, leased user/TXID receipt claim to keep a second
|
|
97
|
+
pod from crediting a pending first receipt. Completed claims remain as
|
|
98
|
+
coordination keys; expired claims can be recovered, and an old owner cannot
|
|
99
|
+
finalize after its claim is replaced. The migration preserves historical
|
|
100
|
+
transactions and outputs, including duplicates. No API or wire migration.
|
|
101
|
+
Back up and preflight SQL storage, then coordinate all storage instances in
|
|
102
|
+
the protected rollout; this source candidate does not deploy hosted storage.
|
|
103
|
+
|
|
104
|
+
## wallet-toolbox 2.14.8
|
|
105
|
+
|
|
106
|
+
- `WalletPermissionsManager.internalizeAction` stores basket `customInstructions`
|
|
107
|
+
with one metadata encryption when `encryptWalletMetadata` is enabled.
|
|
108
|
+
A normal basket on a call that also carries a registered `p <scheme>` label
|
|
109
|
+
was encrypted before the permission module ran and again afterwards, so
|
|
110
|
+
`listOutputs` (which decrypts once) returned ciphertext. The after-module
|
|
111
|
+
pass now encrypts only permission-module baskets, matching `createAction`'s
|
|
112
|
+
once-only rule.- Preserve bounded pre-construction double-spend reviews from remote storage.
|
|
113
|
+
An empty attempted TXID is accepted only with one doubleSpend result, empty
|
|
114
|
+
send results, absent constructed-action fields and nonempty competing evidence.
|
|
115
|
+
Consumers must validate the evidence and synchronize the winning transaction
|
|
116
|
+
before rebuilding a save. The existing JSON transport carries this evidence;
|
|
117
|
+
binary wire framing is unchanged. No database or call migration is required.
|
|
118
|
+
|
|
119
|
+
- Confirmed `internalizeAction` resolves the block header before the storage
|
|
120
|
+
writer opens. IndexedDB otherwise finished that transaction during the
|
|
121
|
+
asynchronous lookup and rejected a valid mined payment before storing the
|
|
122
|
+
proven transaction, transaction, or requested output. A missing or malformed
|
|
123
|
+
header, or an invalid proof, still rejects with no partial records. Upgrade
|
|
124
|
+
the active storage implementation, including the browser client; no API, wire,
|
|
125
|
+
or schema migration is required.
|
|
126
|
+
|
|
127
|
+
- Restart-safe WAB registration checkpoints preserve the original wallet root
|
|
128
|
+
across interrupted faucet redemption and UMP publication. Persist through
|
|
129
|
+
`pendingRegistrationTokenSaver`, reload with `loadPendingRegistrationToken`
|
|
130
|
+
before authentication, and retain the checkpoint until an authenticated
|
|
131
|
+
snapshot is saved and `hasPendingRegistrationToken()` returns false. Recover
|
|
132
|
+
older pending registrations without checkpoints using their original wallet
|
|
133
|
+
state. WAB wire behavior is unchanged.
|
|
134
|
+
|
|
135
|
+
- Profile additions and deletions change the local list only when the replacement
|
|
136
|
+
UMP token is published. Failed factor retrieval or publication preserves the
|
|
137
|
+
list for retry. A failed active-profile deletion attempts to restore that
|
|
138
|
+
profile without masking the update error.
|
|
139
|
+
- Concurrent profile creation reserves case-insensitive names until the attempt
|
|
140
|
+
settles, preventing duplicate names while preserving retry after failure.
|
|
141
|
+
- If restoring the active wallet fails after publication, the committed token
|
|
142
|
+
and profile list remain in place. Inspect `listProfiles()` before retrying.
|
|
143
|
+
The underlying factor-decryption failure still requires separate diagnosis.
|
|
144
|
+
|
|
145
|
+
## wallet-toolbox 2.14.7
|
|
146
|
+
|
|
147
|
+
- Internalization broadcasts unproven transactions new to the receiving user,
|
|
148
|
+
including shared-storage no-send payments. A rejected broadcast stores no
|
|
149
|
+
recipient outputs; proven transactions are not rebroadcast. Upgrade active
|
|
150
|
+
storage; no API, wire or schema migration is required.
|
|
151
|
+
|
|
152
|
+
- IndexedDB empty certificate certifier/type, transaction status and output-tag
|
|
153
|
+
ID arrays mean no optional filter, matching Knex. Nonempty arrays, partial
|
|
154
|
+
predicates and user ownership remain enforced; no schema migration is required.
|
|
155
|
+
|
|
156
|
+
- BEEF requests and schema-declared storage response bytes use the existing
|
|
157
|
+
negotiated compact binary JSON codec. Legacy peers retain numeric-array
|
|
158
|
+
JSON and identical transaction/proof bytes. Existing authentication and
|
|
159
|
+
payload ceilings remain unchanged; no API or database migration is required.
|
|
160
|
+
|
|
161
|
+
- BRC-177 anchors cover both the protected action and an economic reclaim.
|
|
162
|
+
Protected actions keep their only managed input bound to the named anchor,
|
|
163
|
+
create no wallet change, and pay the bounded reclaim surplus as miner fee.
|
|
164
|
+
Ordinary actions retain their existing change planning. No API, wire or
|
|
165
|
+
database migration is required.
|
|
166
|
+
|
|
167
|
+
## wallet-toolbox 2.14.6
|
|
168
|
+
|
|
169
|
+
- UMP support pins anchor verified update lineage. Password and token updates
|
|
170
|
+
supersede the pinned predecessor, including multi-hop updates and recovery-hash
|
|
171
|
+
continuity. Unrelated historical continuations cannot override the anchor.
|
|
172
|
+
Competing descendants remain indeterminate rather than falling back to a spent
|
|
173
|
+
pin. No API or schema migration is required.
|
|
174
|
+
|
|
175
|
+
- Every retained token spend proves control through its unlocking script,
|
|
176
|
+
including confirmed updates and presentation/recovery-hash rotation. Funding
|
|
177
|
+
paths do not establish a token-update lineage.
|
|
178
|
+
|
|
179
|
+
- Explicit overlay history is linked past confirmed Merkle anchors. Deploy the
|
|
180
|
+
UMP history decider and engine retention fix with this client patch; missing
|
|
181
|
+
pin ancestry remains indeterminate rather than selecting an unrelated continuation.
|
|
182
|
+
|
|
183
|
+
- WAB faucet redemption accepts the local signer's independently validated
|
|
184
|
+
service charge and derived change, with exact SDK transaction binding. Empty
|
|
185
|
+
wallets no longer reject legitimate fee outputs financed by the faucet input.
|
|
186
|
+
Upgrade the SDK alongside the toolbox to enable the new capability. Older SDK
|
|
187
|
+
peers retain strict behavior; serialization discards local output authority.
|
|
188
|
+
Signup interruption/retry persistence remains unchanged.
|
|
189
|
+
|
|
7
190
|
## wallet-toolbox 2.14.5
|
|
8
191
|
|
|
9
192
|
- `WalletPermissionsManager` retires no-send transaction ownership and reference
|
package/README.md
CHANGED
|
@@ -6,6 +6,30 @@
|
|
|
6
6
|
|
|
7
7
|
A [BRC-100](https://github.com/bitcoin-sv/BRCs/blob/master/wallet/0100.md) conforming wallet implementation for the BSV blockchain, built on the [BSV SDK](https://bsv-blockchain.github.io/ts-stack/packages/sdk/). Provides persistent storage, protocol-based key derivation, transaction monitoring, chain tracking, and signing — everything needed to build wallet-powered applications on BSV.
|
|
8
8
|
|
|
9
|
+
## Receiving already-broadcast payments
|
|
10
|
+
|
|
11
|
+
The 2.14.9 source candidate completes broadcast results even when storage
|
|
12
|
+
already marks the request `unmined` or `completed`. This fixes first receipt
|
|
13
|
+
without a mining proof on shared storage, and the same result path when another
|
|
14
|
+
storage worker advances the request before the broadcast result refresh. The
|
|
15
|
+
stored advanced state remains intact; unsuccessful provider results still
|
|
16
|
+
reject receipt and do not credit new recipient outputs. Repeated successful
|
|
17
|
+
receipt remains idempotent. A payment carrying its valid mining proof follows
|
|
18
|
+
the existing proof path without rebroadcast.
|
|
19
|
+
|
|
20
|
+
SQL storage now serializes receipt ownership across independent processes
|
|
21
|
+
through a durable user/TXID claim. The migration preserves legacy transaction
|
|
22
|
+
and output rows, including historical duplicates, while adding the claim table.
|
|
23
|
+
Ambiguous historical receipts still require separate reconciliation; this
|
|
24
|
+
change prevents a new same-recipient overlap from creating another local credit.
|
|
25
|
+
Back up and preflight the database before rollout, then upgrade all storage
|
|
26
|
+
instances together; an older instance can bypass the new receipt claim.
|
|
27
|
+
Pending claims recover after their database-timed lease expires. No
|
|
28
|
+
public API or wire migration is required. Browser IndexedDB does not use the
|
|
29
|
+
SQL receipt claim. Source versions are candidates until published through the
|
|
30
|
+
protected release workflow; upgrading an app alone does not upgrade its remote
|
|
31
|
+
storage server.
|
|
32
|
+
|
|
9
33
|
## Backup and recovery: keep both keys and wallet data
|
|
10
34
|
|
|
11
35
|
**A root key or seed alone is not a complete BRC-100 wallet backup.** Users
|
|
@@ -372,6 +396,22 @@ retained privately, outside this repository.
|
|
|
372
396
|
page for both Knex and IndexedDB storage, including short final pages and pages
|
|
373
397
|
requested at or past the end of the result set.
|
|
374
398
|
|
|
399
|
+
### Profile update failures
|
|
400
|
+
|
|
401
|
+
`CWIStyleWalletManager.addProfile` and `deleteProfile` commit the local profile
|
|
402
|
+
list when the replacement UMP token is published. A factor-decryption or
|
|
403
|
+
publication failure preserves the previous list, so a failed creation can be
|
|
404
|
+
retried with the same name. Concurrent creations reserve names without regard
|
|
405
|
+
to case until each attempt settles. A failed deletion of the active profile
|
|
406
|
+
attempts to restore that profile and preserves the original update error if
|
|
407
|
+
restoration also fails.
|
|
408
|
+
|
|
409
|
+
Restoring the active wallet can fail after publication has succeeded. In that
|
|
410
|
+
case, the token and profile list already contain the change, and the default
|
|
411
|
+
profile may remain active. Inspect `listProfiles()` before retrying and switch
|
|
412
|
+
to an available profile as needed. This bookkeeping fix does not correct the
|
|
413
|
+
underlying factor-decryption error; diagnose that error separately.
|
|
414
|
+
|
|
375
415
|
### UMP account continuity and phone changes
|
|
376
416
|
|
|
377
417
|
Argon2id password derivation uses a proven-ready host backend when one is
|
|
@@ -395,11 +435,24 @@ WebAssembly global is absent. Native and JavaScript results both pass the same
|
|
|
395
435
|
byte-type and exact-length validation.
|
|
396
436
|
|
|
397
437
|
`WalletAuthenticationManager` accepts an optional `umpTokenOutpoint` in the
|
|
398
|
-
backward-compatible WAB authentication response.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
438
|
+
backward-compatible WAB authentication response. When verified lookup returns
|
|
439
|
+
competing records, the pin anchors its own update lineage. A password or token
|
|
440
|
+
update that consumes the pinned outpoint supersedes it, including a multi-hop
|
|
441
|
+
update whose old pin is available only in authenticated token ancestry.
|
|
442
|
+
Each token input must prove spend authorization, including across confirmation;
|
|
443
|
+
ordinary funding inputs do not establish token lineage. Unmined updates also
|
|
444
|
+
require complete funding ancestry. A truncated input reference cannot override
|
|
445
|
+
the verified pin. An unrelated historical continuation
|
|
446
|
+
cannot override that lineage. A pin cannot
|
|
447
|
+
introduce an unverified token or resolve competing descendants of a spent pin.
|
|
448
|
+
Clients link explicit overlay history past confirmed Merkle anchors. UMP hosts
|
|
449
|
+
must request retained token lineage with a history decider and preserve it in
|
|
450
|
+
lookup BEEF (`@bsv/overlay` 2.6.4 and `@bsv/overlay-topics` 2.0.1, or equivalent
|
|
451
|
+
custom hosting). If an older host names an absent pin but omits its authenticated
|
|
452
|
+
source, lookup remains indeterminate instead of choosing an unrelated continuation.
|
|
453
|
+
Ordinary lineage resolution still applies when no pin relationship is present.
|
|
454
|
+
Operators should clear redundant pins after unpinned lookup independently returns
|
|
455
|
+
the correct current token; pinning is a recovery measure for remaining forks.
|
|
403
456
|
|
|
404
457
|
UMP renewal consumes only the exact canonical predecessor returned for its
|
|
405
458
|
outpoint. Its signed fields, presentation/recovery hashes, and locally derived
|
|
@@ -413,21 +466,49 @@ response must contain the exact declared Atomic BEEF target and output zero must
|
|
|
413
466
|
commit to the supplied nonzero R-puzzle scalar. The manager signs that outpoint
|
|
414
467
|
at its actual wallet input index and sends the fee-adjusted balance only to an
|
|
415
468
|
explicit BRC-29 output derived for the authenticated wallet. That output's exact
|
|
416
|
-
script and bounded amount are authorized before signing
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
469
|
+
script and bounded amount are authorized before signing. With a compatible SDK,
|
|
470
|
+
its local signer also authorizes independently validated storage commission and
|
|
471
|
+
locally derived change, bound to exact output indices, scripts and amounts. The
|
|
472
|
+
permissions wrapper preserves this private decision; serialized results or
|
|
473
|
+
unknown wallet adapters do not gain this authority. Other unrequested outputs
|
|
474
|
+
cannot consume the faucet input.
|
|
475
|
+
|
|
476
|
+
Upgrade wallet-toolbox to 2.14.6 and the SDK to a release exposing
|
|
477
|
+
`completeBoundAction.outputAuthorizationVersion=1` together. Older SDK peers retain
|
|
478
|
+
the existing strict behavior and cannot redeem a fee-bearing faucet input for an
|
|
479
|
+
empty wallet. Main currently carries the separate SDK3.1 candidate; SDK2 hosts
|
|
480
|
+
need an additive backport or the documented SDK3 migration.
|
|
481
|
+
|
|
482
|
+
The signed action is staged locally, labeled, and recorded in a recovery basket
|
|
483
|
+
before broadcast. Internalization clears the output's custom instructions, and
|
|
484
|
+
standard `listActions` does not return them. A retry with the same wallet root
|
|
485
|
+
can recover the prior faucet action; missing, substituted, ambiguous, or
|
|
486
|
+
result-only recovery evidence fails closed. Preserve the wallet's storage when
|
|
487
|
+
reconciling an interrupted signup.
|
|
488
|
+
|
|
489
|
+
For restart-safe WAB registrations, store an unpublished UMP token checkpoint
|
|
490
|
+
before faucet redemption. Pass `pendingRegistrationTokenSaver` in
|
|
491
|
+
`WalletAuthenticationManagerOptions` and synchronously verify that the token
|
|
492
|
+
bytes are stored before the callback resolves. On app restart, call
|
|
493
|
+
`loadPendingRegistrationToken(bytes)` before starting authentication. The token
|
|
494
|
+
contains encrypted UMP fields and no plaintext wallet root, snapshot key, or on-chain
|
|
495
|
+
outpoint. Keep it through failed funding and logout; clear it only after a
|
|
496
|
+
successful authenticated snapshot has been stored and
|
|
497
|
+
`hasPendingRegistrationToken()` returns false. If an older pending WAB
|
|
498
|
+
registration has no checkpoint, the manager refuses to redeem its faucet output
|
|
499
|
+
again. Recover that registration using its original wallet state instead of
|
|
500
|
+
creating a new root. A checkpoint for another presentation key does not block
|
|
501
|
+
login to an already published wallet; retain that checkpoint until its own
|
|
502
|
+
registration is reconciled.
|
|
503
|
+
|
|
504
|
+
A WAB that advertises `registrationStatus: "pending"` lets a verified retry
|
|
505
|
+
reuse the stored presentation key when a clean UMP lookup confirms that
|
|
506
|
+
publication has not happened. The loaded checkpoint reconstructs the original
|
|
507
|
+
root, so the wallet can recover its prior faucet action. After publishing the
|
|
508
|
+
UMP token, the manager finalizes WAB idempotently. A lost finalization response
|
|
509
|
+
is non-fatal: the next verified login finds the published token and repairs the
|
|
510
|
+
pending state. Missing or invalid lifecycle metadata remains fail-closed for
|
|
511
|
+
established accounts; WAB wire behavior is unchanged.
|
|
431
512
|
|
|
432
513
|
Authenticated applications can verify a phone number and roll the presentation
|
|
433
514
|
key, including when the user enters the same phone number:
|
|
@@ -506,11 +587,22 @@ synchronized tracker can continue serving its last-good checked data during a
|
|
|
506
587
|
provider outage. WhatsOnChain remains a mainnet/testnet fallback and anonymous
|
|
507
588
|
requests are serialized below its documented public rate.
|
|
508
589
|
|
|
509
|
-
The supported chain identifiers are `main`, `test`, `stn`, `ttn`,
|
|
510
|
-
(`mock` remains available for test utilities). STN
|
|
511
|
-
not have operator-independent public endpoints: set
|
|
512
|
-
`TSTN_CHAINTRACKS_URL`,
|
|
513
|
-
|
|
590
|
+
The supported chain identifiers are `main`, `test`, `stn`, `ttn`, `tstn`, and
|
|
591
|
+
`regtest` (`mock` remains available for test utilities). STN, Terra Scaling
|
|
592
|
+
TestNet, and regtest do not have operator-independent public endpoints: set
|
|
593
|
+
`STN_CHAINTRACKS_URL`, `TSTN_CHAINTRACKS_URL`, or `REGTEST_CHAINTRACKS_URL`, use
|
|
594
|
+
the matching Arcade environment variable, or inject an explicit
|
|
595
|
+
`ChaintracksClientApi`. Like TTN, the default regtest services use Arcade
|
|
596
|
+
(`REGTEST_ARCADE_URL`) as broadcaster and Merkle-path provider and register no
|
|
597
|
+
legacy ARC fallback.
|
|
598
|
+
|
|
599
|
+
`regtest` is Teranode's regression network (go-chaincfg `RegressionNetParams`):
|
|
600
|
+
the canonical regtest genesis header and a proof-of-work limit of `0x207fffff`.
|
|
601
|
+
Only a caller that names `regtest` gets that limit; every other chain, and every
|
|
602
|
+
header check that names no chain, keeps the mainnet limit of `0x1d00ffff`.
|
|
603
|
+
Regtest proof of work costs nothing to produce, so a regtest wallet trusts its
|
|
604
|
+
ChainTracks service for the header chain. Use it for private test deployments
|
|
605
|
+
only. URLs ending in `/v2` use the reconnecting
|
|
514
606
|
go-chaintracks client; existing legacy v1 URLs and explicit clients remain
|
|
515
607
|
compatible. Browser and mobile distributions expose the same fetch/SSE client
|
|
516
608
|
without Node `Buffer` or filesystem dependencies.
|
|
@@ -1122,3 +1214,13 @@ for the full stack-wide policy.
|
|
|
1122
1214
|
This package is released under the [Open BSV License Version 6](./LICENSE.txt).
|
|
1123
1215
|
The accompanying [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) and
|
|
1124
1216
|
[LICENSES/](./LICENSES/) preserve the package's earlier Open BSV grant.
|
|
1217
|
+
|
|
1218
|
+
## Pre-construction conflict recovery
|
|
1219
|
+
|
|
1220
|
+
The 2.14.7 candidate preserves remote storage's empty attempted-TXID sentinel
|
|
1221
|
+
only for a bounded double-spend review before transaction construction. It does
|
|
1222
|
+
not authorize a retry. Applications must verify complete competing transactions
|
|
1223
|
+
against the requested explicit inputs, synchronize the accepted winner, then
|
|
1224
|
+
read fresh state before rebuilding. Upgrade the application SDK alongside the
|
|
1225
|
+
wallet parser. Use the existing JSON wallet API for structured review errors;
|
|
1226
|
+
the binary wire format is unchanged. No database or call migration is required.
|