libevm 0.0.27 → 0.0.28
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/dist/libevm +1 -1
- package/libevm +41 -0
- package/package.json +12 -7
package/libevm
CHANGED
|
@@ -521,6 +521,47 @@ function
|
|
|
521
521
|
0];
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
+
function
|
|
525
|
+
_address_sanity_check(
|
|
526
|
+
_address){
|
|
527
|
+
let
|
|
528
|
+
_error,
|
|
529
|
+
_msg;
|
|
530
|
+
const
|
|
531
|
+
_address_type =
|
|
532
|
+
typeof(
|
|
533
|
+
_address);
|
|
534
|
+
_error =
|
|
535
|
+
false;
|
|
536
|
+
if ( _address_type == "undefined" ) {
|
|
537
|
+
_msg =
|
|
538
|
+
`Undefined address.`;
|
|
539
|
+
_error =
|
|
540
|
+
true;
|
|
541
|
+
}
|
|
542
|
+
else if ( _address_type == "number" ) {
|
|
543
|
+
_msg =
|
|
544
|
+
`Invalid 'number' type for address.`;
|
|
545
|
+
_error =
|
|
546
|
+
true;
|
|
547
|
+
}
|
|
548
|
+
else if ( _address_type == "string" ) {
|
|
549
|
+
if ( ! _address.startsWith(
|
|
550
|
+
"0x") ) {
|
|
551
|
+
_msg =
|
|
552
|
+
`Malformed address '${_address}'.`;
|
|
553
|
+
_error =
|
|
554
|
+
true;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
if ( _error ) {
|
|
558
|
+
_msg_error(
|
|
559
|
+
_msg,
|
|
560
|
+
1);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
|
|
524
565
|
async function
|
|
525
566
|
_wallet_overrides_set(
|
|
526
567
|
_wallet_app,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name":
|
|
3
3
|
"libevm",
|
|
4
4
|
"version":
|
|
5
|
-
"0.0.
|
|
5
|
+
"0.0.28",
|
|
6
6
|
"description":
|
|
7
7
|
"Library providing useful functions to write native applications interacting with EVM-compatible blockchain networks.",
|
|
8
8
|
"funding": {
|
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
"ur",
|
|
31
31
|
"themartiancompany",
|
|
32
32
|
"dogeos",
|
|
33
|
-
"ethereum"
|
|
33
|
+
"ethereum",
|
|
34
|
+
"evmfs",
|
|
35
|
+
"libevm",
|
|
36
|
+
"evm-toolchain"
|
|
34
37
|
],
|
|
35
38
|
"homepage":
|
|
36
39
|
"https://github.com/themartiancompany/libevm.js",
|
|
@@ -56,11 +59,11 @@
|
|
|
56
59
|
},
|
|
57
60
|
"devDependencies": {
|
|
58
61
|
"crash-js-webpack":
|
|
59
|
-
"^0.0.
|
|
62
|
+
"^0.0.31",
|
|
60
63
|
"flatted":
|
|
61
64
|
"^3.2.9",
|
|
62
65
|
"eslint":
|
|
63
|
-
"^10.0
|
|
66
|
+
"^10.3.0",
|
|
64
67
|
"globals":
|
|
65
68
|
"^17.3.0",
|
|
66
69
|
"@eslint/js":
|
|
@@ -74,11 +77,13 @@
|
|
|
74
77
|
},
|
|
75
78
|
"dependencies": {
|
|
76
79
|
"crash-js":
|
|
77
|
-
"^0.1
|
|
80
|
+
"^0.11.1",
|
|
78
81
|
"evm-chains-info":
|
|
79
82
|
"^0.0.22",
|
|
80
83
|
"evm-wallet.js":
|
|
81
|
-
"^0.0.
|
|
84
|
+
"^0.0.55",
|
|
85
|
+
"ws":
|
|
86
|
+
"^8.21.0",
|
|
82
87
|
"yargs":
|
|
83
88
|
"18.0.0"
|
|
84
89
|
},
|
|
@@ -102,7 +107,7 @@
|
|
|
102
107
|
"publish-pnm":
|
|
103
108
|
"npm run build && npm publish --access public",
|
|
104
109
|
"start":
|
|
105
|
-
"npx safely-serve 'dist/libevm'
|
|
110
|
+
"npx safely-serve 'dist/libevm'",
|
|
106
111
|
"test":
|
|
107
112
|
"echo \"Error: no test specified\" && exit 1"
|
|
108
113
|
}
|