@smartledger/bsv 3.3.3 → 3.3.5

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +50 -28
  2. package/README.md +55 -36
  3. package/bsv-covenant.min.js +6 -6
  4. package/bsv-gdaf.min.js +6 -6
  5. package/bsv-ltp.min.js +6 -6
  6. package/bsv-mnemonic.min.js +4 -4
  7. package/bsv-smartcontract.min.js +5 -5
  8. package/bsv.bundle.js +5 -5
  9. package/bsv.min.js +5 -5
  10. package/demos/README.md +188 -0
  11. package/demos/architecture_demo.js +247 -0
  12. package/demos/browser-test.html +1208 -0
  13. package/demos/bsv_wallet_demo.js +242 -0
  14. package/demos/complete_ltp_demo.js +511 -0
  15. package/demos/debug_tools_demo.js +87 -0
  16. package/demos/demo_features.js +123 -0
  17. package/demos/easy_interface_demo.js +109 -0
  18. package/demos/ecies_demo.js +182 -0
  19. package/demos/gdaf_core_test.js +131 -0
  20. package/demos/gdaf_demo.js +237 -0
  21. package/demos/ltp_demo.js +361 -0
  22. package/demos/ltp_primitives_demo.js +403 -0
  23. package/demos/message_demo.js +209 -0
  24. package/demos/preimage_separation_demo.js +383 -0
  25. package/demos/script_helper_demo.js +289 -0
  26. package/demos/security_demo.js +287 -0
  27. package/demos/shamir_demo.js +121 -0
  28. package/demos/simple_demo.js +204 -0
  29. package/demos/simple_p2pkh_demo.js +169 -0
  30. package/demos/simple_utxo_preimage_demo.js +196 -0
  31. package/demos/smart_contract_demo.html +1347 -0
  32. package/demos/smart_contract_demo.js +910 -0
  33. package/demos/utxo_generator_demo.js +244 -0
  34. package/demos/validation_pipeline_demo.js +155 -0
  35. package/demos/web3keys.html +740 -0
  36. package/docs/BUNDLE_UPDATE_SUMMARY.md +40 -0
  37. package/docs/DOCUMENTATION_REVIEW_REPORT.md +11 -11
  38. package/docs/FIX_CREATEHMAC_ISSUE.md +91 -0
  39. package/docs/MODULE_REFERENCE_COMPLETE.md +28 -28
  40. package/docs/SMARTLEDGER_BSV_USAGE_ANSWERS.md +477 -0
  41. package/docs/SMARTLEDGER_BSV_USAGE_EXAMPLES.js +372 -0
  42. package/docs/SMARTLEDGER_BSV_USAGE_GUIDE.md +555 -0
  43. package/docs/SMART_CONTRACT_DEVELOPMENT_GUIDE.md +1459 -0
  44. package/docs/advanced/UTXO_MANAGER_GUIDE.md +2 -2
  45. package/docs/getting-started/INSTALLATION.md +25 -25
  46. package/docs/getting-started/QUICK_START.md +7 -7
  47. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  48. package/examples/complete_workflow_demo.js +783 -0
  49. package/examples/definitive_working_demo.js +261 -0
  50. package/examples/final_working_contracts.js +338 -0
  51. package/examples/smart_contract_templates.js +718 -0
  52. package/examples/working_smart_contracts.js +348 -0
  53. package/index.js +7 -0
  54. package/lib/browser-utxo-manager-es5.js +316 -0
  55. package/lib/browser-utxo-manager.js +533 -0
  56. package/lib/mnemonic/pbkdf2.browser.js +69 -0
  57. package/lib/mnemonic/pbkdf2.js +2 -68
  58. package/lib/mnemonic/pbkdf2.node.js +68 -0
  59. package/package.json +18 -7
  60. package/tests/browser-compatibility/README.md +35 -0
  61. package/tests/browser-compatibility/test-cdn-vs-local.html +186 -0
  62. package/tests/browser-compatibility/test-pbkdf2.html +51 -0
package/CHANGELOG.md CHANGED
@@ -1,47 +1,65 @@
1
- # Changelog# Changelog
1
+ # Changelog
2
2
 
3
+ All notable changes to SmartLedger-BSV will be documented in this file.
3
4
 
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
7
 
