@smartledger/bsv 5.0.1 → 5.1.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +50 -50
  3. package/bsv-anchor.min.js +6 -7
  4. package/bsv-covenant.min.js +22 -18
  5. package/bsv-didweb.min.js +6 -7
  6. package/bsv-ecies.min.js +6 -6
  7. package/bsv-gdaf.min.js +19 -21
  8. package/bsv-ltp.min.js +19 -21
  9. package/bsv-message.min.js +4 -4
  10. package/bsv-mnemonic.min.js +6 -7
  11. package/bsv-script-helper.min.js +4 -4
  12. package/bsv-security.min.js +4 -4
  13. package/bsv-shamir.min.js +7 -8
  14. package/bsv-smartcontract.min.js +19 -21
  15. package/bsv-statuslist.min.js +8 -9
  16. package/bsv-vcjwt.min.js +6 -7
  17. package/bsv.bundle.js +19 -21
  18. package/bsv.min.js +19 -21
  19. package/build/webpack.anchor.config.js +4 -6
  20. package/build/webpack.base.js +99 -0
  21. package/build/webpack.bundle.config.js +6 -14
  22. package/build/webpack.config.js +7 -10
  23. package/build/webpack.covenant.config.js +5 -15
  24. package/build/webpack.didweb.config.js +4 -6
  25. package/build/webpack.ecies.config.js +15 -0
  26. package/build/webpack.gdaf.config.js +4 -6
  27. package/build/webpack.ltp.config.js +4 -6
  28. package/build/webpack.message.config.js +15 -0
  29. package/build/webpack.mnemonic.config.js +15 -0
  30. package/build/webpack.script-helper.config.js +5 -15
  31. package/build/webpack.security.config.js +7 -16
  32. package/build/webpack.shamir.config.js +15 -0
  33. package/build/webpack.smartcontract.config.js +5 -12
  34. package/build/webpack.statuslist.config.js +4 -6
  35. package/build/webpack.vcjwt.config.js +4 -6
  36. package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
  37. package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
  38. package/docs/getting-started/INSTALLATION.md +23 -23
  39. package/docs/getting-started/QUICK_START.md +7 -7
  40. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  41. package/package.json +29 -19
  42. package/build/webpack.subproject.config.js +0 -6
@@ -1,11 +1,9 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
- entry: './anchor-entry.js',
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../anchor-entry.js'),
5
6
  mode: 'production',
