smartledger-bsv 3.3.2 → 3.3.3

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 (79) hide show
  1. package/CHANGELOG.md +211 -83
  2. package/README.md +266 -71
  3. package/bsv-covenant.min.js +26 -3
  4. package/bsv-gdaf.min.js +11 -9
  5. package/bsv-ltp.min.js +10 -8
  6. package/bsv-script-helper.min.js +2 -2
  7. package/bsv-security.min.js +3 -24
  8. package/bsv-shamir.min.js +2 -2
  9. package/bsv-smartcontract.min.js +10 -8
  10. package/bsv.bundle.js +9 -9
  11. package/bsv.min.js +10 -8
  12. package/build/webpack.bundle.config.js +2 -2
  13. package/build/webpack.config.js +2 -2
  14. package/build/webpack.covenant.config.js +2 -2
  15. package/build/webpack.gdaf.config.js +6 -43
  16. package/build/webpack.script-helper.config.js +2 -2
  17. package/build/webpack.security.config.js +2 -2
  18. package/build/webpack.smartcontract.config.js +2 -2
  19. package/bundle-entry.js +1 -341
  20. package/covenant-entry.js +1 -44
  21. package/docs/DOCUMENTATION_REVIEW_REPORT.md +295 -0
  22. package/docs/MODULE_REFERENCE_COMPLETE.md +330 -0
  23. package/docs/README.md +107 -79
  24. package/docs/advanced/LEGAL_TOKEN_PROTOCOL.md +411 -0
  25. package/docs/advanced/SMART_CONTRACT_GUIDE.md +1255 -0
  26. package/docs/advanced/UTXO_MANAGER_GUIDE.md +851 -0
  27. package/docs/api/LTP.md +334 -0
  28. package/docs/getting-started/INSTALLATION.md +410 -0
  29. package/docs/getting-started/QUICK_START.md +180 -0
  30. package/docs/migration/FROM_BSV_1_5_6.md +260 -0
  31. package/docs/technical/GDAF_DEVELOPER_INTERFACE.md +187 -0
  32. package/docs/technical/GDAF_IMPLEMENTATION_COMPLETE.md +190 -0
  33. package/docs/technical/SHAMIR_INTEGRATION_SUMMARY.md +165 -0
  34. package/docs/technical/roadmap.md +1250 -0
  35. package/docs/technical/trust_law.md +142 -0
  36. package/gdaf-entry.js +2 -54
  37. package/index.js +32 -0
  38. package/ltp-entry.js +2 -92
  39. package/package.json +5 -3
  40. package/script-helper-entry.js +1 -49
  41. package/security-entry.js +1 -70
  42. package/shamir-entry.js +1 -173
  43. package/smartcontract-entry.js +1 -133
  44. package/tests/test_builtin_verify.js +117 -0
  45. package/tests/test_debug_integration.js +71 -0
  46. package/tests/test_ecdsa_little.js +70 -0
  47. package/tests/test_smartverify_der.js +110 -0
  48. package/utilities/blockchain-state.js +155 -155
  49. package/utilities/blockchain-state.json +103293 -5244
  50. package/utilities/miner-simulator.js +354 -358
  51. package/utilities/mock-utxo-generator.js +54 -54
  52. package/utilities/raw-tx-examples.js +120 -122
  53. package/utilities/success-demo.js +104 -105
  54. package/utilities/transaction-examples.js +188 -188
  55. package/utilities/utxo-manager.js +91 -91
  56. package/utilities/wallet-setup.js +79 -80
  57. package/utilities/working-signature-demo.js +108 -110
  58. package/SECURITY.md +0 -75
  59. package/architecture_demo.js +0 -247
  60. package/build/bsv-covenant.min.js +0 -10
  61. package/build/bsv-script-helper.min.js +0 -10
  62. package/build/bsv-security.min.js +0 -31
  63. package/build/bsv-smartcontract.min.js +0 -39
  64. package/build/bsv.bundle.js +0 -39
  65. package/build/bsv.min.js +0 -39
  66. package/complete_ltp_demo.js +0 -511
  67. package/shamir_demo.js +0 -121
  68. package/simple_demo.js +0 -204
  69. package/validation_test.js +0 -97
  70. /package/docs/{ADVANCED_COVENANT_DEVELOPMENT.md → advanced/ADVANCED_COVENANT_DEVELOPMENT.md} +0 -0
  71. /package/docs/{CUSTOM_SCRIPT_DEVELOPMENT.md → advanced/CUSTOM_SCRIPT_DEVELOPMENT.md} +0 -0
  72. /package/docs/{block.md → api/BLOCKS.md} +0 -0
  73. /package/docs/{ecies.md → api/ECIES.md} +0 -0
  74. /package/docs/{networks.md → api/NETWORKS.md} +0 -0
  75. /package/docs/{script.md → api/SCRIPTS.md} +0 -0
  76. /package/docs/{transaction.md → api/TRANSACTIONS.md} +0 -0
  77. /package/docs/{unspentoutput.md → api/UTXO.md} +0 -0
  78. /package/{test_shamir.js → tests/test_shamir.js} +0 -0
  79. /package/{test_standalone_shamir.html → tests/test_standalone_shamir.html} +0 -0