5
- All notable changes to SmartLedger-BSV will be documented in this file.All notable changes to SmartLedger-BSV will be documented in this file.
8
+ ## [3.3.4] - 2025-10-31
6
9
 
10
+ ### Fixed
11
+ - **Critical Browser Compatibility Fix**: Resolved `createHmac is not a function` error affecting CDN users
12
+ - **PBKDF2 Implementation**: Added browser-compatible PBKDF2 using BSV crypto instead of Node.js crypto
13
+ - **Mnemonic Generation**: Fixed mnemonic generation and HD wallet derivation in browser environments
14
+ - **Bundle Updates**: Rebuilt all bundles with browser-compatible crypto implementations
7
15
 
16
+ ### Added
17
+ - Browser-specific PBKDF2 implementation (`lib/mnemonic/pbkdf2.browser.js`)
18
+ - Node.js-specific PBKDF2 implementation (`lib/mnemonic/pbkdf2.node.js`)
19
+ - Automatic browser/Node.js detection for crypto modules
20
+ - Comprehensive browser compatibility test suite
8
21
 
9
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
22
+ ### Technical Details
23
+ - Uses BSV's `Hash.sha512hmac()` instead of Node.js `crypto.createHmac()`
24
+ - Maintains full cryptographic security and API compatibility
25
+ - Zero breaking changes for existing users
26
+ - All 12 bundle variants updated with the fix
10
27
 
11
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
28
+ ## [3.3.3] - 2025-10-28
12
29
 
30
+ ### 🎉 Major Improvements
13
31
 
32
+ #### 📁 Project Organization & Structure
14
33
 
15
- ## [3.3.3] - 2025-10-28## [3.3.0] - 2025-10-22
34
+ - **Complete repository reorganization**: Moved legacy files to `/archive/` for better project structure
35
+ - **New `/demos/` directory**: Interactive HTML demonstrations for all SmartLedger-BSV modules
36
+ - **Enhanced `/docs/` structure**: Comprehensive documentation with getting started guides, API references, and technical details
37
+ - **Dedicated `/tests/` directory**: All test files properly organized and categorized
38
+ - **New `/tools/` directory**: Development utilities and helper scripts
16
39
 
40
+ #### 🚀 Interactive Demos
17
41
 
42
+ - **Smart Contract Demo**: Full-featured HTML demo showcasing covenant creation, preimage parsing, script building, and UTXO generation
43
+ - **Web3Keys Demo**: Interactive key generation and cryptographic operations demonstration
44
+ - **Local development server**: Easy setup for testing demos locally
18
45
 
19
- ### 🎉 Major Improvements### 🚀 MAJOR RELEASE: Legal Token Protocol (LTP) & Global Digital Attestation Framework (GDAF)
20
-
21
-
22
-
23
- #### 📁 Project Organization & Structure#### Revolutionary Legal Token Protocol Framework
24
-
25
- - **Complete repository reorganization**: Moved legacy files to `/archive/` for better project structure- **Complete Legal Token Protocol (LTP)**: 6-module comprehensive legal framework
26
-
27
- - **New `/demos/` directory**: Interactive HTML demonstrations for all SmartLedger-BSV modules - **lib/ltp/anchor.js**: Blockchain anchoring preparation primitives
28
-
29
- - **Enhanced `/docs/` structure**: Comprehensive documentation with getting started guides, API references, and technical details - **lib/ltp/registry.js**: Token registry management primitives
46
+ ## [3.3.0] - 2025-10-22
30
47
 
31
- - **Dedicated `/tests/` directory**: All test files properly organized and categorized - **lib/ltp/claim.js**: Legal claim validation and attestation primitives
48
+ ### 🚀 MAJOR RELEASE: Legal Token Protocol (LTP) & Global Digital Attestation Framework (GDAF)
32
49
 
33
- - **New `/tools/` directory**: Development utilities and helper scripts - **lib/ltp/proof.js**: Cryptographic proof generation primitives
50
+ #### Revolutionary Legal Token Protocol Framework
34
51
 
52
+ - **Complete Legal Token Protocol (LTP)**: 6-module comprehensive legal framework
53
+ - **lib/ltp/anchor.js**: Blockchain anchoring preparation primitives
54
+ - **lib/ltp/registry.js**: Token registry management primitives
55
+ - **lib/ltp/claim.js**: Legal claim validation and attestation primitives
56
+ - **lib/ltp/proof.js**: Cryptographic proof generation primitives
35
57
  - **lib/ltp/right.js**: Legal rights token creation and validation primitives
