essential-eth 0.5.4 → 0.5.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.
- package/lib/cjs/classes/utils/fetchers.d.ts +1 -1
- package/lib/cjs/index.d.ts +9 -5
- package/lib/cjs/index.js +10 -2
- package/lib/cjs/logger/package-version.d.ts +1 -1
- package/lib/cjs/logger/package-version.js +1 -1
- package/lib/cjs/providers/BaseProvider.d.ts +14 -0
- package/lib/cjs/providers/BaseProvider.js +19 -0
- package/lib/cjs/providers/FallthroughProvider.d.ts +1 -2
- package/lib/cjs/providers/utils/chains-info.d.ts +16 -0
- package/lib/cjs/providers/utils/chains-info.js +50 -2
- package/lib/cjs/utils/compute-address.d.ts +8 -0
- package/lib/cjs/utils/compute-address.js +24 -0
- package/lib/cjs/utils/compute-public-key.d.ts +9 -0
- package/lib/cjs/utils/compute-public-key.js +17 -0
- package/lib/cjs/utils/split-signature.d.ts +26 -0
- package/lib/cjs/utils/split-signature.js +165 -0
- package/lib/esm/classes/utils/fetchers.d.ts +1 -1
- package/lib/esm/index.d.ts +9 -5
- package/lib/esm/index.js +7 -3
- package/lib/esm/logger/package-version.d.ts +1 -1
- package/lib/esm/logger/package-version.js +1 -1
- package/lib/esm/providers/BaseProvider.d.ts +1 -0
- package/lib/esm/providers/BaseProvider.js +6 -0
- package/lib/esm/providers/FallthroughProvider.d.ts +1 -2
- package/lib/esm/providers/utils/chains-info.d.ts +16 -0
- package/lib/esm/providers/utils/chains-info.js +50 -2
- package/lib/esm/utils/compute-address.d.ts +1 -0
- package/lib/esm/utils/compute-address.js +11 -0
- package/lib/esm/utils/compute-public-key.d.ts +2 -0
- package/lib/esm/utils/compute-public-key.js +6 -0
- package/lib/esm/utils/split-signature.d.ts +2 -0
- package/lib/esm/utils/split-signature.js +126 -0
- package/package.json +13 -10
- package/readme.md +615 -93
package/lib/esm/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { Contract } from './classes/Contract';
|
|
2
|
-
import { FallthroughProvider } from './providers/FallthroughProvider';
|
|
1
|
+
import { BaseContract, Contract } from './classes/Contract';
|
|
2
|
+
import { FallthroughProvider, } from './providers/FallthroughProvider';
|
|
3
3
|
import { JsonRpcProvider, jsonRpcProvider } from './providers/JsonRpcProvider';
|
|
4
4
|
import { tinyBig, TinyBig } from './shared/tiny-big/tiny-big';
|
|
5
|
+
import { computeAddress } from './utils/compute-address';
|
|
6
|
+
import { computePublicKey } from './utils/compute-public-key';
|
|
5
7
|
import { etherToGwei } from './utils/ether-to-gwei';
|
|
6
8
|
import { etherToWei } from './utils/ether-to-wei';
|
|
7
9
|
import { gweiToEther } from './utils/gwei-to-ether';
|
|
10
|
+
import { hashMessage } from './utils/hash-message';
|
|
8
11
|
import { isAddress } from './utils/is-address';
|
|
12
|
+
import { splitSignature } from './utils/split-signature';
|
|
9
13
|
import { toChecksumAddress } from './utils/to-checksum-address';
|
|
10
14
|
import { toUtf8Bytes } from './utils/to-utf8-bytes';
|
|
11
15
|
import { weiToEther } from './utils/wei-to-ether';
|
|
@@ -13,4 +17,4 @@ export * from './utils/bytes';
|
|
|
13
17
|
export * from './utils/hash-message';
|
|
14
18
|
export * from './utils/keccak256';
|
|
15
19
|
export * from './utils/solidity-keccak256';
|
|
16
|
-
export { etherToWei, etherToGwei, isAddress, jsonRpcProvider, JsonRpcProvider, FallthroughProvider, tinyBig, toChecksumAddress, weiToEther, gweiToEther, toUtf8Bytes, Contract, TinyBig, };
|
|
20
|
+
export { etherToWei, etherToGwei, isAddress, jsonRpcProvider, JsonRpcProvider, FallthroughProvider, tinyBig, toChecksumAddress, weiToEther, gweiToEther, hashMessage, splitSignature, toUtf8Bytes, computeAddress, computePublicKey, Contract, TinyBig, BaseContract, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.5.
|
|
1
|
+
export declare const version = "0.5.5";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.5.
|
|
1
|
+
export const version = '0.5.5';
|
|
@@ -9,6 +9,7 @@ export declare abstract class BaseProvider {
|
|
|
9
9
|
protected _post: (body: Record<string, unknown>) => Promise<any>;
|
|
10
10
|
constructor(rpcUrls: string[]);
|
|
11
11
|
getNetwork(): Promise<Network>;
|
|
12
|
+
getBlockNumber(): Promise<number>;
|
|
12
13
|
getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
13
14
|
getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
14
15
|
getTransactionCount(address: string, blockTag?: BlockTag): Promise<number>;
|
|
@@ -32,6 +32,12 @@ export class BaseProvider {
|
|
|
32
32
|
};
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
+
getBlockNumber() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const currentBlockNumber = (yield this.post(buildRPCPostBody('eth_blockNumber', [])));
|
|
38
|
+
return Number(hexToDecimal(currentBlockNumber));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
35
41
|
getTransaction(transactionHash) {
|
|
36
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
43
|
const [rpcTransaction, blockNumber] = yield Promise.all([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseProvider } from './BaseProvider';
|
|
2
|
-
interface ConstructorOptions {
|
|
2
|
+
export interface ConstructorOptions {
|
|
3
3
|
timeoutDuration?: number;
|
|
4
4
|
}
|
|
5
5
|
export declare class FallthroughProvider extends BaseProvider {
|
|
@@ -9,4 +9,3 @@ export declare class FallthroughProvider extends BaseProvider {
|
|
|
9
9
|
constructor(rpcUrls: string[], options?: ConstructorOptions);
|
|
10
10
|
post: (body: Record<string, unknown>) => Promise<any>;
|
|
11
11
|
}
|
|
12
|
-
export {};
|
|
@@ -119,6 +119,7 @@ declare const _default: {
|
|
|
119
119
|
"222": string[];
|
|
120
120
|
"225": string[];
|
|
121
121
|
"226": string[];
|
|
122
|
+
"239": string[];
|
|
122
123
|
"246": string[];
|
|
123
124
|
"250": string[];
|
|
124
125
|
"256": string[];
|
|
@@ -143,10 +144,14 @@ declare const _default: {
|
|
|
143
144
|
"499": string[];
|
|
144
145
|
"512": string[];
|
|
145
146
|
"513": string[];
|
|
147
|
+
"534": string[];
|
|
146
148
|
"555": string[];
|
|
147
149
|
"558": string[];
|
|
148
150
|
"588": string[];
|
|
151
|
+
"592": string[];
|
|
149
152
|
"595": string[];
|
|
153
|
+
"596": string[];
|
|
154
|
+
"597": string[];
|
|
150
155
|
"600": string[];
|
|
151
156
|
"666": string[];
|
|
152
157
|
"686": string[];
|
|
@@ -154,6 +159,7 @@ declare const _default: {
|
|
|
154
159
|
"707": string[];
|
|
155
160
|
"708": string[];
|
|
156
161
|
"721": string[];
|
|
162
|
+
"776": string[];
|
|
157
163
|
"777": string[];
|
|
158
164
|
"787": string[];
|
|
159
165
|
"788": string[];
|
|
@@ -201,14 +207,18 @@ declare const _default: {
|
|
|
201
207
|
"1620": string[];
|
|
202
208
|
"1657": string[];
|
|
203
209
|
"1688": string[];
|
|
210
|
+
"1819": string[];
|
|
204
211
|
"1856": string[];
|
|
205
212
|
"1898": string[];
|
|
206
213
|
"1984": string[];
|
|
207
214
|
"1987": string[];
|
|
208
215
|
"2001": string[];
|
|
216
|
+
"2008": string[];
|
|
217
|
+
"2009": string[];
|
|
209
218
|
"2020": string[];
|
|
210
219
|
"2021": string[];
|
|
211
220
|
"2022": string[];
|
|
221
|
+
"2023": string[];
|
|
212
222
|
"2025": string[];
|
|
213
223
|
"2100": string[];
|
|
214
224
|
"2101": string[];
|
|
@@ -219,6 +229,8 @@ declare const _default: {
|
|
|
219
229
|
"2223": string[];
|
|
220
230
|
"2559": string[];
|
|
221
231
|
"2569": string[];
|
|
232
|
+
"2612": string[];
|
|
233
|
+
"2613": string[];
|
|
222
234
|
"3000": string[];
|
|
223
235
|
"3001": string[];
|
|
224
236
|
"3331": string[];
|
|
@@ -254,6 +266,7 @@ declare const _default: {
|
|
|
254
266
|
"8723": string[];
|
|
255
267
|
"8724": string[];
|
|
256
268
|
"8888": string[];
|
|
269
|
+
"8898": string[];
|
|
257
270
|
"8995": string[];
|
|
258
271
|
"9000": string[];
|
|
259
272
|
"9001": string[];
|
|
@@ -274,10 +287,13 @@ declare const _default: {
|
|
|
274
287
|
"19845": string[];
|
|
275
288
|
"21337": string[];
|
|
276
289
|
"21816": string[];
|
|
290
|
+
"22023": string[];
|
|
277
291
|
"24484": string[];
|
|
278
292
|
"24734": string[];
|
|
293
|
+
"30067": string[];
|
|
279
294
|
"31102": string[];
|
|
280
295
|
"31337": string[];
|
|
296
|
+
"32520": string[];
|
|
281
297
|
"32659": string[];
|
|
282
298
|
"39797": string[];
|
|
283
299
|
"42069": string[];
|
|
@@ -363,6 +363,9 @@ export default {
|
|
|
363
363
|
"226": [
|
|
364
364
|
"TLA"
|
|
365
365
|
],
|
|
366
|
+
"239": [
|
|
367
|
+
"AITD"
|
|
368
|
+
],
|
|
366
369
|
"246": [
|
|
367
370
|
"ewt"
|
|
368
371
|
],
|
|
@@ -435,6 +438,9 @@ export default {
|
|
|
435
438
|
"513": [
|
|
436
439
|
"aact"
|
|
437
440
|
],
|
|
441
|
+
"534": [
|
|
442
|
+
"CNDL"
|
|
443
|
+
],
|
|
438
444
|
"555": [
|
|
439
445
|
"CLASS"
|
|
440
446
|
],
|
|
@@ -444,9 +450,18 @@ export default {
|
|
|
444
450
|
"588": [
|
|
445
451
|
"metis-stardust"
|
|
446
452
|
],
|
|
453
|
+
"592": [
|
|
454
|
+
"astr"
|
|
455
|
+
],
|
|
447
456
|
"595": [
|
|
448
457
|
"maca"
|
|
449
458
|
],
|
|
459
|
+
"596": [
|
|
460
|
+
"tkar"
|
|
461
|
+
],
|
|
462
|
+
"597": [
|
|
463
|
+
"taca"
|
|
464
|
+
],
|
|
450
465
|
"600": [
|
|
451
466
|
"mesh-chain-testnet"
|
|
452
467
|
],
|
|
@@ -468,6 +483,9 @@ export default {
|
|
|
468
483
|
"721": [
|
|
469
484
|
"tfeth"
|
|
470
485
|
],
|
|
486
|
+
"776": [
|
|
487
|
+
"opc"
|
|
488
|
+
],
|
|
471
489
|
"777": [
|
|
472
490
|
"cth"
|
|
473
491
|
],
|
|
@@ -609,6 +627,9 @@ export default {
|
|
|
609
627
|
"1688": [
|
|
610
628
|
"LUDAN"
|
|
611
629
|
],
|
|
630
|
+
"1819": [
|
|
631
|
+
"cubet"
|
|
632
|
+
],
|
|
612
633
|
"1856": [
|
|
613
634
|
"tsf"
|
|
614
635
|
],
|
|
@@ -624,6 +645,12 @@ export default {
|
|
|
624
645
|
"2001": [
|
|
625
646
|
"milkAda"
|
|
626
647
|
],
|
|
648
|
+
"2008": [
|
|
649
|
+
"cloudwalk_testnet"
|
|
650
|
+
],
|
|
651
|
+
"2009": [
|
|
652
|
+
"cloudwalk_mainnet"
|
|
653
|
+
],
|
|
627
654
|
"2020": [
|
|
628
655
|
"420"
|
|
629
656
|
],
|
|
@@ -633,6 +660,9 @@ export default {
|
|
|
633
660
|
"2022": [
|
|
634
661
|
"edgt"
|
|
635
662
|
],
|
|
663
|
+
"2023": [
|
|
664
|
+
"taycan-testnet"
|
|
665
|
+
],
|
|
636
666
|
"2025": [
|
|
637
667
|
"rpg"
|
|
638
668
|
],
|
|
@@ -663,6 +693,12 @@ export default {
|
|
|
663
693
|
"2569": [
|
|
664
694
|
"tpc"
|
|
665
695
|
],
|
|
696
|
+
"2612": [
|
|
697
|
+
"EZChain"
|
|
698
|
+
],
|
|
699
|
+
"2613": [
|
|
700
|
+
"Fuji-EZChain"
|
|
701
|
+
],
|
|
666
702
|
"3000": [
|
|
667
703
|
"cennz-r"
|
|
668
704
|
],
|
|
@@ -768,6 +804,9 @@ export default {
|
|
|
768
804
|
"8888": [
|
|
769
805
|
"ambrostestnet"
|
|
770
806
|
],
|
|
807
|
+
"8898": [
|
|
808
|
+
"mmt"
|
|
809
|
+
],
|
|
771
810
|
"8995": [
|
|
772
811
|
"berg"
|
|
773
812
|
],
|
|
@@ -826,7 +865,10 @@ export default {
|
|
|
826
865
|
"cennz-a"
|
|
827
866
|
],
|
|
828
867
|
"21816": [
|
|
829
|
-
"
|
|
868
|
+
"omc"
|
|
869
|
+
],
|
|
870
|
+
"22023": [
|
|
871
|
+
"SFL"
|
|
830
872
|
],
|
|
831
873
|
"24484": [
|
|
832
874
|
"web"
|
|
@@ -834,12 +876,18 @@ export default {
|
|
|
834
876
|
"24734": [
|
|
835
877
|
"mintme"
|
|
836
878
|
],
|
|
879
|
+
"30067": [
|
|
880
|
+
"Piece"
|
|
881
|
+
],
|
|
837
882
|
"31102": [
|
|
838
883
|
"esn"
|
|
839
884
|
],
|
|
840
885
|
"31337": [
|
|
841
886
|
"got"
|
|
842
887
|
],
|
|
888
|
+
"32520": [
|
|
889
|
+
"Brise"
|
|
890
|
+
],
|
|
843
891
|
"32659": [
|
|
844
892
|
"fsn"
|
|
845
893
|
],
|
|
@@ -874,7 +922,7 @@ export default {
|
|
|
874
922
|
"ALFA"
|
|
875
923
|
],
|
|
876
924
|
"45000": [
|
|
877
|
-
"
|
|
925
|
+
"Autobahn Network"
|
|
878
926
|
],
|
|
879
927
|
"47805": [
|
|
880
928
|
"REI"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function computeAddress(key: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { computePublicKey, toChecksumAddress } from '..';
|
|
2
|
+
import { hexDataSlice } from './bytes';
|
|
3
|
+
import { keccak256 } from './keccak256';
|
|
4
|
+
export function computeAddress(key) {
|
|
5
|
+
if (!key.startsWith('0x04') &&
|
|
6
|
+
!key.startsWith('0x03') &&
|
|
7
|
+
!key.startsWith('0x02')) {
|
|
8
|
+
key = computePublicKey(key);
|
|
9
|
+
}
|
|
10
|
+
return toChecksumAddress(hexDataSlice(keccak256(hexDataSlice(key, 1)), 12));
|
|
11
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { logger } from './../logger/logger';
|
|
2
|
+
import { arrayify, hexlify, hexZeroPad, isBytesLike, isHexString, zeroPad, } from './bytes';
|
|
3
|
+
export function splitSignature(signature) {
|
|
4
|
+
const result = {
|
|
5
|
+
r: '0x',
|
|
6
|
+
s: '0x',
|
|
7
|
+
_vs: '0x',
|
|
8
|
+
recoveryParam: 0,
|
|
9
|
+
v: 0,
|
|
10
|
+
yParityAndS: '0x',
|
|
11
|
+
compact: '0x',
|
|
12
|
+
};
|
|
13
|
+
if (isBytesLike(signature)) {
|
|
14
|
+
const bytes = arrayify(signature);
|
|
15
|
+
if (bytes.length === 64) {
|
|
16
|
+
result.v = 27 + (bytes[32] >> 7);
|
|
17
|
+
bytes[32] &= 0x7f;
|
|
18
|
+
result.r = hexlify(bytes.slice(0, 32));
|
|
19
|
+
result.s = hexlify(bytes.slice(32, 64));
|
|
20
|
+
}
|
|
21
|
+
else if (bytes.length === 65) {
|
|
22
|
+
result.r = hexlify(bytes.slice(0, 32));
|
|
23
|
+
result.s = hexlify(bytes.slice(32, 64));
|
|
24
|
+
result.v = bytes[64];
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
logger.throwArgumentError('invalid signature string', 'signature', signature);
|
|
28
|
+
}
|
|
29
|
+
if (result.v < 27) {
|
|
30
|
+
if (result.v === 0 || result.v === 1) {
|
|
31
|
+
result.v += 27;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
logger.throwArgumentError('signature invalid v byte', 'signature', signature);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
result.recoveryParam = 1 - (result.v % 2);
|
|
38
|
+
if (result.recoveryParam) {
|
|
39
|
+
bytes[32] |= 0x80;
|
|
40
|
+
}
|
|
41
|
+
result._vs = hexlify(bytes.slice(32, 64));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
result.r = signature.r;
|
|
45
|
+
result.s = signature.s;
|
|
46
|
+
result.v = signature.v;
|
|
47
|
+
result.recoveryParam = signature.recoveryParam;
|
|
48
|
+
result._vs = signature._vs;
|
|
49
|
+
if (result._vs != null) {
|
|
50
|
+
const vs_1 = zeroPad(arrayify(result._vs), 32);
|
|
51
|
+
result._vs = hexlify(vs_1);
|
|
52
|
+
const recoveryParam = vs_1[0] >= 128 ? 1 : 0;
|
|
53
|
+
if (result.recoveryParam == null) {
|
|
54
|
+
result.recoveryParam = recoveryParam;
|
|
55
|
+
}
|
|
56
|
+
else if (result.recoveryParam !== recoveryParam) {
|
|
57
|
+
logger.throwArgumentError('signature recoveryParam mismatch _vs', 'signature', signature);
|
|
58
|
+
}
|
|
59
|
+
vs_1[0] &= 0x7f;
|
|
60
|
+
const s = hexlify(vs_1);
|
|
61
|
+
if (result.s == null) {
|
|
62
|
+
result.s = s;
|
|
63
|
+
}
|
|
64
|
+
else if (result.s !== s) {
|
|
65
|
+
logger.throwArgumentError('signature v mismatch _vs', 'signature', signature);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (result.recoveryParam == null) {
|
|
69
|
+
if (result.v == null) {
|
|
70
|
+
logger.throwArgumentError('signature missing v and recoveryParam', 'signature', signature);
|
|
71
|
+
}
|
|
72
|
+
else if (result.v === 0 || result.v === 1) {
|
|
73
|
+
result.recoveryParam = result.v;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
result.recoveryParam = 1 - (result.v % 2);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
if (result.v == null) {
|
|
81
|
+
result.v = 27 + result.recoveryParam;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
const recId = result.v === 0 || result.v === 1 ? result.v : 1 - (result.v % 2);
|
|
85
|
+
if (result.recoveryParam !== recId) {
|
|
86
|
+
logger.throwArgumentError('signature recoveryParam mismatch v', 'signature', signature);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (result.r == null || !isHexString(result.r)) {
|
|
91
|
+
logger.throwArgumentError('signature missing or invalid r', 'signature', signature);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
result.r = hexZeroPad(result.r, 32);
|
|
95
|
+
}
|
|
96
|
+
if (result.s == null || !isHexString(result.s)) {
|
|
97
|
+
logger.throwArgumentError('signature missing or invalid s', 'signature', signature);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
result.s = hexZeroPad(result.s, 32);
|
|
101
|
+
}
|
|
102
|
+
const vs = arrayify(result.s);
|
|
103
|
+
if (vs[0] >= 128) {
|
|
104
|
+
logger.throwArgumentError('signature s out of range', 'signature', signature);
|
|
105
|
+
}
|
|
106
|
+
if (result.recoveryParam) {
|
|
107
|
+
vs[0] |= 0x80;
|
|
108
|
+
}
|
|
109
|
+
const _vs = hexlify(vs);
|
|
110
|
+
if (result._vs) {
|
|
111
|
+
if (!isHexString(result._vs)) {
|
|
112
|
+
logger.throwArgumentError('signature invalid _vs', 'signature', signature);
|
|
113
|
+
}
|
|
114
|
+
result._vs = hexZeroPad(result._vs, 32);
|
|
115
|
+
}
|
|
116
|
+
if (result._vs == null) {
|
|
117
|
+
result._vs = _vs;
|
|
118
|
+
}
|
|
119
|
+
else if (result._vs !== _vs) {
|
|
120
|
+
logger.throwArgumentError('signature _vs mismatch v and s', 'signature', signature);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
result.yParityAndS = result._vs;
|
|
124
|
+
result.compact = result.r + result.yParityAndS.substring(2);
|
|
125
|
+
return result;
|
|
126
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "essential-eth",
|
|
3
|
-
"description": "Ultralight JS
|
|
4
|
-
"version": "0.5.
|
|
3
|
+
"description": "Ultralight JS for Ethereum",
|
|
4
|
+
"version": "0.5.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"tsc:esm": "tsc -p tsconfig.json",
|
|
23
23
|
"tsc:cjs": "tsc -p tsconfig-cjs.json",
|
|
24
24
|
"build": "rm -rf lib && npm run compile",
|
|
25
|
+
"build:readme": ". ./scripts/markdown-magic/build-readme.sh",
|
|
25
26
|
"jest": "jest",
|
|
26
27
|
"build:chains-info": "npx ts-node scripts/fetch-chains-info.ts # used in getNetwork()",
|
|
27
28
|
"update-deps": "sh ./scripts/pre-commit.sh",
|
|
@@ -29,23 +30,24 @@
|
|
|
29
30
|
"prepare": "husky install",
|
|
30
31
|
"version": "npx genversion --es6 src/logger/package-version.ts && git add src/logger/package-version.ts",
|
|
31
32
|
"postversion": "git push --follow-tags",
|
|
32
|
-
"prepublishOnly": "npm run build"
|
|
33
|
+
"prepublishOnly": "npm run build",
|
|
34
|
+
"doc": "typedoc"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
37
|
"@types/body-parser": "^1.19.1",
|
|
36
|
-
"@types/eslint": "^8.4.
|
|
38
|
+
"@types/eslint": "^8.4.2",
|
|
37
39
|
"@types/express": "^4.17.13",
|
|
38
40
|
"@types/jest": "^27.4.1",
|
|
39
41
|
"@types/jest-dev-server": "^5.0.0",
|
|
40
42
|
"@types/node": "^16.10.1",
|
|
41
43
|
"@types/prettier": "^2.4.4",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
43
|
-
"@typescript-eslint/parser": "^5.
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
|
45
|
+
"@typescript-eslint/parser": "^5.25.0",
|
|
44
46
|
"body-parser": "^1.19.0",
|
|
45
47
|
"dotenv": "^16.0.0",
|
|
46
|
-
"eslint": "^8.
|
|
47
|
-
"eslint-plugin-jest": "^26.
|
|
48
|
-
"ethers": "^5.6.
|
|
48
|
+
"eslint": "^8.16.0",
|
|
49
|
+
"eslint-plugin-jest": "^26.2.2",
|
|
50
|
+
"ethers": "^5.6.7",
|
|
49
51
|
"express": "^4.17.1",
|
|
50
52
|
"husky": "^7.0.4",
|
|
51
53
|
"jest": "^27.5.1",
|
|
@@ -58,11 +60,12 @@
|
|
|
58
60
|
"prettier-plugin-organize-imports": "^2.3.4",
|
|
59
61
|
"ts-jest": "^27.1.4",
|
|
60
62
|
"ts-node": "^10.2.1",
|
|
61
|
-
"typedoc": "^0.22.
|
|
63
|
+
"typedoc": "^0.22.15",
|
|
62
64
|
"typescript": "^4.6.4",
|
|
63
65
|
"web3": "^1.7.3"
|
|
64
66
|
},
|
|
65
67
|
"dependencies": {
|
|
68
|
+
"@noble/secp256k1": "^1.5.5",
|
|
66
69
|
"@types/big.js": "^6.1.3",
|
|
67
70
|
"big.js": "^6.1.1",
|
|
68
71
|
"isomorphic-unfetch": "^3.1.0",
|