evm-chains-info 0.0.30 → 0.0.32

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/evm-chains-info CHANGED
@@ -32,8 +32,8 @@
32
32
 
33
33
  const
34
34
  _libcrash =
35
- require(
36
- 'crash-js');
35
+ await import(
36
+ "libcrash-js");
37
37
  /* global
38
38
  _argv_get */
39
39
  const
@@ -49,11 +49,21 @@ const
49
49
  const
50
50
  _cmdline_check =
51
51
  _libcrash._cmdline_check;
52
+ /* global
53
+ _exit */
54
+ const
55
+ _exit =
56
+ _libcrash._exit;
52
57
  /* global
53
58
  _get_date_human */
54
59
  const
55
60
  _get_date_human =
56
61
  _libcrash._get_date_human;
62
+ /* global
63
+ _global_get */
64
+ const
65
+ _global_get =
66
+ _libcrash._global_get;
57
67
  /* global
58
68
  _msg_info */
59
69
  const
@@ -70,14 +80,14 @@ const
70
80
  _override_set =
71
81
  _libcrash._override_set;
72
82
  /* global
73
- _exit */
83
+ _set */
74
84
  const
75
- _exit =
76
- _libcrash._exit;
85
+ _set =
86
+ _libcrash._set;
77
87
 
78
88
  const
79
89
  _libevm_chains_info =
80
- require(
90
+ await import(
81
91
  "./libevm-chains-info");
82
92
  /* global
83
93
  _evm_chains_db_path_get */
@@ -120,87 +130,122 @@ function
120
130
  /* global
121
131
  app_name:
122
132
  writable */
123
- app_name =
124
- "evm-chains-info.js";
133
+ _set(
134
+ "app",
135
+ "name",
136
+ "evm-chains-info.js");
125
137
  /* global
126
138
  app_opts:
127
139
  writable */
128
- app_opts =
129
- [];
140
+ _set(
141
+ "app",
142
+ "opts",
143
+ []);
130
144
  /* global
131
145
  runtime_environment:
132
146
  writable */
133
- runtime_environment =
134
- "";
147
+ _set(
148
+ "runtime",
149
+ "environment",
150
+ "");
135
151
  /* global
136
152
  call_date:
137
153
  writable */
138
- call_date =
139
- "";
154
+ _set(
155
+ "call",
156
+ "date",
157
+ "");
140
158
  /* global
141
159
  target_command:
142
160
  writable */
143
- target_command =
144
- "";
161
+ _set(
162
+ "target",
163
+ "command",
164
+ "");
145
165
  /* global
146
166
  input_type:
147
167
  writable */
148
- input_type =
149
- "";
168
+ _set(
169
+ "input",
170
+ "type",
171
+ "");
150
172
  /* global
151
173
  output_type:
152
174
  writable */
153
- output_type =
154
- "";
175
+ _set(
176
+ "output",
177
+ "type",
178
+ "");
155
179
  /* global
156
180
  retrieval_mode:
157
181
  writable */
158
- retrieval_mode =
159
- "";
182
+ _set(
183
+ "retrieval",
184
+ "mode",
185
+ "");
160
186
  /* global
161
187
  db_types:
162
188
  writable */
163
- db_types =
164
- [];
189
+ _set(
190
+ "retrieval",
191
+ "mode",
192
+ []);
165
193
  /* global
166
194
  user_level:
167
195
  writable */
168
- user_level =
169
- "";
196
+ _set(
197
+ "user",
198
+ "level",
199
+ "");
170
200
  /* global
171
201
  db_paths:
172
202
  writable */
173
- db_paths =
174
- [];
203
+ _set(
204
+ "db",
205
+ "paths",
206
+ []);
175
207
  /* global
176
208
  selection_method:
177
209
  writable */
178
- selection_method =
179
- "";
210
+ _set(
211
+ "selection",
212
+ "method",
213
+ "");
180
214
  /* global
181
215
  api_key:
182
216
  writable */
183
- api_key =
184
- "";
217
+ _set(
218
+ "api",
219
+ "key",
220
+ "");
185
221
  /* global
186
222
  target_chain:
187
223
  writable */
188
- target_chain =
189
- "";
224
+ _set(
225
+ "target",
226
+ "chain",
227
+ "");
190
228
  /* global
191
229
  networks_all:
192
230
  writable */
193
- networks_all =
194
- "";
231
+ _set(
232
+ "networks",
233
+ "all",
234
+ "");
195
235
  /* global
196
236
  quiet:
197
237
  writable */
198
- quiet =
238
+ const
239
+ _global =
240
+ _global_get();
241
+ _global[
242
+ "quiet"] =
199
243
  "";
200
244
  /* global
201
245
  verbose:
202
246
  writable */
203
- verbose =
247
+ _global[
248
+ "verbose"] =
204
249
  "";
205
250
  }