6
- optimization: {
7
- minimize: true
8
- },
9
7
  output: {
10
8
  path: path.resolve(__dirname, '../'),
11
9
  filename: 'bsv-anchor.min.js',
@@ -14,4 +12,4 @@ module.exports = {
14
12
  globalObject: 'this'
15
13
  },
16
14
  target: 'web'
17
- }
15
+ })
@@ -0,0 +1,99 @@
1
+ 'use strict'
2
+
3
+ // Shared webpack 5 helpers. webpack 5 removed the automatic Node-core polyfills
4
+ // that webpack 4 provided, so every bundle must declare them explicitly:
5
+ // - bundlePolyfills(): for bundles that include bsv's own crypto (full bundle,
6
+ // feature bundles, Shamir CSPRNG via secrets.js) -> real browserify shims +
7
+ // Buffer/process globals.
8
+ // - externStubs(): for bundles that externalize bsv and don't need its crypto
9
+ // -> stub the Node-core modules to empty (the webpack 4 `node: {x:'empty'}`).
10
+ //
11
+ // Both also pin TerserPlugin with extractComments:false so no *.LICENSE.txt
12
+ // sidecar files are emitted (webpack 4 did not emit them; keeps the published
13
+ // file list unchanged).
14
+
15
+ const webpack = require('webpack')
16
+ const TerserPlugin = require('terser-webpack-plugin')
17
+
18
+ const FULL_FALLBACK = {
19
+ crypto: require.resolve('crypto-browserify'),
20
+ stream: require.resolve('stream-browserify'),
21
+ buffer: require.resolve('buffer/'),
22
+ process: require.resolve('process/browser'),
23
+ assert: require.resolve('assert/'),
24
+ util: require.resolve('util/'),
25
+ path: require.resolve('path-browserify'),
26
+ zlib: require.resolve('browserify-zlib'),
27
+ vm: require.resolve('vm-browserify'),
28
+ http: false,
29
+ https: false,
30
+ os: false,
31
+ url: false,
32
+ fs: false,
33
+ net: false,
34
+ tls: false,
35
+ readline: false,
36
+ child_process: false
37
+ }
38
+
39
+ const STUB_FALLBACK = {
40
+ crypto: false,
41
+ stream: false,
42
+ buffer: false,
43
+ process: false,
44
+ assert: false,
45
+ util: false,
46
+ path: false,
47
+ zlib: false,
48
+ vm: false,
49
+ http: false,
50
+ https: false,
51
+ os: false,
52
+ url: false,
53
+ fs: false,
54
+ net: false,
55
+ tls: false,
56
+ readline: false,
57
+ child_process: false
58
+ }
59
+
60
+ function applyOptimization (config) {
61
+ config.optimization = Object.assign({ minimize: true }, config.optimization, {
62
+ minimizer: [new TerserPlugin({ extractComments: false })]
63
+ })
64
+ // These are library bundles; the browser asset-size hints are noise here.
65
+ config.performance = Object.assign({ hints: false }, config.performance)
66
+ }
67
+
68
+ function merge (config, fallback, plugins) {
69
+ config.resolve = config.resolve || {}
70
+ // config-provided fallbacks win over the shared defaults.
71
+ config.resolve.fallback = Object.assign({}, fallback, config.resolve.fallback)
72
+ config.plugins = (config.plugins || []).concat(plugins)
73
+ applyOptimization(config)
74
+ return config
75
+ }
76
+
77
+ // For bundles that include bsv's crypto (need real Node-core shims).
78
+ function bundlePolyfills (config) {
79
+ return merge(config, FULL_FALLBACK, [
80
+ new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'], process: 'process/browser' })
81
+ ])
82
+ }
83
+
84
+ // For bundles that externalize/already-embed bsv and don't need its crypto
85
+ // polyfill: stub the heavy Node-core modules to empty (the webpack 4
86
+ // `node: {x:'empty'}`), but still provide the Buffer and process globals —
87
+ // webpack 4 provided both by default and the embedded bsv code relies on them
88
+ // (e.g. process.browser, Buffer).
89
+ function externStubs (config) {
90
+ const fallback = Object.assign({}, STUB_FALLBACK, {
91
+ buffer: require.resolve('buffer/'),
92
+ process: require.resolve('process/browser')
93
+ })
94
+ return merge(config, fallback, [
95
+ new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'], process: 'process/browser' })
96
+ ])
97
+ }
98
+
99
+ module.exports = { bundlePolyfills, externStubs }
@@ -1,23 +1,15 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
+ // Everything-in-one bundle (bsv.bundle.js). Same polyfill posture as bsv.min.js.
5
+ module.exports = bundlePolyfills({
4
6
  entry: path.join(__dirname, '../bundle-entry.js'),
5
7
  output: {
6
8
  library: 'bsv',
7
9
  libraryTarget: 'umd',
8
- globalObject: 'typeof self !== \'undefined\' ? self : this',
10
+ globalObject: "typeof self !== 'undefined' ? self : this",
9
11
  path: path.resolve(__dirname, '../'),
10
12
  filename: 'bsv.bundle.js'
11
13
  },
12
- node: {
13
- // crypto left to webpack's default polyfill so Shamir (secrets.js) works
14
- // in the browser; bsv's own crypto stays pure-JS.
15
- stream: 'empty',
16
- Buffer: true
17
- },
18
- mode: 'production',
19
- optimization: {
20
- minimize: true
21
- },
22
-
23
- }
14
+ mode: 'production'
15
+ })
@@ -1,20 +1,17 @@
1
1
  var path = require('path')