58
+ - **lib/ltp/obligation.js**: Legal obligation token management primitives
36
59
 
37
- #### 🚀 Interactive Demos - **lib/ltp/obligation.js**: Legal obligation token management primitives
38
-
39
- - **Smart Contract Demo**: Full-featured HTML demo showcasing covenant creation, preimage parsing, script building, and UTXO generation
40
-
41
- - **Web3Keys Demo**: Interactive key generation and cryptographic operations demonstration#### Primitives-Only Architecture Philosophy
42
-
43
- - **Local development server**: Easy setup for testing demos locally- **No Blockchain Publishing**: Library provides preparation functions only
60
+ #### Primitives-Only Architecture Philosophy
44
61
 
62
+ - **No Blockchain Publishing**: Library provides preparation functions only
45
63
  - **External System Integration**: Perfect for enterprise and custom implementations
46
64
 
47
65
  #### 📚 Documentation Enhancements- **Maximum Flexibility**: Choose your own blockchain, storage, and UI frameworks
@@ -206,13 +224,17 @@ Previous version history is available in the git commit log. This changelog form
206
224
 
207
225
 
208
226
 
209
- To get started with SmartLedger-BSV v3.3.3:### 📦 Enhanced Build System
227
+ To get started with SmartLedger-BSV v3.3.4:
210
228
 
229
+ ### 📦 Enhanced Build System
211
230
 
231
+ ```bash
232
+ npm install @smartledger/bsv@3.3.4
233
+ ```
212
234
 
213
- ```bash#### New Standalone Modules
235
+ #### New Standalone Modules
214
236
 
215
- npm install @smartledger/bsv@3.3.3- **bsv-ltp.min.js**: Complete Legal Token Protocol standalone module
237
+ - **bsv-ltp.min.js**: Complete Legal Token Protocol standalone module
216
238
 
217
239
  ```- **bsv-shamir.min.js**: Standalone Shamir Secret Sharing module
218
240
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **🚀 Complete Bitcoin SV Development Framework with Legal Compliance, Digital Identity, and 12 Flexible Loading Options**
4
4
 