206
251
 
@@ -336,7 +381,7 @@ function
336
381
  _exit_code);
337
382
  }
338
383
 
339
- function
384
+ async function
340
385
  _cmdline_parse() {
341
386
  let
342
387
  _help_display,
@@ -352,7 +397,7 @@ function
352
397
  };
353
398
  const
354
399
  _argv =
355
- _argv_get(
400
+ await _argv_get(
356
401
  _argv_args);
357
402
  const
358
403
  _options =
@@ -592,11 +637,11 @@ async function
592
637
  }
593
638
 
594
639
  _global_variables();
595
- if ( _cmdline_check(
640
+ if ( await _cmdline_check(
596
641
  "evm-chains-info.js") ||
597
- _cmdline_check(
642
+ await _cmdline_check(
598
643
  "evm-chains-info") ) {
599
- _cmdline_parse();
644
+ await _cmdline_parse();
600
645
  }
601
646
  else{
602
647
  _url_parse();
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ /** ---------------------------------------------------------
4
+ * fs-worker.webpack.config.cjs
5
+ * ---------------------------------------------------------
6
+ * Copyright ©
7
+ * Pellegrino Prevete
8
+ * 2025, 2026
9
+ *
10
+ * All rights reserved
11
+ * ---------------------------------------------------------
12
+ *
13
+ * This program is free software: you can redistribute it and/or
14
+ * modify it under the terms of the GNU General Public License
15
+ * as published by the Free Software Foundation, either
16
+ * version 3 of the License, or (at your option) any later
17
+ * version.
18
+ *
19
+ * This program is distributed in the hope that it will be
20
+ * useful, but WITHOUT ANY WARRANTY; without even the implied
21
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22
+ * PURPOSE.
23
+ * See the GNU General Public License for more details.
24
+ *
25
+ * You should have received a copy of the
26
+ * GNU General Public License along with this program.
27
+ * If not, see <https://www.gnu.org/licenses/>.
28
+ */
29
+
30
+ const
31
+ _path =
32
+ require(
33
+ 'path');
34
+ const
35
+ _output_dir =
36
+ _path.resolve(
37
+ __dirname);
38
+ const
39
+ _input_file_name =
40
+ "fs-worker";
41
+ const
42
+ _input_file_path =
43
+ `./node_modules/opfs/${_input_file_name}`;
44
+ const
45
+ _output_file_name =
46
+ `${_input_file_name}.js`;
47
+ const
48
+ _output = {
49
+ path:
50
+ _output_dir,
51
+ filename:
52
+ _output_file_name
53
+ };
54
+ module.exports = {
55
+ entry:
56
+ _input_file_path,
57
+ output:
58
+ _output,
59
+ optimization: {
60
+ moduleIds: 'deterministic',
61
+ },
62
+ resolve: {
63
+ alias: {
64
+ "fs":
65
+ _path.resolve(
66
+ __dirname,
67
+ "node_modules/fs/fs"),
68
+ "node:fs":
69
+ _path.resolve(
70
+ __dirname,
71
+ "node_modules/opfs/opfs"),
72
+ "opfs":
73
+ _path.resolve(
74
+ __dirname,
75
+ 'node_modules/opfs/opfs'),
76
+ "path":
77
+ _path.resolve(
78
+ __dirname,
79
+ 'node_modules/path/mod.js'),
80
+ },
81
+ }
82
+ };
@@ -37,22 +37,30 @@
37
37
  db_paths:
38
38
  writable */
39
39
  /* global
40
- db_types */
40
+ db_types:
41
+ writable */
41
42
  /* global
42
43
  input_type:
43
44
  writable */
44
45
  /* global
45
- user_level */
46
+ user_level:
47
+ writable */
46
48
  /* global
47
- target_chain */
49
+ target_chain:
50
+ writable */
48
51
  /* global
49
52
  target_network:
50
53
  writable */
51
54
 
52
55
  const
53
56
  _libcrash_module =
54
- require(
55
- "crash-js");
57
+ await import(
58
+ "libcrash-js");
59
+ /* global
60
+ _get */
61
+ const
62
+ _get =
63
+ _libcrash_module._get;
56
64
  /* global
57
65
  _homedir_get */
58
66
  const
@@ -108,14 +116,24 @@ const
108
116
  const
109
117
  _range =
110
118
  _libcrash_module._range;
119
+ /* global
120
+ _require */
121
+ const
122
+ _require =
123
+ _libcrash_module._require;
111
124
  /* global
112
125
  _rm */
113
126
  const
114
127
  _rm =
115
128
  _libcrash_module._rm;
129
+ /* global
130
+ _set */
131
+ const
132
+ _set =
133
+ _libcrash_module._set;
116
134
  const
117
135
  _ethereum_data_module =
118
- require(
136
+ await _require(
119
137
  "ethereum-data");
120
138
  /* global
121
139
  _data_get */
@@ -596,16 +614,61 @@ function
596
614
  }
597
615
 
598
616
  function
599
- _db_types_auto_detect(
600
- _chain_id) {
601
- if ( db_types.length == 0 ) {
602
- db_types.push(
617
+ _db_types_get(
618
+ _chain_id,
619
+ _db_types) {
620
+ let
621
+ _db_paths;
622
+ const
623
+ _db_types_type =
624
+ typeof(
625
+ _db_types);
626
+ if ( _db_types_type == "undefined" ) {
627
+ _db_types =
628
+ [];
629
+ }
630
+ _db_paths =
631
+ _get(
632
+ "db",
633
+ "paths");
634
+ if ( _db_types.length == 0 ) {
635
+ _db_types.push(
603
636
  "node");
604
637
  }
605
- if ( db_paths.length > 0 ) {
606
- db_types.push(
638
+ const
639
+ _db_paths_type =
640
+ typeof(
641
+ _db_paths);
642
+ if ( _db_paths_type == "undefined" ||
643
+ _db_paths_type == "string" ) {
644
+ _db_paths =
645
+ [];
646
+ }
647
+ if ( _db_paths.length > 0 ) {
648
+ _db_types.push(
607
649
  "system");
608
650
  }
651
+ return _db_types;
652
+ }
653
+
654
+ function
655
+ _db_types_auto_detect(
656
+ _chain_id) {
657
+ let
658
+ _db_types;
659
+ _db_types =
660
+ _get(
661
+ "db",
662
+ "types");
663
+ _db_types =
664
+ _db_types_get(
665
+ _db_types);
666
+ if ( 0 < _db_types.length ) {
667
+ _set(
668
+ "db",
669
+ "types",
670
+ _db_types);
671
+ }
609
672
  }
610
673
 
611
674
  async function
@@ -765,7 +828,7 @@ async function
765
828
  _user_level);
766
829
  }
767
830
 
768
- function
831
+ async function
769
832
  _target_network_type_auto_detect() {
770
833
  let
771
834
  _info_get,
@@ -805,7 +868,7 @@ function
805
868
  if ( _info_get ) {
806
869
  const
807
870
  _libevm_module =
808
- require(
871
+ await _require(
809
872
  "libevm");
810
873
  const
811
874
  _rpc_get =
@@ -1065,8 +1128,8 @@ async function
1065
1128
  _msg;
1066
1129
  const
1067
1130
  _evm_wallet_module =
1068
- require(
1069
- "evm-wallet.js");
1131
+ await _require(
1132
+ "evm-wallet");
1070
1133
  const
1071
1134
  _block_number_get =
1072
1135
  _evm_wallet_module._block_number_get;
@@ -1284,28 +1347,49 @@ async function
1284
1347
  1);
1285
1348
  }
1286
1349
  }
1287
-
1288
- module.exports = {
1289
- _data_get:
1290
- _data_get,
1291
- _db_paths_get:
1292
- _db_paths_get,
1293
- _db_paths_auto_detect:
1294
- _db_paths_auto_detect,
1295
- _db_types_auto_detect:
1296
- _db_types_auto_detect,
1297
- _evm_chains_db_path_get:
1298
- _evm_chains_db_path_get,
1299
- _evm_chains_info:
1300
- _evm_chains_info,
1301
- _evm_chains_info_get:
1302
- _evm_chains_info_get,
1303
- _evm_chains_info_set:
1304
- _evm_chains_info_set,
1305
- _input_type_auto_detect:
1306
- _input_type_auto_detect,
1307
- _rpc_backend_get:
1308
- _rpc_backend_get,
1309
- _rpc_backends_get:
1310
- _rpc_backends_get
1350
+
1351
+ // ES6 module exports
1352
+
1353
+ export {
1354
+ _data_get,
1355
+ _db_paths_get,
1356
+ _db_paths_auto_detect,
1357
+ _db_types_auto_detect,
1358
+ _evm_chains_db_path_get,
1359
+ _evm_chains_info,
1360
+ _evm_chains_info_get,
1361
+ _evm_chains_info_set,
1362
+ _input_type_auto_detect,
1363
+ _rpc_backend_get,
1364
+ _rpc_backends_get,
1365
+ _target_network_type_auto_detect
1311
1366
  };
1367
+
1368
+ // Common Javascript exports
1369
+
1370
+ // module.exports = {
1371
+ // _data_get:
1372
+ // _data_get,
1373
+ // _db_paths_get:
1374
+ // _db_paths_get,
1375
+ // _db_paths_auto_detect:
1376
+ // _db_paths_auto_detect,
1377
+ // _db_types_auto_detect:
1378
+ // _db_types_auto_detect,
1379
+ // _evm_chains_db_path_get:
1380
+ // _evm_chains_db_path_get,
1381
+ // _evm_chains_info:
1382
+ // _evm_chains_info,
1383
+ // _evm_chains_info_get:
1384
+ // _evm_chains_info_get,
1385
+ // _evm_chains_info_set:
1386
+ // _evm_chains_info_set,
1387
+ // _input_type_auto_detect:
1388
+ // _input_type_auto_detect,
1389
+ // _rpc_backend_get:
1390
+ // _rpc_backend_get,
1391
+ // _rpc_backends_get:
1392
+ // _rpc_backends_get,
1393
+ // _target_network_type_auto_detect:
1394
+ // _target_network_type_auto_detect
1395
+ // };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name":
3
3
  "evm-chains-info",
4
4
  "version":
5
- "0.0.30",
5
+ "0.0.32",
6
6
  "description":
7
7
  "Returns information about Ethereum Virtual Machine (EVM) blockchains.",
8
8
  "funding": {
@@ -21,11 +21,10 @@
21
21
  "dist",
22
22
  "evm-chains-info",
23
23
  "libevm-chains-info",
24
- "fs-worker.webpack.config.js",
25
- "index.html",
24
+ "fs-worker.webpack.config.cjs",
26
25
  "package.json",
27
26
  "serve.json",
28
- "webpack.config.js"
27
+ "webpack.config.cjs"
29
28
  ],
30
29
  "keywords": [
31
30
  "ur",
@@ -58,44 +57,44 @@
58
57
  },
59
58
  "devDependencies": {
60
59
  "crash-js-webpack":
61
- "^0.0.45",
60
+ "^0.0.59",
62
61
  "flatted":
63
- "^3.2.9",
62
+ "^3.4.4",
64
63
  "eslint":
65
- "^10.0.3",
64
+ "^10.9.0",
66
65
  "globals":
67
66
  "^17.3.0",
68
67
  "@eslint/js":
69
68
  "^10.0.1",
70
69
  "safely-serve":
71
- "^0.0.9",
70
+ "^0.0.16",
72
71
  "webpack":
73
72
  "^5.109.2",
74
73
  "webpack-cli":
75
74
  "^7.2.2"
76
75
  },
77
76
  "dependencies": {
78
- "crash-js":
79
- "^0.1111.1111111111111111",
77
+ "libcrash-js":
78
+ "npm:crash-js@^100001.1000000000000001.1000000000000001",
80
79
  "ethereum-data":
81
- "^0.0.6",
80
+ "^0.0.9",
82
81
  "yargs":
83
82
  "18.0.0"
84
83
  },
85
84
  "optionalDependencies": {
86
- "evm-wallet.js":
87
- "^0.0.70"
85
+ "evm-wallet":
86
+ "npm:evm-wallet.js@^0.0.75"
88
87
  },
89
88
  "overrides": {
90
89
  "evm-chains-info":
91
90
  "./libevm-chains-info",
92
91
  "evm-contracts-tools":
93
- "^0.0.45",
94
- "evm-wallet.js":
95
- "^0.0.70"
92
+ "^0.0.50",
93
+ "evm-wallet":
94
+ "npm:evm-wallet.js@^0.0.75"
96
95
  },
97
96
  "type":
98
- "commonjs",
97
+ "module",
99
98
  "main":
100
99
  "libevm-chains-info",
101
100
  "bin": {