@@ -1,12 +1,12 @@
1
1
  const path = require('path')
2
2
 
3
3
  module.exports = {
4
- entry: path.join(__dirname, '/bundle-entry.js'),
4
+ entry: path.join(__dirname, '../bundle-entry.js'),
5
5
  output: {
6
6
  library: 'bsv',
7
7
  libraryTarget: 'umd',
8
8
  globalObject: 'typeof self !== \'undefined\' ? self : this',
9
- path: path.join(__dirname, '/'),
9
+ path: path.resolve(__dirname, '../'),
10
10
  filename: 'bsv.bundle.js'
11
11
  },
12
12
  node: {
@@ -1,12 +1,12 @@
1
1
  var path = require('path')
2
2
 
3
3
  module.exports = {
4
- entry: path.join(__dirname, '/index.js'),
4
+ entry: path.join(__dirname, '../index.js'),
5
5
  output: {
6
6
  library: 'bsv',
7
7
  libraryTarget: 'umd',
8
8
  globalObject: 'typeof self !== \'undefined\' ? self : this',
9
- path: path.join(__dirname, '/'),
9
+ path: path.resolve(__dirname, '../'),
10
10
  filename: 'bsv.min.js'
11
11
  },
12
12
  node: {
@@ -2,9 +2,9 @@ const path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  mode: 'production',
5
- entry: './covenant-entry.js',
5
+ entry: '../covenant-entry.js',
6
6
  output: {
7
- path: path.resolve(__dirname, '.'),
7
+ path: path.resolve(__dirname, '../'),
8
8
  filename: 'bsv-covenant.min.js',
9
9
  library: 'bsvCovenant',
10
10
  libraryTarget: 'var'
@@ -1,54 +1,17 @@
1
1
  const path = require('path')
2
2
 
3
3
  module.exports = {
4
- mode: 'production',
5
4
  entry: './gdaf-entry.js',
5
+ mode: 'production',
6
+ optimization: {
7
+ minimize: true
8
+ },
6
9
  output: {
7
- path: path.resolve(__dirname, 'build'),
10
+ path: path.resolve(__dirname, '../'),
8
11
  filename: 'bsv-gdaf.min.js',
9
- library: 'GDAF',
12
+ library: 'bsvGDAF',
10
13
  libraryTarget: 'umd',
11
14
  globalObject: 'this'
12
15
  },
13
- resolve: {
14
- fallback: {
15
- crypto: require.resolve('crypto-browserify'),
16
- stream: require.resolve('stream-browserify'),
17
- buffer: require.resolve('buffer'),
18
- util: require.resolve('util'),
19
- assert: require.resolve('assert'),
20
- url: require.resolve('url'),
21
- zlib: false,
22
- http: false,
23
- https: false,
24
- os: false,
25
- path: false,
26
- fs: false
27
- }
28
- },
29
- module: {
30
- rules: [
31
- {
32
- test: /\.js$/,
33
- exclude: /node_modules/,
34
- use: {
35
- loader: 'babel-loader',
36
- options: {
37
- presets: ['@babel/preset-env'],
38
- plugins: ['@babel/plugin-transform-runtime']
39
- }
40
- }
41
- }
42
- ]
43
- },
44
- plugins: [
45
- new (require('webpack').ProvidePlugin)({
46
- Buffer: ['buffer', 'Buffer'],
47
- process: 'process/browser'
48
- })
49
- ],
50
- optimization: {
51
- minimize: true
52
- },
53
16
  target: 'web'
54
17
  }
@@ -2,9 +2,9 @@ const path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  mode: 'production',
5
- entry: './script-helper-entry.js',
5
+ entry: '../script-helper-entry.js',
6
6
  output: {
7
- path: path.resolve(__dirname, '.'),
7
+ path: path.resolve(__dirname, '../'),
8
8
  filename: 'bsv-script-helper.min.js',
9
9
  library: 'bsvScriptHelper',
10
10
  libraryTarget: 'var'
@@ -2,9 +2,9 @@ const path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  mode: 'production',
5
- entry: './security-entry.js',
5
+ entry: '../security-entry.js',
6
6
  output: {
7
- path: path.resolve(__dirname, '.'),
7
+ path: path.resolve(__dirname, '../'),
8
8
  filename: 'bsv-security.min.js',
9
9
  library: 'bsvSecurity',
10
10
  libraryTarget: 'var'
@@ -1,12 +1,12 @@
1
1
  const path = require('path')
2
2
 
3
3
  module.exports = {
4
- entry: path.join(__dirname, '/smartcontract-entry.js'),
4
+ entry: path.join(__dirname, '../smartcontract-entry.js'),
5
5
  output: {
6
6
  library: 'bsvSmartContract',
7
7
  libraryTarget: 'umd',
8
8
  globalObject: 'typeof self !== \'undefined\' ? self : this',
9
- path: path.join(__dirname, '/'),
9
+ path: path.resolve(__dirname, '../'),
10
10
  filename: 'bsv-smartcontract.min.js'
11
11
  },
12
12
  externals: {
package/bundle-entry.js CHANGED
@@ -1,341 +1 @@
1
- /**
2
- * SmartLedger BSV Complete Bundle
3
- *
4
- * This bundle includes:
5
- * - Core BSV library with all cryptographic functions
6
- * - Message signing and verification
7
- * - HD wallets and mnemonic generation
8
- * - ECIES encryption/decryption
9
- * - SmartLedger security enhancements
10
- * - All dependencies bundled for standalone usage
11
- *
12
- * Usage:
13
- * <script src="bsv.bundle.js"></script>
14
- * <script>
15
- * // Everything available under 'bsv' namespace
16
- * const key = new bsv.PrivateKey();
17
- * const message = new bsv.Message('hello');
18
- * const mnemonic = new bsv.Mnemonic();
19
- * const encrypted = bsv.ECIES.encrypt(data, publicKey);
20
- * </script>
21
- */
22
-
23
- 'use strict'
24
-
25
- // Load main BSV library
26
- var bsv = require('./index.js')
27
-
28
- // Attach Message functionality
29
- try {
30
- const Message = require('./lib/message/message.js')
31
- bsv.Message = Message
32
-
33
- // Make it available globally for consistency with separate modules
34
- if (typeof window !== 'undefined') {
35
- window.bsvMessage = Message
36
- }
37
- } catch (e) {
38
- console.warn('Message module not available:', e.message)
39
- }
40
-
41
- // Attach Mnemonic functionality with browser crypto polyfill
42
- try {
43
- // Provide crypto polyfill for browser environment
44
- if (typeof window !== 'undefined' && typeof crypto !== 'undefined' && crypto.subtle) {
45
- // Browser environment - provide HMAC polyfill
46
- const originalCrypto = require('crypto')
47
- if (!originalCrypto.createHmac) {
48
- originalCrypto.createHmac = function(algorithm, key) {
49
- return {
50
- update: function(data) { this._data = data; return this; },
51
- digest: function(encoding) {
52
- // Simple fallback - in production you'd want proper HMAC
53
- const hash = bsv.crypto.Hash.sha256(Buffer.concat([
54
- Buffer.isBuffer(key) ? key : Buffer.from(key),
55
- Buffer.isBuffer(this._data) ? this._data : Buffer.from(this._data)
56
- ]));
57
- return encoding === 'hex' ? hash.toString('hex') : hash;
58
- }
59
- };
60
- };
61
- }
62
- }
63
-
64
- const Mnemonic = require('./lib/mnemonic/mnemonic.js')
65
- bsv.Mnemonic = Mnemonic
66
-
67
- // Make it available globally for consistency with separate modules
68
- if (typeof window !== 'undefined') {
69
- window.bsvMnemonic = Mnemonic
70
- }
71
- } catch (e) {
72
- console.warn('Mnemonic module not available:', e.message)
73
- console.warn('This is expected in browser environments without crypto polyfills')
74
-
75
- // Provide a minimal mnemonic alternative for browsers
76
- if (typeof window !== 'undefined') {
77
- bsv.Mnemonic = function() {
78
- throw new Error('Full mnemonic functionality requires Node.js crypto. Use separate bsv-mnemonic.min.js for browser support.');
79
- };
80
- bsv.Mnemonic.fromString = function() {
81
- throw new Error('Full mnemonic functionality requires Node.js crypto. Use separate bsv-mnemonic.min.js for browser support.');
82
- };
83
- }
84
- }
85
-
86
- // Attach ECIES functionality
87
- try {
88
- const ECIES = require('./lib/ecies/index.js')
89
- bsv.ECIES = ECIES
90
- bsv.crypto.ECIES = ECIES
91
-
92
- // Make it available globally for consistency with separate modules
93
- if (typeof window !== 'undefined') {
94
- window.bsvEcies = ECIES
95
- }
96
- } catch (e) {
97
- console.warn('ECIES module not available:', e.message)
98
- }
99
-
100
- // Include SmartContract interface with debug tools (forced for bundle)
101
- try {
102
- const SmartContract = require('./lib/smart_contract')
103
- bsv.SmartContract = SmartContract
104
- console.log('SmartContract interface loaded in bundle with', Object.keys(SmartContract).length, 'methods')
105
- } catch (e) {
106
- console.warn('SmartContract module not available:', e.message)
107
- }
108
-
109
- // Include CovenantInterface for advanced covenant development
110
- try {
111
- const CovenantInterface = require('./lib/covenant-interface.js')
112
- bsv.CovenantInterface = CovenantInterface
113
- console.log('CovenantInterface loaded in bundle')
114
- } catch (e) {
115
- console.warn('CovenantInterface module not available:', e.message)
116
- }
117
-
118
- // Include CustomScriptHelper for simplified script development
119
- try {
120
- const CustomScriptHelper = require('./lib/custom-script-helper.js')
121
- bsv.CustomScriptHelper = CustomScriptHelper
122
- console.log('CustomScriptHelper loaded in bundle')
123
- } catch (e) {
124
- console.warn('CustomScriptHelper module not available:', e.message)
125
- }
126
-
127
- // Include Legal Token Protocol (LTP) - NEW v3.3.0
128
- try {
129
- const LTP = require('./lib/ltp')
130
- bsv.LTP = LTP
131
- console.log('Legal Token Protocol (LTP) loaded in bundle with', Object.keys(LTP).length, 'methods')
132
- } catch (e) {
133
- console.warn('LTP module not available:', e.message)
134
- }
135
-
136
- // Include Global Digital Attestation Framework (GDAF) - NEW v3.3.0
137
- try {
138
- const GDAF = require('./lib/gdaf')
139
- bsv.GDAF = GDAF
140
- console.log('Global Digital Attestation Framework (GDAF) loaded in bundle')
141
- } catch (e) {
142
- console.warn('GDAF module not available:', e.message)
143
- }
144
-
145
- // Include Shamir Secret Sharing - NEW v3.3.0
146
- try {
147
- const Shamir = require('./lib/crypto/shamir')
148
- bsv.crypto.Shamir = Shamir
149
- bsv.Shamir = Shamir
150
- console.log('Shamir Secret Sharing loaded in bundle')
151
- } catch (e) {
152
- console.warn('Shamir module not available:', e.message)
153
- }
154
-
155
- // SmartLedger security modules (matching index.js structure)
156
- bsv.SmartLedger = {
157
- version: bsv.version,
158
- hardenedBy: bsv.hardenedBy,
159
- baseVersion: bsv.baseVersion,
160
- securityFeatures: bsv.securityFeatures,
161
- SmartVerify: bsv.crypto.SmartVerify,
162
- EllipticFixed: bsv.crypto.EllipticFixed
163
- }
164
- bsv.SmartVerify = bsv.crypto.SmartVerify
165
- bsv.EllipticFixed = bsv.crypto.EllipticFixed
166
-
167
- // Internal usage, exposed for testing/advanced tweaking (matching index.js)
168
- if (bsv.Transaction && bsv.Transaction.sighash === undefined) {
169
- try {
170
- bsv.Transaction.sighash = require('./lib/transaction/sighash')
171
- } catch (e) {
172
- console.warn('Transaction.sighash not available:', e.message)
173
- }
174
- }
175
-
176
- // Enhanced bundle information
177
- bsv.bundle = {
178
- version: bsv.version,
179
- includes: [
180
- 'core-bsv',
181
- 'message-signing',
182
- 'hd-wallets',
183
- 'mnemonic-generation',
184
- 'ecies-encryption',
185
- 'smartledger-security',
186
- 'smartcontract-interface',
187
- 'debug-tools',
188
- 'covenant-interface',
189
- 'custom-script-helper',
190
- 'advanced-sighash',
191
- 'legal-token-protocol-ltp',
192
- 'global-digital-attestation-gdaf',
193
- 'shamir-secret-sharing'
194
- ],
195
- size: 'complete',
196
- type: 'all-in-one'
197
- }
198
-
199
- // SmartLedger bundle namespace
200
- bsv.SmartLedgerBundle = {
201
- version: bsv.version,
202
- hardenedBy: bsv.hardenedBy,
203
- bundleIncludes: bsv.bundle.includes,
204
-
205
- // Quick access methods
206
- generateKeys: function() {
207
- const privateKey = new bsv.PrivateKey()
208
- return {
209
- privateKey: privateKey,
210
- publicKey: privateKey.toPublicKey(),
211
- address: privateKey.toAddress()
212
- }
213
- },
214
-
215
- generateMnemonic: function() {
216
- if (!bsv.Mnemonic) {
217
- throw new Error('Mnemonic functionality not available in bundle')
218
- }
219
- // Generate 24-word mnemonic by default (256-bit entropy)
220
- return new bsv.Mnemonic(256)
221
- },
222
-
223
- createMessage: function(text) {
224
- if (!bsv.Message) {
225
- throw new Error('Message functionality not available in bundle')
226
- }
227
- return new bsv.Message(text)
228
- },
229
-
230
- encrypt: function(data, publicKey) {
231
- if (!bsv.ECIES) {
232
- throw new Error('ECIES functionality not available in bundle')
233
- }
234
- return bsv.ECIES.encrypt(data, publicKey)
235
- },
236
-
237
- // SmartContract debug tools (NEW v3.2.1)
238
- examineScript: function(scriptASM) {
239
- if (!bsv.SmartContract || !bsv.SmartContract.examineStack) {
240
- throw new Error('SmartContract debug tools not available in bundle')
241
- }
242
- const script = bsv.Script.fromASM(scriptASM)
243
- return bsv.SmartContract.examineStack(script)
244
- },
245
-
246
- interpretScript: function(scriptASM) {
247
- if (!bsv.SmartContract || !bsv.SmartContract.interpretScript) {
248
- throw new Error('SmartContract debug tools not available in bundle')
249
- }
250
- const script = bsv.Script.fromASM(scriptASM)
251
- return bsv.SmartContract.interpretScript(script)
252
- },
253
-
254
- getScriptMetrics: function(scriptASM) {
255
- if (!bsv.SmartContract || !bsv.SmartContract.getScriptMetrics) {
256
- throw new Error('SmartContract metrics not available in bundle')
257
- }
258
- const script = bsv.Script.fromASM(scriptASM)
259
- return bsv.SmartContract.getScriptMetrics(script)
260
- },
261
-
262
- optimizeScript: function(scriptASM) {
263
- if (!bsv.SmartContract || !bsv.SmartContract.optimizeScript) {
264
- throw new Error('SmartContract optimizer not available in bundle')
265
- }
266
- const script = bsv.Script.fromASM(scriptASM)
267
- return bsv.SmartContract.optimizeScript(script)
268
- },
269
-
270
- // Covenant development (NEW v3.2.1)
271
- createCovenant: function(config) {
272
- if (!bsv.CovenantInterface) {
273
- throw new Error('CovenantInterface not available in bundle')
274
- }
275
- const covenantInterface = new bsv.CovenantInterface()
276
- return covenantInterface.createCovenantTransaction(config)
277
- },
278
-
279
- // Custom script development (NEW v3.2.1)
280
- createCustomSignature: function(transaction, privateKey, inputIndex, lockingScript, satoshis, sighashType) {
281
- if (!bsv.CustomScriptHelper) {
282
- throw new Error('CustomScriptHelper not available in bundle')
283
- }
284
- return bsv.CustomScriptHelper.createSignature(transaction, privateKey, inputIndex, lockingScript, satoshis, sighashType)
285
- },
286
-
287
- // Advanced sighash access (NEW v3.2.1)
288
- calculateSighash: function(transaction, sighashType, inputNumber, subscript, satoshisBN) {
289
- if (!bsv.Transaction || !bsv.Transaction.sighash) {
290
- throw new Error('Advanced sighash functionality not available in bundle')
291
- }
292
- return bsv.Transaction.sighash.sighash(transaction, sighashType, inputNumber, subscript, satoshisBN)
293
- },
294
-
295
- // Legal Token Protocol methods (NEW v3.3.0)
296
- createRightToken: function(type, issuerDID, subjectDID, claim, privateKey, options) {
297
- if (!bsv.LTP) {
298
- throw new Error('Legal Token Protocol (LTP) not available in bundle')
299
- }
300
- return bsv.LTP.prepareRightToken(type, issuerDID, subjectDID, claim, privateKey, options)
301
- },
302
-
303
- verifyRightToken: function(token) {
304
- if (!bsv.LTP) {
305
- throw new Error('Legal Token Protocol (LTP) not available in bundle')
306
- }
307
- return bsv.LTP.prepareRightTokenVerification(token)
308
- },
309
-
310
- // GDAF identity methods (NEW v3.3.0)
311
- createDID: function(publicKey) {
312
- if (!bsv.GDAF) {
313
- throw new Error('Global Digital Attestation Framework (GDAF) not available in bundle')
314
- }
315
- return bsv.GDAF.createDID(publicKey)
316
- },
317
-
318
- issueCredential: function(issuerWIF, payload) {
319
- if (!bsv.GDAF) {
320
- throw new Error('Global Digital Attestation Framework (GDAF) not available in bundle')
321
- }
322
- return bsv.GDAF.issueVC(issuerWIF, payload)
323
- },
324
-
325
- // Shamir Secret Sharing methods (NEW v3.3.0)
326
- splitSecret: function(secret, n, k) {
327
- if (!bsv.Shamir) {
328
- throw new Error('Shamir Secret Sharing not available in bundle')
329
- }
330
- return bsv.Shamir.split(secret, n, k)
331
- },
332
-
333
- reconstructSecret: function(shares) {
334
- if (!bsv.Shamir) {
335
- throw new Error('Shamir Secret Sharing not available in bundle')
336
- }
337
- return bsv.Shamir.reconstruct(shares)
338
- }
339
- }
340
-
341
- module.exports = bsv
1
+ module.exports = require('./index');
package/covenant-entry.js CHANGED
@@ -1,44 +1 @@
1
- /**
2
- * SmartLedger BSV Covenant Interface - Standalone Module
3
- *
4
- * Advanced covenant development framework for Bitcoin SV
5
- * Requires main BSV library to be loaded first.
6
- *
7
- * Usage:
8
- * <script src="bsv.min.js"></script>
9
- * <script src="bsv-covenant.min.js"></script>
10
- * <script>
11
- * const covenant = new bsvCovenant.CovenantInterface();
12
- * const tx = covenant.createCovenantTransaction(config);
13
- * </script>
14
- */
15
-
16
- 'use strict'
17
-
18
- // Verify BSV library is available
19
- if (typeof bsv === 'undefined') {
20
- throw new Error('CovenantInterface requires BSV library. Load bsv.min.js first.');
21
- }
22
-
23
- // Load CovenantInterface
24
- const CovenantInterface = require('./lib/covenant-interface.js');
25
-
26
- // Browser compatibility
27
- if (typeof window !== 'undefined') {
28
- window.bsvCovenant = {
29
- CovenantInterface: CovenantInterface,
30
- version: bsv.version || 'unknown'
31
- };
32
-
33
- // Also attach to main bsv object if available
34
- if (typeof bsv !== 'undefined') {
35
- bsv.CovenantInterface = CovenantInterface;
36
- }
37
-
38
- console.log('CovenantInterface standalone module loaded');
39
- }
40
-
41
- module.exports = {
42
- CovenantInterface: CovenantInterface,
43
- version: bsv.version || 'unknown'
44
- };
1
+ module.exports = require('./lib/smart_contract/covenant');