@smartledger/bsv 9.26.0 → 9.26.1

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 CHANGED
@@ -7,6 +7,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [9.26.1] - 2026-10-07
11
+
12
+ ### Fixed — relabelling a certificate as legacy bypassed the seal refusal
13
+
14
+ `version` is not signed. The proof hash begins with the fixed bytes `"NotaryHash/1.0"` and `u8(1)`
15
+ whatever the JSON member says, so **anyone could set `version: 1` on a current sealed certificate**
16
+ and a forged seal verified as `valid` again — the refusal added in 9.25.0 was optional for an
17
+ attacker. Found by the block-penn-station session's rerun about half an hour after it shipped.
18
+
19
+ The mechanism, which is the part worth keeping:
20
+
21
+ - `Certificate.normalize` rebuilds a **legacy** anchor from a fixed key set — `type`, `network`,
22
+ `txid`, `vout`, `blockHeight`, `blockTime` — and therefore **drops `anchor.seal`**;
23
+ - `NotaryHash.verify` normalizes on the line after it records `report.legacy`, **shadowing its own
24
+ parameter**, so every downstream check — including `verifyAnchorSPV`'s own seal check — reads
25
+ normalized input whether it knows it or not;
26
+ - so the seal check could not see a seal on a legacy certificate, and the legacy path kept the
27
+ height, time and format checks while silently losing this one.
28
+
29
+ `anchor.seal` is now captured **before** the translation and the verdict accounts for it, so the
30
+ refusal holds on both paths. A genuine legacy certificate — one with no seal — verifies unchanged,
31
+ and `allowUncheckedSeal` works on both paths.
32
+
33
+ **The general rule, now in the source:** *a refusal that exists only on one normalization path is
34
+ optional whenever the caller can choose the path.* Anything under `anchor` outside that fixed key
35
+ set is in the same position and must be checked before translation.
36
+
37
+ ### And a correction to 9.26.0's release notes
38
+
39
+ 9.26.0 said `version: 1` needed no change because it is the documented 8.3.0–9.8.0 marker. The
40
+ first half stands — reading it is deliberate, and `verify` reports `legacy: true`. The conclusion
41
+ did not: an unsigned discriminator that selects a *weaker* code path is a security boundary, not a
42
+ compatibility detail, and I had checked that the legacy path was intentional without checking that
43
+ it was equally strict.
44
+
45
+ 9.26.0's replay of the vendored fixture reported zero undesigned differences while this was open,
46
+ which is true and less reassuring than it sounds: **the fixture is the set of differences as of
47
+ 9.24.0, so it cannot contain a path that first opened in 9.25.0.** Their observation, and it belongs
48
+ next to every regression fixture.
49
+
10
50
  ## [9.26.0] - 2026-10-07
11
51
 
12
52
  One rule, replacing a special case that had already caused a bug: **absent is absent, present and
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Bitcoin SV library with an interpreter-verified script engine.
4
4
 
5
- [![Version](https://img.shields.io/badge/version-9.26.0-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
5
+ [![Version](https://img.shields.io/badge/version-9.26.1-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
6
6
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
7
  [![Stability](https://img.shields.io/badge/9.x%20stable%20until-2027--09--01-brightgreen.svg)](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** | 1071KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@9.26.0/bsv.min.js` |
159
- | **bsv.bundle.js** | 1071KB | Everything in one file | `unpkg.com/@smartledger/bsv@9.26.0/bsv.bundle.js` |
158
+ | **bsv.min.js** | 1071KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@9.26.1/bsv.min.js` |
159
+ | **bsv.bundle.js** | 1071KB | Everything in one file | `unpkg.com/@smartledger/bsv@9.26.1/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.26.0/bsv-didweb.min.js` |
165
- | **🟢 bsv-vcjwt.min.js** | 166KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@9.26.0/bsv-vcjwt.min.js` |
166
- | **🟢 bsv-statuslist.min.js** | 256KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@9.26.0/bsv-statuslist.min.js` |
167
- | **🟢 bsv-anchor.min.js** | 164KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@9.26.0/bsv-anchor.min.js` |
164
+ | **🟢 bsv-didweb.min.js** | 166KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@9.26.1/bsv-didweb.min.js` |
165
+ | **🟢 bsv-vcjwt.min.js** | 166KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@9.26.1/bsv-vcjwt.min.js` |
166
+ | **🟢 bsv-statuslist.min.js** | 256KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@9.26.1/bsv-statuslist.min.js` |
167
+ | **🟢 bsv-anchor.min.js** | 164KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@9.26.1/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.26.0/bsv-smartcontract.min.js` |
173
- | **bsv-covenant.min.js** | 35KB | Covenant operations | `unpkg.com/@smartledger/bsv@9.26.0/bsv-covenant.min.js` |
174
- | **bsv-script-helper.min.js** | 33KB | Custom script tools | `unpkg.com/@smartledger/bsv@9.26.0/bsv-script-helper.min.js` |
175
- | **bsv-security.min.js** | 32KB | Security enhancements | `unpkg.com/@smartledger/bsv@9.26.0/bsv-security.min.js` |
172
+ | **bsv-smartcontract.min.js** | 141KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@9.26.1/bsv-smartcontract.min.js` |
173
+ | **bsv-covenant.min.js** | 35KB | Covenant operations | `unpkg.com/@smartledger/bsv@9.26.1/bsv-covenant.min.js` |
174
+ | **bsv-script-helper.min.js** | 33KB | Custom script tools | `unpkg.com/@smartledger/bsv@9.26.1/bsv-script-helper.min.js` |
175
+ | **bsv-security.min.js** | 32KB | Security enhancements | `unpkg.com/@smartledger/bsv@9.26.1/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.26.0/bsv-ltp.min.js` |
181
- | **bsv-gdaf.min.js** | 1071KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@9.26.0/bsv-gdaf.min.js` |
180
+ | **bsv-ltp.min.js** | 544KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@9.26.1/bsv-ltp.min.js` |
181
+ | **bsv-gdaf.min.js** | 1071KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@9.26.1/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.26.0/bsv-shamir.min.js` |
186
+ | **bsv-shamir.min.js** | 177KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@9.26.1/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.26.0/bsv-ecies.min.js` |
192
- | **bsv-message.min.js** | 34KB | Message signing | `unpkg.com/@smartledger/bsv@9.26.0/bsv-message.min.js` |
193
- | **bsv-mnemonic.min.js** | 320KB | HD wallets | `unpkg.com/@smartledger/bsv@9.26.0/bsv-mnemonic.min.js` |
191
+ | **bsv-ecies.min.js** | 139KB | Encryption | `unpkg.com/@smartledger/bsv@9.26.1/bsv-ecies.min.js` |
192
+ | **bsv-message.min.js** | 34KB | Message signing | `unpkg.com/@smartledger/bsv@9.26.1/bsv-message.min.js` |
193
+ | **bsv-mnemonic.min.js** | 320KB | HD wallets | `unpkg.com/@smartledger/bsv@9.26.1/bsv-mnemonic.min.js` |
194
194
  ```html
195
- <script src="https://unpkg.com/@smartledger/bsv@9.26.0/bsv.min.js"></script>
195
+ <script src="https://unpkg.com/@smartledger/bsv@9.26.1/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.26.0**
243
+ **SmartLedger-BSV v9.26.1**