2
+ var { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
+ // Full library bundle (bsv.min.js). webpack 5: Node-core polyfills are declared
5
+ // via bundlePolyfills (crypto-browserify so secrets.js/Shamir gets a CSPRNG in
6
+ // the browser; Buffer global preserved). bsv's own crypto stays pure-JS.
7
+ module.exports = bundlePolyfills({
4
8
  entry: path.join(__dirname, '../index.js'),
5
9
  output: {
6
10
  library: 'bsv',
7
11
  libraryTarget: 'umd',
8
- globalObject: 'typeof self !== \'undefined\' ? self : this',
12
+ globalObject: "typeof self !== 'undefined' ? self : this",
9
13
  path: path.resolve(__dirname, '../'),
10
14
  filename: 'bsv.min.js'
11
15
  },
12
- node: {
13
- // `crypto` is left to webpack's default polyfill (crypto-browserify) so
14
- // secrets.js (Shamir) can obtain a CSPRNG in the browser. bsv's own crypto
15
- // remains pure-JS. (Previously mocked 'empty', which broke Shamir.)
16
- stream: 'empty',
17
- Buffer: true
18
- },
19
16
  mode: 'production'
20
- }
17
+ })
@@ -1,8 +1,9 @@
1
- const path = require('path');
1
+ const path = require('path')
2
+ const { externStubs } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
+ module.exports = externStubs({
4
5
  mode: 'production',
5
- entry: '../covenant-entry.js',
6
+ entry: path.join(__dirname, '../covenant-entry.js'),
6
7
  output: {
7
8
  path: path.resolve(__dirname, '../'),
8
9
  filename: 'bsv-covenant.min.js',
@@ -12,16 +13,5 @@ module.exports = {
12
13
  externals: {
13
14
  // Don't bundle BSV - it should be loaded separately
14
15
  '../index.js': 'bsv'
15
- },
16
- node: {
17
- fs: 'empty',
18
- path: 'empty',
19
- crypto: 'empty',
20
- stream: 'empty',
21
- assert: 'empty',
22
- http: 'empty',
23
- https: 'empty',
24
- os: 'empty',
25
- url: 'empty'
26
16
  }
27
- };
17
+ })
@@ -1,11 +1,9 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
- entry: './didweb-entry.js',
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../didweb-entry.js'),
5
6
  mode: 'production',
6
- optimization: {
7
- minimize: true
8
- },
9
7
  output: {
10
8
  path: path.resolve(__dirname, '../'),
11
9
  filename: 'bsv-didweb.min.js',
@@ -14,4 +12,4 @@ module.exports = {
14
12
  globalObject: 'this'
15
13
  },
16
14
  target: 'web'
17
- }
15
+ })
@@ -0,0 +1,15 @@
1
+ const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
3
+
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../ecies/index.js'),
6
+ mode: 'production',
7
+ output: {
8
+ path: path.resolve(__dirname, '../'),
9
+ filename: 'bsv-ecies.min.js',
10
+ library: 'bsvEcies',
11
+ libraryTarget: 'var'
12
+ },
13
+ externals: { '../../': 'bsv' },
14
+ target: 'web'
15
+ })
@@ -1,11 +1,9 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
- entry: './gdaf-entry.js',
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../gdaf-entry.js'),
5
6
  mode: 'production',
6
- optimization: {
7
- minimize: true
8
- },
9
7
  output: {
10
8
  path: path.resolve(__dirname, '../'),
11
9
  filename: 'bsv-gdaf.min.js',
@@ -14,4 +12,4 @@ module.exports = {
14
12
  globalObject: 'this'
15
13
  },
16
14
  target: 'web'
17
- }
15
+ })
@@ -1,11 +1,9 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
- entry: './ltp-entry.js',
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../ltp-entry.js'),
5
6
  mode: 'production',