5
- [![Version](https://img.shields.io/badge/version-3.3.3-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
5
+ [![Version](https://img.shields.io/badge/version-3.3.4-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
6
6
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
7
  [![BSV](https://img.shields.io/badge/BSV-Compatible-orange.svg)](https://bitcoinsv.com/)
8
8
  [![Modular](https://img.shields.io/badge/Loading-Modular-purple.svg)](#loading-options)
@@ -14,34 +14,34 @@ The most comprehensive and flexible Bitcoin SV library available. Choose from 12
14
14
  ### **Core Modules**
15
15
  | Module | Size | Use Case | CDN |
16
16
  |--------|------|----------|-----|
17
- | **bsv.min.js** | 449KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js` |
18
- | **bsv.bundle.js** | 885KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.3.3/bsv.bundle.js` |
17
+ | **bsv.min.js** | 449KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js` |
18
+ | **bsv.bundle.js** | 885KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js` |
19
19
 
20
20
  ### **Smart Contract & Development**
21
21
  | Module | Size | Use Case | CDN |
22
22
  |--------|------|----------|-----|
23
- | **bsv-smartcontract.min.js** | 451KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.3.3/bsv-smartcontract.min.js` |
24
- | **bsv-covenant.min.js** | 32KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.3.3/bsv-covenant.min.js` |
25
- | **bsv-script-helper.min.js** | 27KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.3.3/bsv-script-helper.min.js` |
26
- | **bsv-security.min.js** | 290KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.3.3/bsv-security.min.js` |
23
+ | **bsv-smartcontract.min.js** | 451KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js` |
24
+ | **bsv-covenant.min.js** | 32KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js` |
25
+ | **bsv-script-helper.min.js** | 27KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js` |
26
+ | **bsv-security.min.js** | 290KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js` |
27
27
 
28
28
  ### **🆕 Legal & Compliance**
29
29
  | Module | Size | Use Case | CDN |
30
30
  |--------|------|----------|-----|
31
- | **🟢 bsv-ltp.min.js** | 817KB | **Legal Token Protocol** | `unpkg.com/@smartledger/bsv@3.3.3/bsv-ltp.min.js` |
32
- | **🟢 bsv-gdaf.min.js** | 604KB | **Digital Identity & Attestation** | `unpkg.com/@smartledger/bsv@3.3.3/bsv-gdaf.min.js` |
31
+ | **🟢 bsv-ltp.min.js** | 817KB | **Legal Token Protocol** | `unpkg.com/@smartledger/bsv@3.3.4/bsv-ltp.min.js` |
32
+ | **🟢 bsv-gdaf.min.js** | 604KB | **Digital Identity & Attestation** | `unpkg.com/@smartledger/bsv@3.3.4/bsv-gdaf.min.js` |
33
33
 
34
34
  ### **🆕 Advanced Cryptography**
35
35
  | Module | Size | Use Case | CDN |
36
36
  |--------|------|----------|-----|
37
- | **🟢 bsv-shamir.min.js** | 433KB | **Threshold Cryptography** | `unpkg.com/@smartledger/bsv@3.3.3/bsv-shamir.min.js` |
37
+ | **🟢 bsv-shamir.min.js** | 433KB | **Threshold Cryptography** | `unpkg.com/@smartledger/bsv@3.3.4/bsv-shamir.min.js` |
38
38
 
39
39
  ### **Utilities**
40
40
  | Module | Size | Use Case | CDN |
41
41
  |--------|------|----------|-----|
42
- | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.3.3/bsv-ecies.min.js` |
43
- | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.3.3/bsv-message.min.js` |
44
- | **bsv-mnemonic.min.js** | 670KB | HD wallets | `unpkg.com/@smartledger/bsv@3.3.3/bsv-mnemonic.min.js` |
42
+ | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.3.4/bsv-ecies.min.js` |
43
+ | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.3.4/bsv-message.min.js` |
44
+ | **bsv-mnemonic.min.js** | 670KB | HD wallets | `unpkg.com/@smartledger/bsv@3.3.4/bsv-mnemonic.min.js` |
45
45
 
46
46
  ## ⚡ **2-Minute Quick Start**
47
47
 
@@ -52,9 +52,11 @@ Get started with Bitcoin SV development in under 2 minutes:
52
52
  npm install @smartledger/bsv
53
53
 
54
54
  # Or include in HTML
55
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
55
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
56
56
  ```
57
57
 
58
+ > **🔧 v3.3.4 Update:** Fixed critical browser compatibility issue with mnemonic generation. CDN users can now use HD wallet and mnemonic functionality without `createHmac` errors!
59
+
58
60
  **Basic Transaction (30 seconds):**
59
61
  ```javascript
60
62
  const bsv = require('@smartledger/bsv'); // Node.js
@@ -145,8 +147,8 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
145
147
 
146
148
  ### 🔧 **Basic Development** (476KB total)
147
149
  ```html
148
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
149
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-script-helper.min.js"></script>
150
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
151
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
150
152
  <script>
151
153
  const privateKey = new bsv.PrivateKey();
152
154
  const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
@@ -155,9 +157,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
155
157
 
156
158
  ### 🔒 **Smart Contract Development** (932KB total)
157
159
  ```html
158
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
159
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-covenant.min.js"></script>
160
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-smartcontract.min.js"></script>
160
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
161
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
162
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
161
163
  <script>
162
164
  const covenant = bsv.SmartContract.createCovenantBuilder()
163
165
  .extractField('amount').push(50000).greaterThanOrEqual().verify().build();
@@ -167,9 +169,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
167
169
 
168
170
  ### 🆕 **Legal & Identity Development** (1.87MB total)
169
171
  ```html
170
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
171
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-ltp.min.js"></script>
172
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-gdaf.min.js"></script>
172
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
173
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-ltp.min.js"></script>
174
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-gdaf.min.js"></script>
173
175
  <script>
174
176
  // Legal Token Protocol
175
177
  const propertyToken = bsv.createPropertyToken({
@@ -183,9 +185,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
183
185
 
184
186
  ### 🆕 **Security & Cryptography** (1.17MB total)
185
187
  ```html
186
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
187
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-security.min.js"></script>
188
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-shamir.min.js"></script>
188
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
189
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
190
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-shamir.min.js"></script>
189
191
  <script>
190
192
  // Threshold Cryptography
191
193
  const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
@@ -197,7 +199,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
197
199
 
198
200
  ### 🎯 **Everything Bundle** (885KB)
199
201
  ```html
200
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.bundle.js"></script>
202
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
201
203
  <script>
202
204
  // Everything available immediately
203
205
  const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
@@ -277,8 +279,8 @@ const contractTx = covenant.createCovenantTransaction({
277
279
 
278
280
  #### 1. **Minimal Setup** - Core + Script Helper (476KB)
279
281
  ```html
280
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
281
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-script-helper.min.js"></script>
282
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
283
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
282
284
  <script>
283
285
  const tx = new bsv.Transaction();
284
286
  const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
@@ -287,9 +289,9 @@ const contractTx = covenant.createCovenantTransaction({
287
289
 
288
290
  #### 2. **DeFi Development** - Core + Covenants + Debug (932KB)
289
291
  ```html
290
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
291
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-covenant.min.js"></script>
292
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-smartcontract.min.js"></script>
292
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
293
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
294
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
293
295
  <script>
294
296
  const covenant = new bsvCovenant.CovenantInterface();
295
297
  const debugInfo = SmartContract.interpretScript(script);
@@ -299,8 +301,8 @@ const contractTx = covenant.createCovenantTransaction({
299
301
 
300
302
  #### 3. **Security First** - Core + Enhanced Security (739KB)
301
303
  ```html
302
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.min.js"></script>
303
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv-security.min.js"></script>
304
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
305
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
304
306
  <script>
305
307
  const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
306
308
  const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
@@ -309,7 +311,7 @@ const contractTx = covenant.createCovenantTransaction({
309
311
 
310
312
  #### 4. **Everything Bundle** - One File Solution (764KB)
311
313
  ```html
312
- <script src="https://unpkg.com/@smartledger/bsv@3.3.3/bsv.bundle.js"></script>
314
+ <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
313
315
  <script>
314
316
  // Everything available under bsv namespace
315
317
  const keys = bsv.SmartLedgerBundle.generateKeys();
@@ -682,11 +684,28 @@ const timelockScript = helper.createTimelockScript(
682
684
  - [🔧 **Integration Guide**](SMARTCONTRACT_INTEGRATION.md) - Smart contract integration
683
685
 
684
686
  ### 📋 **Examples & Demos**
685
- - [📁 **Examples Directory**](examples/) - Working code examples
687
+ - [ **Interactive Demos**](demos/) - **NEW!** HTML & Node.js smart contract demos
688
+ - [�📁 **Examples Directory**](examples/) - Working code examples
686
689
  - [🎯 **Basic Examples**](examples/basic/) - Simple transactions & addresses
687
690
  - [🔒 **Covenant Examples**](examples/covenants/) - Smart contract patterns
688
691
  - [📊 **Advanced Examples**](examples/covenants2/) - Production patterns
689
692
 
693
+ **🎮 Try the Interactive Demos:**
694
+ ```bash
695
+ # Terminal-based interactive demo
696
+ npm run demo
697
+
698
+ # Or run specific features
699
+ npm run demo:basics # Library basics & tests
700
+ npm run demo:covenant # Covenant builder
701
+ npm run demo:preimage # BIP-143 preimage parser
702
+ npm run demo:utxo # UTXO generator
703
+ npm run demo:scripts # Script tools
704
+
705
+ # Web-based demo (open in browser)
706
+ npm run demo:web
707
+ ```
708
+
690
709
  ### 🔍 **Troubleshooting & Support**
691
710
  - [📚 **Complete Documentation**](docs/README.md) - Organized documentation hub
692
711
  - [❓ **Issues & Solutions**](https://github.com/codenlighten/smartledger-bsv/issues) - Community support
@@ -713,6 +732,6 @@ We welcome contributions to SmartLedger-BSV! Please see our [Contributing Guide]
713
732
 
714
733
  ---
715
734
 
716
- **SmartLedger-BSV v3.3.3** - *Complete Bitcoin SV Development Framework*
735
+ **SmartLedger-BSV v3.3.4** - *Complete Bitcoin SV Development Framework*
717
736
 
718
737
  Built with ❤️ for the Bitcoin SV ecosystem • 9 Loading Options • Enterprise Ready