@smartledger/bsv 9.4.0 → 9.6.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 +65 -0
- package/README.md +19 -19
- package/bsv-gdaf.min.js +2 -2
- package/bsv-ltp.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/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +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/script/interpreter.js +35 -4
- package/package.json +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,71 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [9.6.0] - 2026-09-02
|
|
11
|
+
|
|
12
|
+
### Fixed — a post-Genesis `OP_CHECKMULTISIG` was refused by a cap the era removed
|
|
13
|
+
|
|
14
|
+
There are two op-count checks. The one in `step()` became era-derived; the one
|
|
15
|
+
inside `OP_CHECKMULTISIG`, which adds the key count, kept reading the static. So
|
|
16
|
+
this ran immediately after the line allowing up to `UINT32_MAX` keys after Genesis:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
this.nOpCount += nKeysCount
|
|
20
|
+
if (this.nOpCount > Interpreter.MAX_OPS_PER_SCRIPT) { // 500, whatever the era
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
A post-Genesis multisig with more keys than the **pre-Genesis** limit therefore
|
|
24
|
+
returned `SCRIPT_ERR_OP_COUNT`, while `maxPubKeysPerMultisig()` had just permitted
|
|
25
|
+
it and `maxOpsPerScript()` reported no cap at all. A validator **stricter** than
|
|
26
|
+
consensus, which the flag docblocks in that same file name as being as wrong as a
|
|
27
|
+
loose one and much harder to notice.
|
|
28
|
+
|
|
29
|
+
No vector could catch it: every `OP_COUNT` vector in the node's corpus is
|
|
30
|
+
pre-Genesis, where the static and the era agree. Same shape as 9.4.0 and 9.5.0 —
|
|
31
|
+
the mechanism was covered, the era selection was not.
|
|
32
|
+
|
|
33
|
+
Found while porting the era machinery to `smartledger-bsv-core`, which carried the
|
|
34
|
+
same line; fixed in both.
|
|
35
|
+
|
|
36
|
+
## [9.5.0] - 2026-09-02
|
|
37
|
+
|
|
38
|
+
### Fixed — SIGPUSHONLY, LOW_S and NULLFAIL are consensus, and both flag helpers now say so
|
|
39
|
+
|
|
40
|
+
BSV enforces these three as **mandatory**, not as standardness. Each was broadcast to
|
|
41
|
+
mainnet in a transaction violating it and nothing else, and the node answered code 16
|
|
42
|
+
`mandatory-script-verify-flag-failed`:
|
|
43
|
+
|
|
44
|
+
| rule | the node's message |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| `SIGPUSHONLY` | Only non-push operators allowed in signatures |
|
|
47
|
+
| `LOW_S` | Non-canonical signature: S value is unnecessarily high |
|
|
48
|
+
| `NULLFAIL` | Signature must be zero for failed CHECK(MULTI)SIG operation |
|
|
49
|
+
|
|
50
|
+
For contrast, `MINIMALDATA`, `CLEANSTACK`, `NULLDUMMY` and the upgradable NOPs all came
|
|
51
|
+
back code 64 `non-mandatory-script-verify-flag` in the same run — relay policy, not
|
|
52
|
+
consensus.
|
|
53
|
+
|
|
54
|
+
`currentConsensusFlags()` carried none of the three, so `verify()` with no explicit
|
|
55
|
+
flags **accepted scripts the network judges invalid**. `mainnetFlags()` carried two of
|
|
56
|
+
them, so the two helpers disagreed and the default was the weaker one.
|
|
57
|
+
|
|
58
|
+
Both now carry all three. Fixing only the default would have left the worse half
|
|
59
|
+
standing: `mainnetFlags()` is the helper the README recommends and the one
|
|
60
|
+
`lib/covenant/helpers.flags()` returns, so **every covenant and the whole `policy()`
|
|
61
|
+
DSL** verified without `SIGPUSHONLY`. A test asserts the invariant behind that — the
|
|
62
|
+
default word may never enforce a rule `mainnetFlags()` would let through — rather than
|
|
63
|
+
naming individual bits, since naming two of three rules is exactly what let
|
|
64
|
+
`SIGPUSHONLY` slip.
|
|
65
|
+
|
|
66
|
+
The node's own corpus cannot settle this: all seven of its `SIGPUSHONLY` vectors name
|
|
67
|
+
the flag in their own flag list, and a vector that states its own flags says nothing
|
|
68
|
+
about which flags belong in a default set. Same shape as the `OP_BIN2NUM` defect in
|
|
69
|
+
9.4.0 — the mechanism was covered, the selection was not.
|
|
70
|
+
|
|
71
|
+
Four existing tests were themselves relying on the permissive default, verifying with
|
|
72
|
+
unlocking scripts that contain non-push opcodes. They now pass an explicit flag word
|
|
73
|
+
with `SIGPUSHONLY` cleared, so they exercise the mechanism they are named for.
|
|
74
|
+
|
|
10
75
|
## [9.4.0] - 2026-09-01
|
|
11
76
|
|
|
12
77
|
### Fixed — `policy().lockUntil()` did not bind, and `OP_BIN2NUM` used the wrong era's width
|
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** | 1045KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@9.
|
|
159
|
-
| **bsv.bundle.js** | 1045KB | Everything in one file | `unpkg.com/@smartledger/bsv@9.
|
|
158
|
+
| **bsv.min.js** | 1045KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@9.6.0/bsv.min.js` |
|
|
159
|
+
| **bsv.bundle.js** | 1045KB | Everything in one file | `unpkg.com/@smartledger/bsv@9.6.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.6.0/bsv-didweb.min.js` |
|
|
165
|
+
| **🟢 bsv-vcjwt.min.js** | 166KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@9.6.0/bsv-vcjwt.min.js` |
|
|
166
|
+
| **🟢 bsv-statuslist.min.js** | 256KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@9.6.0/bsv-statuslist.min.js` |
|
|
167
|
+
| **🟢 bsv-anchor.min.js** | 164KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@9.6.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.6.0/bsv-smartcontract.min.js` |
|
|
173
|
+
| **bsv-covenant.min.js** | 35KB | Covenant operations | `unpkg.com/@smartledger/bsv@9.6.0/bsv-covenant.min.js` |
|
|
174
|
+
| **bsv-script-helper.min.js** | 33KB | Custom script tools | `unpkg.com/@smartledger/bsv@9.6.0/bsv-script-helper.min.js` |
|
|
175
|
+
| **bsv-security.min.js** | 32KB | Security enhancements | `unpkg.com/@smartledger/bsv@9.6.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** | 539KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@9.
|
|
181
|
-
| **bsv-gdaf.min.js** | 1045KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@9.
|
|
180
|
+
| **bsv-ltp.min.js** | 539KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@9.6.0/bsv-ltp.min.js` |
|
|
181
|
+
| **bsv-gdaf.min.js** | 1045KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@9.6.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.6.0/bsv-shamir.min.js` |
|
|
187
187
|
|
|
188
188
|
### **Utilities**
|
|
189
189
|
| Module | Size | Use Case | CDN |
|
|
190
190
|
|--------|------|----------|-----|
|
|
191
|
-
| **bsv-ecies.min.js** | 137KB | 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** | 137KB | Encryption | `unpkg.com/@smartledger/bsv@9.6.0/bsv-ecies.min.js` |
|
|
192
|
+
| **bsv-message.min.js** | 34KB | Message signing | `unpkg.com/@smartledger/bsv@9.6.0/bsv-message.min.js` |
|
|
193
|
+
| **bsv-mnemonic.min.js** | 320KB | HD wallets | `unpkg.com/@smartledger/bsv@9.6.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.6.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.6.0**
|