@smartledger/bsv 9.24.0 → 9.25.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 +63 -2
- package/README.md +19 -19
- package/bsv-gdaf.min.js +1 -1
- package/bsv-smartcontract.min.js +1 -1
- package/bsv.bundle.js +2 -2
- package/bsv.min.js +2 -2
- package/docs/AUDIT_SCOPE.md +6 -6
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/audit-rfq/cure53.txt +1 -1
- package/docs/audit-rfq/ncc-group.txt +1 -1
- package/docs/audit-rfq/trail-of-bits.txt +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/lib/notaryhash/index.js +55 -8
- package/package.json +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,62 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [9.25.0] - 2026-10-07
|
|
11
|
+
|
|
12
|
+
Two claims a certificate can carry that this library does not verify, and answered `valid` about
|
|
13
|
+
anyway. Both found by the **block-penn-station session's differential fuzz** — 3,573 inputs, our
|
|
14
|
+
`examples/gateway` adapter against an independent Python verifier written from the NotaryHash spec
|
|
15
|
+
rather than from our code. Same verdict on 3,137 of them; the disagreements were ours.
|
|
16
|
+
|
|
17
|
+
### Fixed — `anchor.seal` was not verified, and a certificate carrying one still verified
|
|
18
|
+
|
|
19
|
+
A sealed record asserts it is the **one successor** of another: its transaction spends a
|
|
20
|
+
one-satoshi seal output of the predecessor's transaction, and an output is spent once. That is
|
|
21
|
+
checked by `@smartledger/notaryhash` (`verifySealedLink`, their SPEC 5b). **This library implements
|
|
22
|
+
none of it**, and verified the 1.0 parts of such a certificate and answered `valid` — presenting an
|
|
23
|
+
unchecked chain-of-custody claim as verified.
|
|
24
|
+
|
|
25
|
+
319 fuzz inputs with a damaged seal verified here, including:
|
|
26
|
+
|
|
27
|
+
- a certificate relabelled as the successor of a record it is not, naming a transaction its own
|
|
28
|
+
transaction does not spend;
|
|
29
|
+
- a seal signature of 64 zero bytes;
|
|
30
|
+
- a seal replaced by `true`, `"x"` or `[]`;
|
|
31
|
+
- the **first** record of a chain given an invented predecessor.
|
|
32
|
+
|
|
33
|
+
Their verifier and the notaryhash SDK refuse every one. A certificate carrying `anchor.seal` is now
|
|
34
|
+
refused, with `opts.allowUncheckedSeal` for a caller that wants the 1.0 verdict and will check the
|
|
35
|
+
seal itself. An absent or `null` seal is no claim and is unaffected.
|
|
36
|
+
|
|
37
|
+
### Fixed — a false `anchor.blockHeight` verified when `spv.blockHeight` was null
|
|
38
|
+
|
|
39
|
+
`anchor.blockHeight` was compared with `spv.blockHeight` **only when both were present**, so nulling
|
|
40
|
+
or deleting `spv.blockHeight` removed the only value it was ever checked against. A certificate
|
|
41
|
+
claiming `anchor.blockHeight: 1` then verified against a mainnet block at height 970038 — the height
|
|
42
|
+
was bound to nothing. `anchor.blockTime` was still checked, so this was the height alone.
|
|
43
|
+
|
|
44
|
+
A present `anchor.blockHeight` must now be **checkable**: if the SPV envelope does not say which
|
|
45
|
+
height it proves, the claim is refused rather than skipped. Introduced in 9.20.0 with the rest of
|
|
46
|
+
the anchor checks; the guard was written as a consistency test when it needed to be a coverage test.
|
|
47
|
+
|
|
48
|
+
### Fixed — `examples/gateway` broke its own three-state contract
|
|
49
|
+
|
|
50
|
+
The adapter returned `invalid` for a certificate with **no `spv` member**. The service issues
|
|
51
|
+
certificates in that state and fills the envelope when a block arrives, so "there is no proof of
|
|
52
|
+
inclusion yet" is `indeterminate` — the same "I could not look" the file spends two paragraphs
|
|
53
|
+
insisting on. It now returns `indeterminate` and says to re-fetch.
|
|
54
|
+
|
|
55
|
+
The adapter also enumerated the two options it knew about when calling `NotaryHash.verify` and
|
|
56
|
+
dropped everything else, which silently disabled `allowUncheckedSeal` and `allowUnknownSpvFormat`
|
|
57
|
+
for its callers. It forwards them now.
|
|
58
|
+
|
|
59
|
+
### The common rule
|
|
60
|
+
|
|
61
|
+
Both library fixes are the one adopted in 9.24.0 for `spv.format`: **verifying a proof is not
|
|
62
|
+
accepting a self-described certificate.** A statement the verifier never read cannot be covered by a
|
|
63
|
+
verdict of `valid`. Each refusal has an opt-out, because a caller that checks the claim by other
|
|
64
|
+
means should not be blocked by our inability to check it.
|
|
65
|
+
|
|
10
66
|
## [9.24.0] - 2026-10-07
|
|
11
67
|
|
|
12
68
|
### Changed — a certificate whose `spv.format` is not TSC is now refused
|
|
@@ -39,8 +95,13 @@ fold is needed to reach it.
|
|
|
39
95
|
- `opts.allowUnknownSpvFormat` accepts it anyway, for a caller that knows the label is wrong and
|
|
40
96
|
does not care.
|
|
41
97
|
|
|
42
|
-
|
|
43
|
-
|
|
98
|
+
**Correction to this entry, same day.** It first said the real repair was to bring the field under
|
|
99
|
+
the signature. That is impossible, and the notaryhash service session was right to say so: the SPV
|
|
100
|
+
envelope does not exist until the block does and is replaced after a reorganisation, so no key that
|
|
101
|
+
signed the record can ever cover it. Everything under `spv` and `anchor` is unsigned **by
|
|
102
|
+
construction**. The remedy is therefore not a signature but what this check does — decline to
|
|
103
|
+
return a verdict about evidence we did not read — and, better, to say what *was* checked, which is
|
|
104
|
+
why `proofIntegrity` stays `true` here.
|
|
44
105
|
|
|
45
106
|
### Added — the service's tamper vector, vendored
|
|
46
107
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Bitcoin SV library with an interpreter-verified script engine.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@smartledger/bsv)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](STABILITY.md)
|
|
8
8
|
|
|
@@ -155,44 +155,44 @@ const bsv = require('@smartledger/bsv') // 128 modules
|
|
|
155
155
|
### **Core Modules**
|
|
156
156
|
| Module | Size | Use Case | CDN |
|
|
157
157
|
|--------|------|----------|-----|
|
|
158
|
-
| **bsv.min.js** | 1070KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@9.
|
|
159
|
-
| **bsv.bundle.js** | 1070KB | Everything in one file | `unpkg.com/@smartledger/bsv@9.
|
|
158
|
+
| **bsv.min.js** | 1070KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@9.25.0/bsv.min.js` |
|
|
159
|
+
| **bsv.bundle.js** | 1070KB | Everything in one file | `unpkg.com/@smartledger/bsv@9.25.0/bsv.bundle.js` |
|
|
160
160
|
|
|
161
161
|
### **W3C Verifiable Credentials**
|
|
162
162
|
| Module | Size | Use Case | CDN |
|
|
163
163
|
|--------|------|----------|-----|
|
|
164
|
-
| **🟢 bsv-didweb.min.js** | 166KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@9.
|
|
165
|
-
| **🟢 bsv-vcjwt.min.js** | 166KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@9.
|
|
166
|
-
| **🟢 bsv-statuslist.min.js** | 256KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@9.
|
|
167
|
-
| **🟢 bsv-anchor.min.js** | 164KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@9.
|
|
164
|
+
| **🟢 bsv-didweb.min.js** | 166KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@9.25.0/bsv-didweb.min.js` |
|
|
165
|
+
| **🟢 bsv-vcjwt.min.js** | 166KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@9.25.0/bsv-vcjwt.min.js` |
|
|
166
|
+
| **🟢 bsv-statuslist.min.js** | 256KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@9.25.0/bsv-statuslist.min.js` |
|
|
167
|
+
| **🟢 bsv-anchor.min.js** | 164KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@9.25.0/bsv-anchor.min.js` |
|
|
168
168
|
|
|
169
169
|
### **Smart Contract & Development**
|
|
170
170
|
| Module | Size | Use Case | CDN |
|
|
171
171
|
|--------|------|----------|-----|
|
|
172
|
-
| **bsv-smartcontract.min.js** | 141KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@9.
|
|
173
|
-
| **bsv-covenant.min.js** | 35KB | Covenant operations | `unpkg.com/@smartledger/bsv@9.
|
|
174
|
-
| **bsv-script-helper.min.js** | 33KB | Custom script tools | `unpkg.com/@smartledger/bsv@9.
|
|
175
|
-
| **bsv-security.min.js** | 32KB | Security enhancements | `unpkg.com/@smartledger/bsv@9.
|
|
172
|
+
| **bsv-smartcontract.min.js** | 141KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@9.25.0/bsv-smartcontract.min.js` |
|
|
173
|
+
| **bsv-covenant.min.js** | 35KB | Covenant operations | `unpkg.com/@smartledger/bsv@9.25.0/bsv-covenant.min.js` |
|
|
174
|
+
| **bsv-script-helper.min.js** | 33KB | Custom script tools | `unpkg.com/@smartledger/bsv@9.25.0/bsv-script-helper.min.js` |
|
|
175
|
+
| **bsv-security.min.js** | 32KB | Security enhancements | `unpkg.com/@smartledger/bsv@9.25.0/bsv-security.min.js` |
|
|
176
176
|
|
|
177
177
|
### **Legal & Compliance**
|
|
178
178
|
| Module | Size | Use Case | CDN |
|
|
179
179
|
|--------|------|----------|-----|
|
|
180
|
-
| **bsv-ltp.min.js** | 544KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@9.
|
|
181
|
-
| **bsv-gdaf.min.js** | 1070KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@9.
|
|
180
|
+
| **bsv-ltp.min.js** | 544KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@9.25.0/bsv-ltp.min.js` |
|
|
181
|
+
| **bsv-gdaf.min.js** | 1070KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@9.25.0/bsv-gdaf.min.js` |
|
|
182
182
|
|
|
183
183
|
### **Advanced Cryptography**
|
|
184
184
|
| Module | Size | Use Case | CDN |
|
|
185
185
|
|--------|------|----------|-----|
|
|
186
|
-
| **bsv-shamir.min.js** | 177KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@9.
|
|
186
|
+
| **bsv-shamir.min.js** | 177KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@9.25.0/bsv-shamir.min.js` |
|
|
187
187
|
|
|
188
188
|
### **Utilities**
|
|
189
189
|
| Module | Size | Use Case | CDN |
|
|
190
190
|
|--------|------|----------|-----|
|
|
191
|
-
| **bsv-ecies.min.js** | 139KB | Encryption | `unpkg.com/@smartledger/bsv@9.
|
|
192
|
-
| **bsv-message.min.js** | 34KB | Message signing | `unpkg.com/@smartledger/bsv@9.
|
|
193
|
-
| **bsv-mnemonic.min.js** | 320KB | HD wallets | `unpkg.com/@smartledger/bsv@9.
|
|
191
|
+
| **bsv-ecies.min.js** | 139KB | Encryption | `unpkg.com/@smartledger/bsv@9.25.0/bsv-ecies.min.js` |
|
|
192
|
+
| **bsv-message.min.js** | 34KB | Message signing | `unpkg.com/@smartledger/bsv@9.25.0/bsv-message.min.js` |
|
|
193
|
+
| **bsv-mnemonic.min.js** | 320KB | HD wallets | `unpkg.com/@smartledger/bsv@9.25.0/bsv-mnemonic.min.js` |
|
|
194
194
|
```html
|
|
195
|
-
<script src="https://unpkg.com/@smartledger/bsv@9.
|
|
195
|
+
<script src="https://unpkg.com/@smartledger/bsv@9.25.0/bsv.min.js"></script>
|
|
196
196
|
<script>
|
|
197
197
|
const key = bsv.PrivateKey.fromRandom()
|
|
198
198
|
</script>
|
|
@@ -240,4 +240,4 @@ MIT
|
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
|
243
|
-
**SmartLedger-BSV v9.
|
|
243
|
+
**SmartLedger-BSV v9.25.0**
|