6
- optimization: {
7
- minimize: true
8
- },
9
7
  output: {
10
8
  path: path.resolve(__dirname, '../'),
11
9
  filename: 'bsv-ltp.min.js',
@@ -14,4 +12,4 @@ module.exports = {
14
12
  globalObject: 'this'
15
13
  },
16
14
  target: 'web'
17
- }
15
+ })
@@ -0,0 +1,15 @@
1
+ const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
3
+
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../message/index.js'),
6
+ mode: 'production',
7
+ output: {
8
+ path: path.resolve(__dirname, '../'),
9
+ filename: 'bsv-message.min.js',
10
+ library: 'bsvMessage',
11
+ libraryTarget: 'var'
12
+ },
13
+ externals: { '../../': 'bsv' },
14
+ target: 'web'
15
+ })
@@ -0,0 +1,15 @@
1
+ const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
3
+
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../mnemonic/index.js'),
6
+ mode: 'production',
7
+ output: {
8
+ path: path.resolve(__dirname, '../'),
9
+ filename: 'bsv-mnemonic.min.js',
10
+ library: 'bsvMnemonic',
11
+ libraryTarget: 'var'
12
+ },
13
+ externals: { '../../': 'bsv' },
14
+ target: 'web'
15
+ })
@@ -1,8 +1,9 @@
1
- const path = require('path');
1
+ const path = require('path')
2
+ const { externStubs } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
+ module.exports = externStubs({
4
5
  mode: 'production',
5
- entry: '../script-helper-entry.js',
6
+ entry: path.join(__dirname, '../script-helper-entry.js'),
6
7
  output: {
7
8
  path: path.resolve(__dirname, '../'),
8
9
  filename: 'bsv-script-helper.min.js',
@@ -12,16 +13,5 @@ module.exports = {
12
13
  externals: {
13
14
  // Don't bundle BSV - it should be loaded separately
14
15
  '../index.js': 'bsv'
15
- },
16
- node: {
17
- fs: 'empty',
18
- path: 'empty',
19
- crypto: 'empty',
20
- stream: 'empty',
21
- assert: 'empty',
22
- http: 'empty',
23
- https: 'empty',
24
- os: 'empty',
25
- url: 'empty'
26
16
  }
27
- };
17
+ })
@@ -1,24 +1,15 @@
1
- const path = require('path');
1
+ const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
+ // security-entry embeds bsv (no externals) and needs the crypto polyfill so
5
+ // Shamir/secrets.js gets a CSPRNG in the browser -> full polyfills.
6
+ module.exports = bundlePolyfills({
4
7
  mode: 'production',
5
- entry: '../security-entry.js',
8
+ entry: path.join(__dirname, '../security-entry.js'),
6
9
  output: {
7
10
  path: path.resolve(__dirname, '../'),
8
11
  filename: 'bsv-security.min.js',
9
12
  library: 'bsvSecurity',
10
13
  libraryTarget: 'var'
11
- },
12
- node: {
13
- // crypto left to webpack's default polyfill so Shamir (secrets.js) works
14
- // in the browser; bsv's own crypto stays pure-JS.
15
- fs: 'empty',
16
- path: 'empty',
17
- stream: 'empty',
18
- assert: 'empty',
19
- http: 'empty',
20
- https: 'empty',
21
- os: 'empty',
22
- url: 'empty'
23
14
  }
24
- };
15
+ })
@@ -0,0 +1,15 @@
1
+ const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
3
+
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../shamir-entry.js'),
6
+ mode: 'production',
7
+ output: {
8
+ path: path.resolve(__dirname, '../'),
9
+ filename: 'bsv-shamir.min.js',
10
+ library: 'bsvShamir',
11
+ libraryTarget: 'var'
12
+ },
13
+ externals: { '../../': 'bsv' },
14
+ target: 'web'
15
+ })
@@ -1,11 +1,12 @@
1
1
  const path = require('path')
2
+ const { externStubs } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
+ module.exports = externStubs({
4
5
  entry: path.join(__dirname, '../smartcontract-entry.js'),
5
6
  output: {
6
7
  library: 'bsvSmartContract',
7
8
  libraryTarget: 'umd',
8
- globalObject: 'typeof self !== \'undefined\' ? self : this',
9
+ globalObject: "typeof self !== 'undefined' ? self : this",
9
10
  path: path.resolve(__dirname, '../'),
10
11
  filename: 'bsv-smartcontract.min.js'
11
12
  },
@@ -13,13 +14,5 @@ module.exports = {
13
14
  // Don't bundle BSV - expect it to be loaded separately
14
15
  './index.js': 'bsv'
15
16
  },
16
- node: {
17
- crypto: 'empty',
18
- stream: 'empty',
19
- Buffer: true
20
- },
21
- mode: 'production',
22
- optimization: {
23
- minimize: true
24
- }
25
- }
17
+ mode: 'production'
18
+ })
@@ -1,11 +1,9 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
- entry: './statuslist-entry.js',
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../statuslist-entry.js'),
5
6
  mode: 'production',
6
- optimization: {
7
- minimize: true
8
- },
9
7
  output: {
10
8
  path: path.resolve(__dirname, '../'),
11
9
  filename: 'bsv-statuslist.min.js',
@@ -14,4 +12,4 @@ module.exports = {
14
12
  globalObject: 'this'
15
13
  },
16
14
  target: 'web'
17
- }
15
+ })
@@ -1,11 +1,9 @@
1
1
  const path = require('path')
2
+ const { bundlePolyfills } = require('./webpack.base')
2
3
 
