@smartledger/bsv 7.6.2 → 7.8.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 +115 -0
- package/README.md +38 -38
- package/bsv-gdaf.min.js +47 -47
- package/bsv-ltp.min.js +47 -47
- package/bsv-smartcontract.min.js +11 -11
- package/bsv.bundle.js +47 -47
- package/bsv.d.ts +6 -0
- package/bsv.min.js +47 -47
- 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/crypto/signature.js +2 -0
- package/lib/script/interpreter.js +152 -2
- package/lib/transaction/sighash.js +17 -1
- package/package.json +1 -1
- package/test/script/chronicle.js +318 -0
- package/test/script/interpreter.js +4 -9
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,121 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [7.8.0] - 2026-08-10
|
|
11
|
+
|
|
12
|
+
`OP_LSHIFTNUM` / `OP_RSHIFTNUM` are implemented, and **7.6.0's fail-closed posture for
|
|
13
|
+
their bytes is corrected**. Both come from reading the SV Node implementation
|
|
14
|
+
([`src/script/interpreter.cpp`](https://github.com/bitcoin-sv/bitcoin-sv/blob/master/src/script/interpreter.cpp),
|
|
15
|
+
with the arithmetic in `src/script/script_num.cpp` and `src/big_int.cpp`) rather than
|
|
16
|
+
inferring from the one-sentence spec.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **Bytes 182/183 are upgradable NOPs before Chronicle, not errors.** 7.6.0 made them
|
|
21
|
+
reject unconditionally, on the reasoning that refusing to validate is safer than
|
|
22
|
+
validating wrongly. The node does something else:
|
|
23
|
+
|
|
24
|
+
```cpp
|
|
25
|
+
if(!utxo_after_chronicle)
|
|
26
|
+
{
|
|
27
|
+
if(IsDiscourageUpgradableNops(flags))
|
|
28
|
+
return SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS;
|
|
29
|
+
else
|
|
30
|
+
break; // no-op
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
So this library was rejecting scripts the network accepts — a false negative, which
|
|
35
|
+
is the mirror image of the defect 7.6.0 set out to fix rather than a cure for it. In
|
|
36
|
+
fairness to the original code, byte 182 behaving as a no-op was *correct* before
|
|
37
|
+
Chronicle; the real defect was that it would have stayed a no-op *after* activation,
|
|
38
|
+
silently skipping the shift. Two of the `BSV_DIVERGENCES` entries added in 7.6.0 are
|
|
39
|
+
removed as a result: this library now agrees with Bitcoin Core on those vectors again.
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- **`OP_LSHIFTNUM` / `OP_RSHIFTNUM` under `SCRIPT_ENABLE_CHRONICLE`.** Every question
|
|
44
|
+
the spec left open is answered by the implementation:
|
|
45
|
+
|
|
46
|
+
- **Operand order** — `// (x n -- out)`: the shift *count* is on top, the value beneath.
|
|
47
|
+
- **Negative counts** — `if(n < 0) return SCRIPT_ERR_INVALID_NUMBER_RANGE`.
|
|
48
|
+
- **"Preserving sign"** — sign-magnitude, and the right shift **truncates toward
|
|
49
|
+
zero**: `"Mathematical division by 2^bit_shift, rounding toward zero ... For
|
|
50
|
+
negative values: n / 2^k = -((-n) >> k)"`. So `-5 1 OP_RSHIFTNUM` is **-2, not -3**;
|
|
51
|
+
a two's-complement arithmetic shift would floor. The bignum path agrees — it is
|
|
52
|
+
OpenSSL `BN_rshift` on a sign-magnitude value. This is the same convention as
|
|
53
|
+
`OP_DIV` and `OP_2DIV`, and there is a test asserting all three agree.
|
|
54
|
+
- **Oversized counts** — right shift past the bit length is `0` (not an error); left
|
|
55
|
+
shift raises overflow, bounded *before* shifting (`current_size + shift_bytes >
|
|
56
|
+
max_length`) so a huge count cannot allocate a huge number on its way to rejection.
|
|
57
|
+
- **Result encoding** — minimal, via the script-number encoder, bounded by the
|
|
58
|
+
script-number width.
|
|
59
|
+
|
|
60
|
+
### Note on the conformance corpus
|
|
61
|
+
|
|
62
|
+
The independent Chronicle corpus in `@smartledger/bsv-core` pins *that* library's
|
|
63
|
+
fail-closed choice for these bytes, so it now reports 6 differences against this one —
|
|
64
|
+
all of them cases where this library matches SV Node and the corpus does not, including
|
|
65
|
+
a shrinking rather than growing set of divergences from Bitcoin Core. `CHRONICLE.md`
|
|
66
|
+
there reaches the same conclusion 7.6.0 did and is equally out of date; the node source
|
|
67
|
+
settles it.
|
|
68
|
+
|
|
69
|
+
17 → 26 tests in `test/script/chronicle.js`, each mapped to a specific line of the C++.
|
|
70
|
+
Suite 4629 → 4638.
|
|
71
|
+
|
|
72
|
+
## [7.7.0] - 2026-08-10
|
|
73
|
+
|
|
74
|
+
Completes the BSV **Chronicle** script surface. 7.6.0 fixed the opcode *numbering*
|
|
75
|
+
so the reassigned bytes fail closed; this adds the behaviour behind an explicit
|
|
76
|
+
`SCRIPT_ENABLE_CHRONICLE` flag.
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- **`Interpreter.SCRIPT_ENABLE_CHRONICLE`** (`1 << 20`). Off by default — enabling it
|
|
81
|
+
changes script evaluation, so it is an opt-in exactly like the Monolith and Magnetic
|
|
82
|
+
flags.
|
|
83
|
+
|
|
84
|
+
- **`OP_2MUL` / `OP_2DIV`**, restored behind the flag. Without it they remain
|
|
85
|
+
`SCRIPT_ERR_DISABLED_OPCODE`, and "disabled" is deliberately stronger than
|
|
86
|
+
"unimplemented": a disabled opcode fails the script even in an **unexecuted** branch,
|
|
87
|
+
which is why the gate lives in `isOpcodeDisabled` rather than the evaluation switch.
|
|
88
|
+
`OP_2DIV` truncates toward zero — `-5 OP_2DIV` is `-2`, not `-3` — so it agrees with
|
|
89
|
+
`x 2 OP_DIV`; pinned over negative and odd values, which is where a rounding change
|
|
90
|
+
would otherwise hide. (`bn.js` `shrn` is unusable here: it asserts on negatives.)
|
|
91
|
+
|
|
92
|
+
- **`OP_VER` / `OP_VERIF` / `OP_VERNOTIF`**, behind the same flag. `OP_VER` pushes the
|
|
93
|
+
executing transaction's version. `OP_VERIF` is an `IF` whose condition is "top of
|
|
94
|
+
stack equals the transaction version", closed by `OP_ENDIF`; `OP_VERNOTIF` is its
|
|
95
|
+
negation.
|
|
96
|
+
|
|
97
|
+
Two details worth recording. Before Chronicle, `OP_VERIF`/`OP_VERNOTIF` are invalid
|
|
98
|
+
**even in an unexecuted branch** — a rule Bitcoin applies to no other opcode — so the
|
|
99
|
+
flag check sits deliberately *outside* the `fExec` guard, preserving it. And
|
|
100
|
+
`OP_VERIF` **pops** its operand, mirroring `OP_IF`: the spec describes the comparison
|
|
101
|
+
but not the stack effect, and an `IF` that left its condition behind would unbalance
|
|
102
|
+
every script using it. That is an inference, and it has its own test so a correction
|
|
103
|
+
surfaces as a failure.
|
|
104
|
+
|
|
105
|
+
- **`Signature.SIGHASH_CHRONICLE`** (`0x20`), selecting the Original Transaction Digest
|
|
106
|
+
Algorithm. It **overrides** `SIGHASH_FORKID` rather than merely coexisting with it:
|
|
107
|
+
FORKID is set on essentially every BSV signature written since 2018, so a bit that
|
|
108
|
+
only applied when FORKID was absent could never select OTDA in practice. Gated on
|
|
109
|
+
`SCRIPT_ENABLE_CHRONICLE` because before the upgrade the `0x20` bit means nothing —
|
|
110
|
+
BIP-143 signatures already exist whose type byte happens to set it, and honouring it
|
|
111
|
+
unconditionally would silently reinterpret those as OTDA.
|
|
112
|
+
|
|
113
|
+
### Verification
|
|
114
|
+
|
|
115
|
+
17 new tests in `test/script/chronicle.js` pin both states: every feature above with
|
|
116
|
+
the flag on, **and** the unchanged default with it off. Against the independent
|
|
117
|
+
Chronicle conformance corpus in `@smartledger/bsv-core`, divergences fall **14 → 1**,
|
|
118
|
+
and that one is Node echoing an assertion's source text (`assert(Buffer.isBuffer(buf))`
|
|
119
|
+
vs `(Buffer.isBuffer(buf))`) — a difference in how the two codebases wrote the same
|
|
120
|
+
check, not behaviour. Under the default comparison the corpus reports
|
|
121
|
+
**PASS: 442/442**.
|
|
122
|
+
|
|
123
|
+
Suite 4612 → 4629.
|
|
124
|
+
|
|
10
125
|
## [7.6.2] - 2026-08-10
|
|
11
126
|
|
|
12
127
|
### Changed
|
package/README.md
CHANGED
|
@@ -186,42 +186,42 @@ console.log('Status:', status) // 'revoked'
|
|
|
186
186
|
### **Core Modules**
|
|
187
187
|
| Module | Size | Use Case | CDN |
|
|
188
188
|
|--------|------|----------|-----|
|
|
189
|
-
| **bsv.min.js** | 1149KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@7.
|
|
190
|
-
| **bsv.bundle.js** | 1149KB | Everything in one file | `unpkg.com/@smartledger/bsv@7.
|
|
189
|
+
| **bsv.min.js** | 1149KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js` |
|
|
190
|
+
| **bsv.bundle.js** | 1149KB | Everything in one file | `unpkg.com/@smartledger/bsv@7.8.0/bsv.bundle.js` |
|
|
191
191
|
|
|
192
192
|
### **W3C Verifiable Credentials**
|
|
193
193
|
| Module | Size | Use Case | CDN |
|
|
194
194
|
|--------|------|----------|-----|
|
|
195
|
-
| **🟢 bsv-didweb.min.js** | 315KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@7.
|
|
196
|
-
| **🟢 bsv-vcjwt.min.js** | 315KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@7.
|
|
197
|
-
| **🟢 bsv-statuslist.min.js** | 415KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@7.
|
|
198
|
-
| **🟢 bsv-anchor.min.js** | 314KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@7.
|
|
195
|
+
| **🟢 bsv-didweb.min.js** | 315KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@7.8.0/bsv-didweb.min.js` |
|
|
196
|
+
| **🟢 bsv-vcjwt.min.js** | 315KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@7.8.0/bsv-vcjwt.min.js` |
|
|
197
|
+
| **🟢 bsv-statuslist.min.js** | 415KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@7.8.0/bsv-statuslist.min.js` |
|
|
198
|
+
| **🟢 bsv-anchor.min.js** | 314KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@7.8.0/bsv-anchor.min.js` |
|
|
199
199
|
|
|
200
200
|
### **Smart Contract & Development**
|
|
201
201
|
| Module | Size | Use Case | CDN |
|
|
202
202
|
|--------|------|----------|-----|
|
|
203
|
-
| **bsv-smartcontract.min.js** | 873KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@7.
|
|
204
|
-
| **bsv-covenant.min.js** | 873KB | Covenant operations | `unpkg.com/@smartledger/bsv@7.
|
|
205
|
-
| **bsv-script-helper.min.js** | 30KB | Custom script tools | `unpkg.com/@smartledger/bsv@7.
|
|
206
|
-
| **bsv-security.min.js** | 30KB | Security enhancements | `unpkg.com/@smartledger/bsv@7.
|
|
203
|
+
| **bsv-smartcontract.min.js** | 873KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@7.8.0/bsv-smartcontract.min.js` |
|
|
204
|
+
| **bsv-covenant.min.js** | 873KB | Covenant operations | `unpkg.com/@smartledger/bsv@7.8.0/bsv-covenant.min.js` |
|
|
205
|
+
| **bsv-script-helper.min.js** | 30KB | Custom script tools | `unpkg.com/@smartledger/bsv@7.8.0/bsv-script-helper.min.js` |
|
|
206
|
+
| **bsv-security.min.js** | 30KB | Security enhancements | `unpkg.com/@smartledger/bsv@7.8.0/bsv-security.min.js` |
|
|
207
207
|
|
|
208
208
|
### **Legal & Compliance**
|
|
209
209
|
| Module | Size | Use Case | CDN |
|
|
210
210
|
|--------|------|----------|-----|
|
|
211
|
-
| **bsv-ltp.min.js** | 1149KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@7.
|
|
212
|
-
| **bsv-gdaf.min.js** | 1149KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@7.
|
|
211
|
+
| **bsv-ltp.min.js** | 1149KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@7.8.0/bsv-ltp.min.js` |
|
|
212
|
+
| **bsv-gdaf.min.js** | 1149KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@7.8.0/bsv-gdaf.min.js` |
|
|
213
213
|
|
|
214
214
|
### **Advanced Cryptography**
|
|
215
215
|
| Module | Size | Use Case | CDN |
|
|
216
216
|
|--------|------|----------|-----|
|
|
217
|
-
| **bsv-shamir.min.js** | 353KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@7.
|
|
217
|
+
| **bsv-shamir.min.js** | 353KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@7.8.0/bsv-shamir.min.js` |
|
|
218
218
|
|
|
219
219
|
### **Utilities**
|
|
220
220
|
| Module | Size | Use Case | CDN |
|
|
221
221
|
|--------|------|----------|-----|
|
|
222
|
-
| **bsv-ecies.min.js** | 79KB | Encryption | `unpkg.com/@smartledger/bsv@7.
|
|
223
|
-
| **bsv-message.min.js** | 30KB | Message signing | `unpkg.com/@smartledger/bsv@7.
|
|
224
|
-
| **bsv-mnemonic.min.js** | 592KB | HD wallets | `unpkg.com/@smartledger/bsv@7.
|
|
222
|
+
| **bsv-ecies.min.js** | 79KB | Encryption | `unpkg.com/@smartledger/bsv@7.8.0/bsv-ecies.min.js` |
|
|
223
|
+
| **bsv-message.min.js** | 30KB | Message signing | `unpkg.com/@smartledger/bsv@7.8.0/bsv-message.min.js` |
|
|
224
|
+
| **bsv-mnemonic.min.js** | 592KB | HD wallets | `unpkg.com/@smartledger/bsv@7.8.0/bsv-mnemonic.min.js` |
|
|
225
225
|
|
|
226
226
|
## ⚡ **2-Minute Quick Start**
|
|
227
227
|
|
|
@@ -232,7 +232,7 @@ Get started with Bitcoin SV development in under 2 minutes:
|
|
|
232
232
|
npm install @smartledger/bsv
|
|
233
233
|
|
|
234
234
|
# Or include in HTML
|
|
235
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
235
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
236
236
|
```
|
|
237
237
|
|
|
238
238
|
> **🔒 v5.0.0 (production hardening — has breaking changes):** Shamir secret
|
|
@@ -332,8 +332,8 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
332
332
|
|
|
333
333
|
### 🔧 **Basic Development** (~1.2MB total)
|
|
334
334
|
```html
|
|
335
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
336
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
335
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
336
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-script-helper.min.js"></script>
|
|
337
337
|
<script>
|
|
338
338
|
const privateKey = new bsv.PrivateKey();
|
|
339
339
|
const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
|
|
@@ -342,9 +342,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
342
342
|
|
|
343
343
|
### 🔒 **Smart Contract Development** (~2.8MB total — each bundle re-embeds core BSV)
|
|
344
344
|
```html
|
|
345
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
346
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
347
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
345
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
346
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-covenant.min.js"></script>
|
|
347
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-smartcontract.min.js"></script>
|
|
348
348
|
<script>
|
|
349
349
|
const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
350
350
|
.extractField('amount').push(50000).greaterThanOrEqual().verify().build();
|
|
@@ -354,9 +354,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
354
354
|
|
|
355
355
|
### 🆕 **Legal & Identity Development** (~3.4MB total — each bundle re-embeds core BSV)
|
|
356
356
|
```html
|
|
357
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
358
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
359
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
357
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
358
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-ltp.min.js"></script>
|
|
359
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-gdaf.min.js"></script>
|
|
360
360
|
<script>
|
|
361
361
|
// Legal Token Protocol
|
|
362
362
|
const propertyToken = bsv.createPropertyToken({
|
|
@@ -370,9 +370,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
370
370
|
|
|
371
371
|
### 🆕 **Security & Cryptography** (~1.5MB total)
|
|
372
372
|
```html
|
|
373
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
374
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
375
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
373
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
374
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-security.min.js"></script>
|
|
375
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-shamir.min.js"></script>
|
|
376
376
|
<script>
|
|
377
377
|
// Threshold Cryptography
|
|
378
378
|
const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
|
|
@@ -384,7 +384,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
384
384
|
|
|
385
385
|
### 🎯 **Everything Bundle** (~1.1MB)
|
|
386
386
|
```html
|
|
387
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
387
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.bundle.js"></script>
|
|
388
388
|
<script>
|
|
389
389
|
// Everything available immediately
|
|
390
390
|
const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
|
|
@@ -494,8 +494,8 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
494
494
|
|
|
495
495
|
#### 1. **Minimal Setup** - Core + Script Helper (~1.2MB)
|
|
496
496
|
```html
|
|
497
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
498
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
497
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
498
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-script-helper.min.js"></script>
|
|
499
499
|
<script>
|
|
500
500
|
const tx = new bsv.Transaction();
|
|
501
501
|
const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
|
|
@@ -504,9 +504,9 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
504
504
|
|
|
505
505
|
#### 2. **DeFi Development** - Core + Covenants + Debug (~2.8MB — each bundle re-embeds core BSV)
|
|
506
506
|
```html
|
|
507
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
508
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
509
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
507
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
508
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-covenant.min.js"></script>
|
|
509
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-smartcontract.min.js"></script>
|
|
510
510
|
<script>
|
|
511
511
|
const covenant = new bsvCovenant.CovenantInterface();
|
|
512
512
|
const debugInfo = SmartContract.interpretScript(script);
|
|
@@ -516,8 +516,8 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
516
516
|
|
|
517
517
|
#### 3. **Security First** - Core + Enhanced Security (~1.2MB)
|
|
518
518
|
```html
|
|
519
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
520
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
519
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.min.js"></script>
|
|
520
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv-security.min.js"></script>
|
|
521
521
|
<script>
|
|
522
522
|
const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
|
|
523
523
|
const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
|
|
@@ -526,7 +526,7 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
526
526
|
|
|
527
527
|
#### 4. **Everything Bundle** - One File Solution (~1.1MB)
|
|
528
528
|
```html
|
|
529
|
-
<script src="https://unpkg.com/@smartledger/bsv@7.
|
|
529
|
+
<script src="https://unpkg.com/@smartledger/bsv@7.8.0/bsv.bundle.js"></script>
|
|
530
530
|
<script>
|
|
531
531
|
// Everything available under bsv namespace
|
|
532
532
|
const keys = bsv.SmartLedgerBundle.generateKeys();
|
|
@@ -834,7 +834,7 @@ const timelockScript = helper.createTimelockScript(
|
|
|
834
834
|
|
|
835
835
|
See the **[16 Loading Options](#-16-loading-options---choose-your-approach)**
|
|
836
836
|
table near the top for the full list of bundles with current sizes and
|
|
837
|
-
canonical `unpkg.com/@smartledger/bsv@7.
|
|
837
|
+
canonical `unpkg.com/@smartledger/bsv@7.8.0/...` URLs.
|
|
838
838
|
|
|
839
839
|
## 🔐 Security
|
|
840
840
|
|