@smartledger/bsv 5.3.1 → 5.4.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 +49 -0
- package/README.md +67 -62
- package/bsv-anchor.min.js +4 -4
- package/bsv-covenant.min.js +2 -2
- package/bsv-didweb.min.js +4 -4
- package/bsv-gdaf.min.js +13 -13
- package/bsv-ltp.min.js +13 -13
- package/bsv-mnemonic.min.js +4 -4
- package/bsv-shamir.min.js +4 -4
- package/bsv-smartcontract.min.js +2 -2
- package/bsv-statuslist.min.js +5 -5
- package/bsv-vcjwt.min.js +4 -4
- package/bsv.bundle.js +13 -13
- package/bsv.min.js +13 -13
- package/build/webpack.base.js +10 -0
- 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/ltp/index.js +34 -46
- package/lib/ltp/right.js +132 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,55 @@ All notable changes to SmartLedger-BSV will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [5.4.1] - 2026-06-25
|
|
9
|
+
|
|
10
|
+
Patch release. Repairs Legal Token Protocol (LTP) right-token creation,
|
|
11
|
+
signing, transfer, obligation and verification, which all threw on use.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **LTP right-token signing was completely broken.** `lib/ltp/right.js`
|
|
16
|
+
defined `_signToken` twice; the duplicate object-literal key shadowed the
|
|
17
|
+
working signer and referenced an undefined `hash`, so every
|
|
18
|
+
`prepareRightToken` / transfer / reissue / obligation signing failed with
|
|
19
|
+
"hash is not defined". The detached-JWS builder is now `_createJWS(hash,
|
|
20
|
+
signature)`.
|
|
21
|
+
- **`LTP#createRightToken` called non-existent entrypoints** (`LTPRight.create`
|
|
22
|
+
and `LTPProof.createSignature`). Added a build-only `RightToken.create(...)`
|
|
23
|
+
(reused by `prepareRightToken`) and signing now goes through the repaired
|
|
24
|
+
`RightToken._signToken`.
|
|
25
|
+
- **`LTP#verifyToken`, `transferRight`, `createObligation`,
|
|
26
|
+
`createSelectiveDisclosure` and `createLegalValidityProof` all threw** — each
|
|
27
|
+
called a non-existent `LTPProof`/`LTPRight` method (the same `prepare*` vs
|
|
28
|
+
`create*` naming mismatch). They now call the real `prepare*` entrypoints.
|
|
29
|
+
- **Added `RightToken.verifyToken(token, publicKey)`** — a real public-key
|
|
30
|
+
ECDSA verifier for tokens signed by `_signToken` (recomputes the canonical
|
|
31
|
+
hash, confirms `tokenHash` integrity, then verifies the signature embedded in
|
|
32
|
+
the detached JWS). `LTP#verifyToken` routes through it, so the pre-transfer
|
|
33
|
+
ownership check is now a genuine signature check.
|
|
34
|
+
|
|
35
|
+
### Tests
|
|
36
|
+
|
|
37
|
+
- Adds `test/ltp/right.js` covering right-token creation, signing,
|
|
38
|
+
verification (valid / wrong-key / tampered), transfer (incl. non-transferable
|
|
39
|
+
rejection), obligation creation, selective disclosure and legal-validity
|
|
40
|
+
proofs. Full suite: 4256 passing.
|
|
41
|
+
|
|
42
|
+
## [5.4.0] - 2026-06-15
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- **`elliptic` removed from the browser bundles (~120–140KB smaller each).**
|
|
47
|
+
The bundles still pulled `elliptic` transitively through `crypto-browserify`'s
|
|
48
|
+
`browserify-sign` + `create-ecdh` (for `crypto.createSign`/`createECDH` — APIs
|
|
49
|
+
bsv never calls; its EC crypto is `@noble`). Those are now stubbed out in the
|
|
50
|
+
webpack config, so no `elliptic` code ships in any bundle. e.g. `bsv.min.js`
|
|
51
|
+
1271KB → 1149KB, `bsv-didweb`/`bsv-vcjwt`/`bsv-anchor` ~−138KB; published
|
|
52
|
+
tarball 12.2MB → 10.9MB. `randomBytes`/`createHash`/`createHmac` (the Shamir
|
|
53
|
+
CSPRNG and hashing) are unaffected. Verified by the headless-Chrome browser
|
|
54
|
+
smoke test (this was only safe once the secrets.js AMD/crypto fix in 5.3.1 made
|
|
55
|
+
the polyfill chain robust).
|
|
56
|
+
|
|
8
57
|
## [5.3.1] - 2026-06-15
|
|
9
58
|
|
|
10
59
|
Patch release. Fixes browser-side Shamir secret sharing, which was broken in the
|
package/README.md
CHANGED
|
@@ -2,23 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
**🚀 Complete Bitcoin SV Development Framework with W3C Verifiable Credentials, DID:web, Legal Compliance, and 16 Flexible Loading Options**
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@smartledger/bsv)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://bitcoinsv.com/)
|
|
8
8
|
[](#-16-loading-options---choose-your-approach)
|
|
9
9
|
[](#-legally-recognizable-credentials-v34x)
|
|
10
10
|
|
|
11
|
-
The most comprehensive and flexible Bitcoin SV library available. **In
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
The most comprehensive and flexible Bitcoin SV library available. **In v5.x**:
|
|
12
|
+
all secp256k1 cryptography runs on the audited, constant-time
|
|
13
|
+
[`@noble`](https://github.com/paulmillr/noble-curves) suite (ECDSA, ECIES, key
|
|
14
|
+
derivation) with `elliptic` removed; Shamir secret sharing on a vetted GF(2⁸)
|
|
15
|
+
engine; JOSE-compliant VC-JWT — on top of the v4.x interpreter-verified covenant
|
|
16
|
+
stack (OP_PUSH_TX, PELS, ownership tokens), legally-recognizable DID:web + VC-JWT
|
|
17
|
+
toolkit, and 16 distribution methods. **v5.x is the only supported line — see
|
|
18
|
+
[Upgrading to v5.0.0](#upgrading-to-v500-breaking-changes) when moving from 4.x.**
|
|
16
19
|
|
|
17
|
-
> **
|
|
18
|
-
> `
|
|
19
|
-
>
|
|
20
|
+
> **v5.4.0 (latest)**: all secp256k1 crypto on the audited `@noble` suite, with
|
|
21
|
+
> `elliptic` now gone from the bundles too (`bsv.min.js` ~1.1MB, ~120–140KB
|
|
22
|
+
> smaller per bundle); browser Shamir fixed and guarded by a headless-Chrome CI
|
|
23
|
+
> check. See [CHANGELOG](./CHANGELOG.md).
|
|
20
24
|
|
|
21
|
-
##
|
|
25
|
+
## **Interpreter-Verified Covenants**
|
|
22
26
|
|
|
23
27
|
The full covenant stack now lives at `bsv.SmartContract`, builds on the
|
|
24
28
|
post-Genesis script limits added in 4.1.0, and verifies end-to-end through
|
|
@@ -72,7 +76,7 @@ const ok = SC.verifyScript(unlockScript, lockingScript, tx, inputIndex, satoshis
|
|
|
72
76
|
|
|
73
77
|
```bash
|
|
74
78
|
# Install SmartLedger BSV v5.0.0
|
|
75
|
-
npm install @smartledger/bsv@5.
|
|
79
|
+
npm install @smartledger/bsv@5.4.0
|
|
76
80
|
|
|
77
81
|
# Initialize DID:web issuer (generates ES256 keys)
|
|
78
82
|
npx smartledger-bsv didweb init --domain example.com --alg ES256
|
|
@@ -181,42 +185,42 @@ console.log('Status:', status) // 'revoked'
|
|
|
181
185
|
### **Core Modules**
|
|
182
186
|
| Module | Size | Use Case | CDN |
|
|
183
187
|
|--------|------|----------|-----|
|
|
184
|
-
| **bsv.min.js** |
|
|
185
|
-
| **bsv.bundle.js** |
|
|
188
|
+
| **bsv.min.js** | 1149KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js` |
|
|
189
|
+
| **bsv.bundle.js** | 1149KB | Everything in one file | `unpkg.com/@smartledger/bsv@5.4.0/bsv.bundle.js` |
|
|
186
190
|
|
|
187
191
|
### **W3C Verifiable Credentials**
|
|
188
192
|
| Module | Size | Use Case | CDN |
|
|
189
193
|
|--------|------|----------|-----|
|
|
190
|
-
| **🟢 bsv-didweb.min.js** |
|
|
191
|
-
| **🟢 bsv-vcjwt.min.js** |
|
|
192
|
-
| **🟢 bsv-statuslist.min.js** |
|
|
193
|
-
| **🟢 bsv-anchor.min.js** |
|
|
194
|
+
| **🟢 bsv-didweb.min.js** | 315KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@5.4.0/bsv-didweb.min.js` |
|
|
195
|
+
| **🟢 bsv-vcjwt.min.js** | 315KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@5.4.0/bsv-vcjwt.min.js` |
|
|
196
|
+
| **🟢 bsv-statuslist.min.js** | 415KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@5.4.0/bsv-statuslist.min.js` |
|
|
197
|
+
| **🟢 bsv-anchor.min.js** | 314KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@5.4.0/bsv-anchor.min.js` |
|
|
194
198
|
|
|
195
199
|
### **Smart Contract & Development**
|
|
196
200
|
| Module | Size | Use Case | CDN |
|
|
197
201
|
|--------|------|----------|-----|
|
|
198
|
-
| **bsv-smartcontract.min.js** | 873KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@5.
|
|
199
|
-
| **bsv-covenant.min.js** | 873KB | Covenant operations | `unpkg.com/@smartledger/bsv@5.
|
|
200
|
-
| **bsv-script-helper.min.js** | 30KB | Custom script tools | `unpkg.com/@smartledger/bsv@5.
|
|
201
|
-
| **bsv-security.min.js** | 30KB | Security enhancements | `unpkg.com/@smartledger/bsv@5.
|
|
202
|
+
| **bsv-smartcontract.min.js** | 873KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@5.4.0/bsv-smartcontract.min.js` |
|
|
203
|
+
| **bsv-covenant.min.js** | 873KB | Covenant operations | `unpkg.com/@smartledger/bsv@5.4.0/bsv-covenant.min.js` |
|
|
204
|
+
| **bsv-script-helper.min.js** | 30KB | Custom script tools | `unpkg.com/@smartledger/bsv@5.4.0/bsv-script-helper.min.js` |
|
|
205
|
+
| **bsv-security.min.js** | 30KB | Security enhancements | `unpkg.com/@smartledger/bsv@5.4.0/bsv-security.min.js` |
|
|
202
206
|
|
|
203
207
|
### **Legal & Compliance**
|
|
204
208
|
| Module | Size | Use Case | CDN |
|
|
205
209
|
|--------|------|----------|-----|
|
|
206
|
-
| **bsv-ltp.min.js** |
|
|
207
|
-
| **bsv-gdaf.min.js** |
|
|
210
|
+
| **bsv-ltp.min.js** | 1149KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@5.4.0/bsv-ltp.min.js` |
|
|
211
|
+
| **bsv-gdaf.min.js** | 1149KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@5.4.0/bsv-gdaf.min.js` |
|
|
208
212
|
|
|
209
213
|
### **Advanced Cryptography**
|
|
210
214
|
| Module | Size | Use Case | CDN |
|
|
211
215
|
|--------|------|----------|-----|
|
|
212
|
-
| **bsv-shamir.min.js** |
|
|
216
|
+
| **bsv-shamir.min.js** | 353KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@5.4.0/bsv-shamir.min.js` |
|
|
213
217
|
|
|
214
218
|
### **Utilities**
|
|
215
219
|
| Module | Size | Use Case | CDN |
|
|
216
220
|
|--------|------|----------|-----|
|
|
217
|
-
| **bsv-ecies.min.js** | 79KB | Encryption | `unpkg.com/@smartledger/bsv@5.
|
|
218
|
-
| **bsv-message.min.js** | 30KB | Message signing | `unpkg.com/@smartledger/bsv@5.
|
|
219
|
-
| **bsv-mnemonic.min.js** |
|
|
221
|
+
| **bsv-ecies.min.js** | 79KB | Encryption | `unpkg.com/@smartledger/bsv@5.4.0/bsv-ecies.min.js` |
|
|
222
|
+
| **bsv-message.min.js** | 30KB | Message signing | `unpkg.com/@smartledger/bsv@5.4.0/bsv-message.min.js` |
|
|
223
|
+
| **bsv-mnemonic.min.js** | 592KB | HD wallets | `unpkg.com/@smartledger/bsv@5.4.0/bsv-mnemonic.min.js` |
|
|
220
224
|
|
|
221
225
|
## ⚡ **2-Minute Quick Start**
|
|
222
226
|
|
|
@@ -227,7 +231,7 @@ Get started with Bitcoin SV development in under 2 minutes:
|
|
|
227
231
|
npm install @smartledger/bsv
|
|
228
232
|
|
|
229
233
|
# Or include in HTML
|
|
230
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
234
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
231
235
|
```
|
|
232
236
|
|
|
233
237
|
> **🔒 v5.0.0 (production hardening — has breaking changes):** Shamir secret
|
|
@@ -325,21 +329,21 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
325
329
|
|
|
326
330
|
## 📚 **Quick Start Examples**
|
|
327
331
|
|
|
328
|
-
### 🔧 **Basic Development** (~1.
|
|
332
|
+
### 🔧 **Basic Development** (~1.2MB total)
|
|
329
333
|
```html
|
|
330
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
331
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
334
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
335
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-script-helper.min.js"></script>
|
|
332
336
|
<script>
|
|
333
337
|
const privateKey = new bsv.PrivateKey();
|
|
334
338
|
const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
|
|
335
339
|
</script>
|
|
336
340
|
```
|
|
337
341
|
|
|
338
|
-
### 🔒 **Smart Contract Development** (~
|
|
342
|
+
### 🔒 **Smart Contract Development** (~2.8MB total — each bundle re-embeds core BSV)
|
|
339
343
|
```html
|
|
340
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
341
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
342
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
344
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
345
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-covenant.min.js"></script>
|
|
346
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-smartcontract.min.js"></script>
|
|
343
347
|
<script>
|
|
344
348
|
const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
345
349
|
.extractField('amount').push(50000).greaterThanOrEqual().verify().build();
|
|
@@ -347,11 +351,11 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
347
351
|
</script>
|
|
348
352
|
```
|
|
349
353
|
|
|
350
|
-
### 🆕 **Legal & Identity Development** (~3.
|
|
354
|
+
### 🆕 **Legal & Identity Development** (~3.4MB total — each bundle re-embeds core BSV)
|
|
351
355
|
```html
|
|
352
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
353
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
354
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
356
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
357
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-ltp.min.js"></script>
|
|
358
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-gdaf.min.js"></script>
|
|
355
359
|
<script>
|
|
356
360
|
// Legal Token Protocol
|
|
357
361
|
const propertyToken = bsv.createPropertyToken({
|
|
@@ -363,11 +367,11 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
363
367
|
</script>
|
|
364
368
|
```
|
|
365
369
|
|
|
366
|
-
### 🆕 **Security & Cryptography** (~1.
|
|
370
|
+
### 🆕 **Security & Cryptography** (~1.5MB total)
|
|
367
371
|
```html
|
|
368
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
369
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
370
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
372
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
373
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-security.min.js"></script>
|
|
374
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-shamir.min.js"></script>
|
|
371
375
|
<script>
|
|
372
376
|
// Threshold Cryptography
|
|
373
377
|
const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
|
|
@@ -377,9 +381,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
377
381
|
</script>
|
|
378
382
|
```
|
|
379
383
|
|
|
380
|
-
### 🎯 **Everything Bundle** (~1.
|
|
384
|
+
### 🎯 **Everything Bundle** (~1.1MB)
|
|
381
385
|
```html
|
|
382
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
386
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.bundle.js"></script>
|
|
383
387
|
<script>
|
|
384
388
|
// Everything available immediately
|
|
385
389
|
const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
|
|
@@ -412,7 +416,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
412
416
|
- � **PUSHTX Integration**: nChain techniques for advanced covenant patterns → [PUSHTX Insights](docs/pushtx-key-insights.md)
|
|
413
417
|
|
|
414
418
|
### 📦 **Flexible Architecture**
|
|
415
|
-
- 📦 **16 Modular Options**: Load only what you need (30KB to
|
|
419
|
+
- 📦 **16 Modular Options**: Load only what you need (30KB to 1149KB) → [Loading Strategy](#-16-loading-options---choose-your-approach)
|
|
416
420
|
- 📦 **Standalone Modules**: Independent legal, identity, and crypto modules → [Standalone Test](https://github.com/codenlighten/smartledger-bsv/blob/main/tests/standalone-modules-test.html)
|
|
417
421
|
- 📦 **Complete Bundle**: Everything in one file for convenience → [Bundle Demo](https://github.com/codenlighten/smartledger-bsv/blob/main/tests/bundle-demo.html)
|
|
418
422
|
- 📦 **CDN Ready**: All modules available via unpkg and jsDelivr
|
|
@@ -456,9 +460,10 @@ breaking changes only affect data produced by older versions:
|
|
|
456
460
|
- **VC-JWT algorithm pinning.** `verifyVcJwt` rejects any token whose `alg` is
|
|
457
461
|
outside `['ES256','ES256K']` (override via `opts.allowedAlgs`) and binds the
|
|
458
462
|
key's curve to the algorithm — defense against alg-substitution attacks.
|
|
459
|
-
- **Browser bundles
|
|
460
|
-
polyfill so Shamir can source a CSPRNG (`bsv.min.js` ~937KB → ~1.
|
|
461
|
-
|
|
463
|
+
- **Browser bundles changed size.** The full bundles ship a real `crypto`
|
|
464
|
+
polyfill so Shamir can source a CSPRNG (`bsv.min.js` ~937KB → ~1.1MB; it grew
|
|
465
|
+
in 5.0.0 then shrank again in 5.4.0 once `elliptic` was dropped from the
|
|
466
|
+
bundles). The dedicated single-feature module bundles are unaffected.
|
|
462
467
|
|
|
463
468
|
Full details in the [CHANGELOG](./CHANGELOG.md#500---2026-06-13).
|
|
464
469
|
|
|
@@ -486,21 +491,21 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
486
491
|
|
|
487
492
|
### Browser CDN (Choose Your Loading Strategy)
|
|
488
493
|
|
|
489
|
-
#### 1. **Minimal Setup** - Core + Script Helper (~1.
|
|
494
|
+
#### 1. **Minimal Setup** - Core + Script Helper (~1.2MB)
|
|
490
495
|
```html
|
|
491
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
492
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
496
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
497
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-script-helper.min.js"></script>
|
|
493
498
|
<script>
|
|
494
499
|
const tx = new bsv.Transaction();
|
|
495
500
|
const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
|
|
496
501
|
</script>
|
|
497
502
|
```
|
|
498
503
|
|
|
499
|
-
#### 2. **DeFi Development** - Core + Covenants + Debug (~
|
|
504
|
+
#### 2. **DeFi Development** - Core + Covenants + Debug (~2.8MB — each bundle re-embeds core BSV)
|
|
500
505
|
```html
|
|
501
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
502
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
503
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
506
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
507
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-covenant.min.js"></script>
|
|
508
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-smartcontract.min.js"></script>
|
|
504
509
|
<script>
|
|
505
510
|
const covenant = new bsvCovenant.CovenantInterface();
|
|
506
511
|
const debugInfo = SmartContract.interpretScript(script);
|
|
@@ -508,19 +513,19 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
508
513
|
</script>
|
|
509
514
|
```
|
|
510
515
|
|
|
511
|
-
#### 3. **Security First** - Core + Enhanced Security (~1.
|
|
516
|
+
#### 3. **Security First** - Core + Enhanced Security (~1.2MB)
|
|
512
517
|
```html
|
|
513
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
514
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
518
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.min.js"></script>
|
|
519
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv-security.min.js"></script>
|
|
515
520
|
<script>
|
|
516
521
|
const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
|
|
517
522
|
const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
|
|
518
523
|
</script>
|
|
519
524
|
```
|
|
520
525
|
|
|
521
|
-
#### 4. **Everything Bundle** - One File Solution (~1.
|
|
526
|
+
#### 4. **Everything Bundle** - One File Solution (~1.1MB)
|
|
522
527
|
```html
|
|
523
|
-
<script src="https://unpkg.com/@smartledger/bsv@5.
|
|
528
|
+
<script src="https://unpkg.com/@smartledger/bsv@5.4.0/bsv.bundle.js"></script>
|
|
524
529
|
<script>
|
|
525
530
|
// Everything available under bsv namespace
|
|
526
531
|
const keys = bsv.SmartLedgerBundle.generateKeys();
|
|
@@ -809,7 +814,7 @@ const timelockScript = helper.createTimelockScript(
|
|
|
809
814
|
|
|
810
815
|
See the **[16 Loading Options](#-16-loading-options---choose-your-approach)**
|
|
811
816
|
table near the top for the full list of bundles with current sizes and
|
|
812
|
-
canonical `unpkg.com/@smartledger/bsv@5.
|
|
817
|
+
canonical `unpkg.com/@smartledger/bsv@5.4.0/...` URLs.
|
|
813
818
|
|
|
814
819
|
## 🔐 Security
|
|
815
820
|
|