3
- module.exports = {
4
- entry: './vcjwt-entry.js',
4
+ module.exports = bundlePolyfills({
5
+ entry: path.join(__dirname, '../vcjwt-entry.js'),
5
6
  mode: 'production',
6
- optimization: {
7
- minimize: true
8
- },
9
7
  output: {
10
8
  path: path.resolve(__dirname, '../'),
11
9
  filename: 'bsv-vcjwt.min.js',
@@ -14,4 +12,4 @@ module.exports = {
14
12
  globalObject: 'this'
15
13
  },
16
14
  target: 'web'
17
- }
15
+ })
@@ -55,19 +55,19 @@ Three advanced modules totaling **~2.7MB** of functionality:
55
55
  - **Purpose**: Threshold cryptography for secure secret distribution
56
56
  - **Use Cases**: Backup keys, multi-party security, key recovery
57
57
  - **Features**: Split secrets into N shares, require M to reconstruct
58
- - **CDN**: `unpkg.com/@smartledger/bsv@5.0.1/bsv-shamir.min.js`
58
+ - **CDN**: `unpkg.com/@smartledger/bsv@5.1.0/bsv-shamir.min.js`
59
59
 
60
60
  #### **🌐 Global Digital Attestation Framework - GDAF (1184KB)**
61
61
  - **Purpose**: W3C Verifiable Credentials and decentralized identity
62
62
  - **Use Cases**: Identity verification, attestations, zero-knowledge proofs
63
63
  - **Features**: DID creation, credential issuance, selective disclosure
64
- - **CDN**: `unpkg.com/@smartledger/bsv@5.0.1/bsv-gdaf.min.js`
64
+ - **CDN**: `unpkg.com/@smartledger/bsv@5.1.0/bsv-gdaf.min.js`
65
65
 
66
66
  #### **⚖️ Legal Token Protocol - LTP (1184KB)**
67
67
  - **Purpose**: Legal compliance framework for tokenized assets
68
68
  - **Use Cases**: Property rights, obligations, compliant tokenization
69
69
  - **Features**: Legal primitives, compliance checking, attestation anchoring
70
- - **CDN**: `unpkg.com/@smartledger/bsv@5.0.1/bsv-ltp.min.js`
70
+ - **CDN**: `unpkg.com/@smartledger/bsv@5.1.0/bsv-ltp.min.js`
71
71
 
72
72
  ### **2. Incorrect File Sizes in Documentation**
73
73
 
@@ -81,18 +81,18 @@ Three advanced modules totaling **~2.7MB** of functionality:
81
81
 
82
82
  | Module | Size | Use Case | CDN Link |
83
83
  |--------|------|----------|----------|
84
- | **bsv.min.js** | 937KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@5.0.1/bsv.min.js` |
85
- | **bsv.bundle.js** | 937KB | Everything in one file | `unpkg.com/@smartledger/bsv@5.0.1/bsv.bundle.js` |
86
- | **bsv-smartcontract.min.js** | 937KB | Covenant development | `unpkg.com/@smartledger/bsv@5.0.1/bsv-smartcontract.min.js` |
87
- | **bsv-covenant.min.js** | 913KB | Covenant operations | `unpkg.com/@smartledger/bsv@5.0.1/bsv-covenant.min.js` |
88
- | **bsv-script-helper.min.js** | 26KB | Custom script tools | `unpkg.com/@smartledger/bsv@5.0.1/bsv-script-helper.min.js` |
89
- | **bsv-security.min.js** | 26KB | Security enhancements (opt-in helpers — see README › Security) | `unpkg.com/@smartledger/bsv@5.0.1/bsv-security.min.js` |
90
- | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@5.0.1/bsv-ecies.min.js` |
91
- | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@5.0.1/bsv-message.min.js` |
92
- | **bsv-mnemonic.min.js** | 681KB | HD wallets | `unpkg.com/@smartledger/bsv@5.0.1/bsv-mnemonic.min.js` |
93
- | **🆕 bsv-shamir.min.js** | 432KB | **Secret sharing** | `unpkg.com/@smartledger/bsv@5.0.1/bsv-shamir.min.js` |
94
- | **🆕 bsv-gdaf.min.js** | 1184KB | **Digital attestation** | `unpkg.com/@smartledger/bsv@5.0.1/bsv-gdaf.min.js` |
95
- | **🆕 bsv-ltp.min.js** | 1184KB | **Legal tokens** | `unpkg.com/@smartledger/bsv@5.0.1/bsv-ltp.min.js` |
84
+ | **bsv.min.js** | 937KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@5.1.0/bsv.min.js` |
85
+ | **bsv.bundle.js** | 937KB | Everything in one file | `unpkg.com/@smartledger/bsv@5.1.0/bsv.bundle.js` |
86
+ | **bsv-smartcontract.min.js** | 937KB | Covenant development | `unpkg.com/@smartledger/bsv@5.1.0/bsv-smartcontract.min.js` |
87
+ | **bsv-covenant.min.js** | 913KB | Covenant operations | `unpkg.com/@smartledger/bsv@5.1.0/bsv-covenant.min.js` |
88
+ | **bsv-script-helper.min.js** | 26KB | Custom script tools | `unpkg.com/@smartledger/bsv@5.1.0/bsv-script-helper.min.js` |
89
+ | **bsv-security.min.js** | 26KB | Security enhancements (opt-in helpers — see README › Security) | `unpkg.com/@smartledger/bsv@5.1.0/bsv-security.min.js` |
90
+ | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@5.1.0/bsv-ecies.min.js` |
91
+ | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@5.1.0/bsv-message.min.js` |
92
+ | **bsv-mnemonic.min.js** | 681KB | HD wallets | `unpkg.com/@smartledger/bsv@5.1.0/bsv-mnemonic.min.js` |
93
+ | **🆕 bsv-shamir.min.js** | 432KB | **Secret sharing** | `unpkg.com/@smartledger/bsv@5.1.0/bsv-shamir.min.js` |
94
+ | **🆕 bsv-gdaf.min.js** | 1184KB | **Digital attestation** | `unpkg.com/@smartledger/bsv@5.1.0/bsv-gdaf.min.js` |
95
+ | **🆕 bsv-ltp.min.js** | 1184KB | **Legal tokens** | `unpkg.com/@smartledger/bsv@5.1.0/bsv-ltp.min.js` |
96
96
 
97
97
  ## 🎯 **Updated Usage Examples**
98
98
 
@@ -100,22 +100,22 @@ Three advanced modules totaling **~2.7MB** of functionality:
100
100
 
101
101
  #### **1. Basic Development (~963KB)**
102
102
  ```html
103
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv.min.js"></script>
104
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-script-helper.min.js"></script>
103
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv.min.js"></script>
104
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-script-helper.min.js"></script>
105
105
  ```
106
106
 
107
107
  #### **2. Smart Contract Development (~2.7MB — each bundle re-embeds core BSV)**
108
108
  ```html
109
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv.min.js"></script>
110
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-covenant.min.js"></script>
111
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-smartcontract.min.js"></script>
109
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv.min.js"></script>
110
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-covenant.min.js"></script>
111
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-smartcontract.min.js"></script>
112
112
  ```
113
113
 
114
114
  #### **3. 🆕 Legal & Compliance Development (~3.2MB — each bundle re-embeds core BSV)**
115
115
  ```html
116
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv.min.js"></script>
117
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-ltp.min.js"></script>
118
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-gdaf.min.js"></script>
116
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv.min.js"></script>
117
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-ltp.min.js"></script>
118
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-gdaf.min.js"></script>
119
119
  <script>
120
120
  // Legal Token Protocol
121
121
  const legalToken = bsv.createLegalToken({
@@ -132,9 +132,9 @@ Three advanced modules totaling **~2.7MB** of functionality:
132
132
 
133
133
  #### **4. 🆕 Security & Cryptography (~1.4MB)**
134
134
  ```html
135
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv.min.js"></script>
136
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-security.min.js"></script>
137
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv-shamir.min.js"></script>
135
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv.min.js"></script>
136
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-security.min.js"></script>
137
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv-shamir.min.js"></script>
138
138
  <script>
139
139
  // Shamir Secret Sharing
140
140
  const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
@@ -146,7 +146,7 @@ Three advanced modules totaling **~2.7MB** of functionality:
146
146
 
147
147
  #### **5. Everything Bundle (937KB)**
148
148
  ```html
149
- <script src="https://unpkg.com/@smartledger/bsv@5.0.1/bsv.bundle.js"></script>
149
+ <script src="https://unpkg.com/@smartledger/bsv@5.1.0/bsv.bundle.js"></script>
150
150
  <script>
151
151
  // Everything available immediately
152
152
  const shares = bsv.splitSecret('secret', 5, 3);
@@ -722,7 +722,7 @@ interface UTXO {
722
722
  <html>
723
723
  <head>
724
724
  <title>UTXO Manager Demo</title>
725
- <script src="https://cdn.jsdelivr.net/npm/@smartledger/bsv@5.0.1/bsv.min.js"></script>
725
+ <script src="https://cdn.jsdelivr.net/npm/@smartledger/bsv@5.1.0/bsv.min.js"></script>
726
726
  </head>
727
727
  <body>
728
728
  <script>