essential-eth 0.4.9-beta.2 → 0.4.9

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 (116) hide show
  1. package/{dist → lib}/cjs/classes/Contract.d.ts +0 -0
  2. package/{dist → lib}/cjs/classes/Contract.js +3 -8
  3. package/{dist → lib}/cjs/classes/test/Contract/crv-abi.d.ts +0 -0
  4. package/{dist → lib}/cjs/classes/test/Contract/crv-abi.js +0 -0
  5. package/{dist → lib}/cjs/classes/test/Contract/ens-abi.d.ts +0 -0
  6. package/{dist → lib}/cjs/classes/test/Contract/ens-abi.js +0 -0
  7. package/{dist → lib}/cjs/classes/test/Contract/fei-abi.d.ts +0 -0
  8. package/{dist → lib}/cjs/classes/test/Contract/fei-abi.js +0 -0
  9. package/{dist → lib}/cjs/classes/test/Contract/foo-abi.d.ts +0 -0
  10. package/{dist → lib}/cjs/classes/test/Contract/foo-abi.js +0 -0
  11. package/{dist → lib}/cjs/classes/test/Contract/uniswap-abi.d.ts +0 -0
  12. package/{dist → lib}/cjs/classes/test/Contract/uniswap-abi.js +0 -0
  13. package/{dist → lib}/cjs/classes/utils/clean-block.d.ts +0 -0
  14. package/{dist → lib}/cjs/classes/utils/clean-block.js +0 -0
  15. package/{dist → lib}/cjs/classes/utils/clean-transaction.d.ts +0 -0
  16. package/{dist → lib}/cjs/classes/utils/clean-transaction.js +0 -0
  17. package/{dist → lib}/cjs/classes/utils/encode-decode-transaction.d.ts +0 -0
  18. package/{dist → lib}/cjs/classes/utils/encode-decode-transaction.js +0 -0
  19. package/{dist → lib}/cjs/classes/utils/fetchers.d.ts +1 -1
  20. package/lib/cjs/classes/utils/fetchers.js +51 -0
  21. package/{dist → lib}/cjs/classes/utils/hex-to-decimal.d.ts +0 -0
  22. package/{dist → lib}/cjs/classes/utils/hex-to-decimal.js +0 -0
  23. package/{dist → lib}/cjs/index.d.ts +5 -2
  24. package/lib/cjs/index.js +19 -0
  25. package/{dist → lib}/cjs/providers/JsonRpcProvider.d.ts +8 -3
  26. package/{dist → lib}/cjs/providers/JsonRpcProvider.js +18 -23
  27. package/lib/cjs/providers/test/rpc-urls.d.ts +3 -0
  28. package/lib/cjs/providers/test/rpc-urls.js +6 -0
  29. package/{dist → lib}/cjs/providers/utils/chains-info.d.ts +19 -1
  30. package/{dist → lib}/cjs/providers/utils/chains-info.js +57 -3
  31. package/{dist → lib}/cjs/shared/tiny-big/helpers.d.ts +0 -0
  32. package/{dist → lib}/cjs/shared/tiny-big/helpers.js +0 -0
  33. package/{dist → lib}/cjs/shared/tiny-big/tiny-big.d.ts +0 -0
  34. package/{dist → lib}/cjs/shared/tiny-big/tiny-big.js +0 -0
  35. package/{dist → lib}/cjs/shared/validate-type.d.ts +0 -0
  36. package/{dist → lib}/cjs/shared/validate-type.js +0 -0
  37. package/{dist → lib}/cjs/types/Block.types.d.ts +0 -0
  38. package/{dist → lib}/cjs/types/Block.types.js +0 -0
  39. package/{dist → lib}/cjs/types/Contract.types.d.ts +0 -0
  40. package/{dist → lib}/cjs/types/Contract.types.js +0 -0
  41. package/{dist → lib}/cjs/types/Network.types.d.ts +0 -0
  42. package/{dist → lib}/cjs/types/Network.types.js +0 -0
  43. package/{dist → lib}/cjs/types/Transaction.types.d.ts +0 -0
  44. package/{dist → lib}/cjs/types/Transaction.types.js +0 -0
  45. package/{dist → lib}/cjs/utils/ether-to-wei.d.ts +0 -0
  46. package/{dist → lib}/cjs/utils/ether-to-wei.js +0 -0
  47. package/{dist → lib}/cjs/utils/is-address.d.ts +0 -0
  48. package/{dist → lib}/cjs/utils/is-address.js +0 -0
  49. package/{dist → lib}/cjs/utils/to-checksum-address.d.ts +0 -0
  50. package/{dist → lib}/cjs/utils/to-checksum-address.js +0 -0
  51. package/{dist → lib}/cjs/utils/wei-to-ether.d.ts +0 -0
  52. package/{dist → lib}/cjs/utils/wei-to-ether.js +0 -0
  53. package/{dist → lib}/esm/classes/Contract.d.ts +0 -0
  54. package/{dist → lib}/esm/classes/Contract.js +3 -8
  55. package/{dist → lib}/esm/classes/test/Contract/crv-abi.d.ts +0 -0
  56. package/{dist → lib}/esm/classes/test/Contract/crv-abi.js +0 -0
  57. package/{dist → lib}/esm/classes/test/Contract/ens-abi.d.ts +0 -0
  58. package/{dist → lib}/esm/classes/test/Contract/ens-abi.js +0 -0
  59. package/{dist → lib}/esm/classes/test/Contract/fei-abi.d.ts +0 -0
  60. package/{dist → lib}/esm/classes/test/Contract/fei-abi.js +0 -0
  61. package/{dist → lib}/esm/classes/test/Contract/foo-abi.d.ts +0 -0
  62. package/{dist → lib}/esm/classes/test/Contract/foo-abi.js +0 -0
  63. package/{dist → lib}/esm/classes/test/Contract/uniswap-abi.d.ts +0 -0
  64. package/{dist → lib}/esm/classes/test/Contract/uniswap-abi.js +0 -0
  65. package/{dist → lib}/esm/classes/utils/clean-block.d.ts +0 -0
  66. package/{dist → lib}/esm/classes/utils/clean-block.js +0 -0
  67. package/{dist → lib}/esm/classes/utils/clean-transaction.d.ts +0 -0
  68. package/{dist → lib}/esm/classes/utils/clean-transaction.js +0 -0
  69. package/{dist → lib}/esm/classes/utils/encode-decode-transaction.d.ts +0 -0
  70. package/{dist → lib}/esm/classes/utils/encode-decode-transaction.js +0 -0
  71. package/{dist → lib}/esm/classes/utils/fetchers.d.ts +1 -1
  72. package/lib/esm/classes/utils/fetchers.js +43 -0
  73. package/{dist → lib}/esm/classes/utils/hex-to-decimal.d.ts +0 -0
  74. package/{dist → lib}/esm/classes/utils/hex-to-decimal.js +0 -0
  75. package/{dist → lib}/esm/index.d.ts +5 -2
  76. package/lib/esm/index.js +8 -0
  77. package/{dist → lib}/esm/providers/JsonRpcProvider.d.ts +4 -3
  78. package/{dist → lib}/esm/providers/JsonRpcProvider.js +14 -23
  79. package/lib/esm/providers/test/rpc-urls.d.ts +3 -0
  80. package/lib/esm/providers/test/rpc-urls.js +3 -0
  81. package/{dist → lib}/esm/providers/utils/chains-info.d.ts +19 -1
  82. package/{dist → lib}/esm/providers/utils/chains-info.js +57 -3
  83. package/{dist → lib}/esm/shared/tiny-big/helpers.d.ts +0 -0
  84. package/{dist → lib}/esm/shared/tiny-big/helpers.js +0 -0
  85. package/{dist → lib}/esm/shared/tiny-big/tiny-big.d.ts +0 -0
  86. package/{dist → lib}/esm/shared/tiny-big/tiny-big.js +0 -0
  87. package/{dist → lib}/esm/shared/validate-type.d.ts +0 -0
  88. package/{dist → lib}/esm/shared/validate-type.js +0 -0
  89. package/{dist → lib}/esm/types/Block.types.d.ts +0 -0
  90. package/{dist → lib}/esm/types/Block.types.js +0 -0
  91. package/{dist → lib}/esm/types/Contract.types.d.ts +0 -0
  92. package/{dist → lib}/esm/types/Contract.types.js +0 -0
  93. package/{dist → lib}/esm/types/Network.types.d.ts +0 -0
  94. package/{dist → lib}/esm/types/Network.types.js +0 -0
  95. package/{dist → lib}/esm/types/Transaction.types.d.ts +0 -0
  96. package/{dist → lib}/esm/types/Transaction.types.js +0 -0
  97. package/{dist → lib}/esm/utils/ether-to-wei.d.ts +0 -0
  98. package/{dist → lib}/esm/utils/ether-to-wei.js +0 -0
  99. package/{dist → lib}/esm/utils/is-address.d.ts +0 -0
  100. package/{dist → lib}/esm/utils/is-address.js +0 -0
  101. package/{dist → lib}/esm/utils/to-checksum-address.d.ts +0 -0
  102. package/{dist → lib}/esm/utils/to-checksum-address.js +0 -0
  103. package/{dist → lib}/esm/utils/wei-to-ether.d.ts +0 -0
  104. package/{dist → lib}/esm/utils/wei-to-ether.js +0 -0
  105. package/package.json +11 -32
  106. package/readme.md +35 -9
  107. package/dist/cjs/classes/utils/fetchers.js +0 -33
  108. package/dist/cjs/index.js +0 -26
  109. package/dist/cjs/tsconfig-cjs.tsbuildinfo +0 -1
  110. package/dist/cjs/utils/index.d.ts +0 -5
  111. package/dist/cjs/utils/index.js +0 -11
  112. package/dist/esm/classes/utils/fetchers.js +0 -25
  113. package/dist/esm/index.js +0 -5
  114. package/dist/esm/tsconfig.tsbuildinfo +0 -1
  115. package/dist/esm/utils/index.d.ts +0 -5
  116. package/dist/esm/utils/index.js +0 -5
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  export declare function post(url: string, body: Record<string, unknown>): Promise<any>;
2
- declare type RPCMethodName = 'eth_getBlockByNumber' | 'eth_call' | 'eth_chainId';
2
+ declare type RPCMethodName = 'eth_getBlockByNumber' | 'eth_call' | 'eth_chainId' | 'eth_gasPrice';
3
3
  export declare function buildRPCPostBody(method: RPCMethodName, params: any[]): {
4
4
  jsonrpc: string;
5
5
  id: number;
@@ -0,0 +1,43 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import unfetch from 'isomorphic-unfetch';
11
+ export function post(url, body) {
12
+ return unfetch(url, {
13
+ method: 'POST',
14
+ headers: {
15
+ 'Content-Type': 'application/json',
16
+ },
17
+ body: JSON.stringify(body),
18
+ })
19
+ .then((r) => __awaiter(this, void 0, void 0, function* () {
20
+ const t = yield r.text();
21
+ try {
22
+ return JSON.parse(t);
23
+ }
24
+ catch (_a) {
25
+ throw new Error(`Invalid JSON RPC response: "${t}"`);
26
+ }
27
+ }))
28
+ .then((response) => {
29
+ const result = response === null || response === void 0 ? void 0 : response.result;
30
+ if (!result) {
31
+ throw new Error(`Invalid JSON RPC response: ${JSON.stringify(response)}`);
32
+ }
33
+ return response.result;
34
+ });
35
+ }
36
+ export function buildRPCPostBody(method, params) {
37
+ return {
38
+ jsonrpc: '2.0',
39
+ id: 1,
40
+ method,
41
+ params,
42
+ };
43
+ }
@@ -5,5 +5,8 @@ import { Block } from './types/Block.types';
5
5
  import { ContractTypes, JSONABI, JSONABIArgument } from './types/Contract.types';
6
6
  import { Network } from './types/Network.types';
7
7
  import { Transaction } from './types/Transaction.types';
8
- export * from './utils';
9
- export { jsonRpcProvider, JsonRpcProvider, tinyBig, Contract, TinyBig, Block, ContractTypes, JSONABI, JSONABIArgument, Network, Transaction, };
8
+ import { etherToWei } from './utils/ether-to-wei';
9
+ import { isAddress } from './utils/is-address';
10
+ import { toChecksumAddress } from './utils/to-checksum-address';
11
+ import { weiToEther } from './utils/wei-to-ether';
12
+ export { etherToWei, isAddress, jsonRpcProvider, JsonRpcProvider, tinyBig, toChecksumAddress, weiToEther, Contract, TinyBig, Block, ContractTypes, JSONABI, JSONABIArgument, Network, Transaction, };
@@ -0,0 +1,8 @@
1
+ import { Contract } from './classes/Contract';
2
+ import { JsonRpcProvider, jsonRpcProvider } from './providers/JsonRpcProvider';
3
+ import { tinyBig, TinyBig } from './shared/tiny-big/tiny-big';
4
+ import { etherToWei } from './utils/ether-to-wei';
5
+ import { isAddress } from './utils/is-address';
6
+ import { toChecksumAddress } from './utils/to-checksum-address';
7
+ import { weiToEther } from './utils/wei-to-ether';
8
+ export { etherToWei, isAddress, jsonRpcProvider, JsonRpcProvider, tinyBig, toChecksumAddress, weiToEther, Contract, TinyBig, };
@@ -1,10 +1,11 @@
1
+ import { TinyBig } from '../shared/tiny-big/tiny-big';
1
2
  import { Block } from '../types/Block.types';
2
3
  import { Network } from '../types/Network.types';
3
4
  export declare class JsonRpcProvider {
4
- readonly _rpcUrl: Array<string>;
5
- _rpcUrlCounter: number;
6
- constructor(rpcUrl?: string | Array<string>);
5
+ readonly _rpcUrl: string;
6
+ constructor(rpcUrl?: string);
7
7
  getBlock(timeFrame: 'latest' | 'earliest' | 'pending' | number, returnTransactionObjects?: boolean): Promise<Block>;
8
8
  getNetwork(): Promise<Network>;
9
+ getGasPrice(): Promise<TinyBig>;
9
10
  }
10
11
  export declare function jsonRpcProvider(rpcUrl?: string): JsonRpcProvider;
@@ -10,19 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { cleanBlock } from '../classes/utils/clean-block';
11
11
  import { buildRPCPostBody, post } from '../classes/utils/fetchers';
12
12
  import { hexToDecimal } from '../classes/utils/hex-to-decimal';
13
+ import { tinyBig } from '../shared/tiny-big/tiny-big';
13
14
  import chainsInfo from './utils/chains-info';
14
15
  export class JsonRpcProvider {
15
16
  constructor(rpcUrl) {
16
- this._rpcUrl = (() => {
17
- if (!rpcUrl) {
18
- return ['https://free-eth-node.com/api/eth'];
19
- }
20
- else if (!Array.isArray(rpcUrl)) {
21
- return [rpcUrl];
22
- }
23
- return rpcUrl;
24
- })();
25
- this._rpcUrlCounter = 0;
17
+ this._rpcUrl = rpcUrl || 'https://free-eth-node.com/api/eth';
26
18
  }
27
19
  getBlock(timeFrame, returnTransactionObjects = false) {
28
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -34,15 +26,10 @@ export class JsonRpcProvider {
34
26
  rpcTimeFrame = timeFrame;
35
27
  }
36
28
  const req = () => __awaiter(this, void 0, void 0, function* () {
37
- return yield post(this._rpcUrl[this._rpcUrlCounter], buildRPCPostBody('eth_getBlockByNumber', [
29
+ return yield post(this._rpcUrl, buildRPCPostBody('eth_getBlockByNumber', [
38
30
  rpcTimeFrame,
39
31
  returnTransactionObjects,
40
- ])).catch((e) => {
41
- if (e.code === 'ENOTFOUND') {
42
- this._rpcUrlCounter++;
43
- return req();
44
- }
45
- });
32
+ ]));
46
33
  });
47
34
  const nodeResponse = (yield req());
48
35
  return cleanBlock(nodeResponse, returnTransactionObjects);
@@ -51,12 +38,7 @@ export class JsonRpcProvider {
51
38
  getNetwork() {
52
39
  return __awaiter(this, void 0, void 0, function* () {
53
40
  const req = () => __awaiter(this, void 0, void 0, function* () {
54
- return yield post(this._rpcUrl[this._rpcUrlCounter], buildRPCPostBody('eth_chainId', [])).catch((e) => {
55
- if (e.code === 'ENOTFOUND') {
56
- this._rpcUrlCounter++;
57
- return req();
58
- }
59
- });
41
+ return yield post(this._rpcUrl, buildRPCPostBody('eth_chainId', []));
60
42
  });
61
43
  const nodeResponse = (yield req());
62
44
  const chainId = hexToDecimal(nodeResponse);
@@ -68,6 +50,15 @@ export class JsonRpcProvider {
68
50
  };
69
51
  });
70
52
  }
53
+ getGasPrice() {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const req = () => __awaiter(this, void 0, void 0, function* () {
56
+ return yield post(this._rpcUrl, buildRPCPostBody('eth_gasPrice', []));
57
+ });
58
+ const nodeResponse = (yield req());
59
+ return tinyBig(hexToDecimal(nodeResponse));
60
+ });
61
+ }
71
62
  }
72
63
  export function jsonRpcProvider(rpcUrl) {
73
64
  return new JsonRpcProvider(rpcUrl);
@@ -0,0 +1,3 @@
1
+ export declare const fakeUrls: {
2
+ readonly notRPCButRealHttp: "https://httpstat.us/200";
3
+ };
@@ -0,0 +1,3 @@
1
+ export const fakeUrls = {
2
+ notRPCButRealHttp: 'https://httpstat.us/200',
3
+ };
@@ -45,6 +45,7 @@ declare const _default: {
45
45
  "51": string[];
46
46
  "52": string[];
47
47
  "53": string[];
48
+ "54": string[];
48
49
  "55": string[];
49
50
  "56": string[];
50
51
  "57": string[];
@@ -98,9 +99,11 @@ declare const _default: {
98
99
  "127": string[];
99
100
  "128": string[];
100
101
  "137": string[];
102
+ "141": string[];
101
103
  "142": string[];
102
104
  "162": string[];
103
105
  "163": string[];
106
+ "168": string[];
104
107
  "170": string[];
105
108
  "172": string[];
106
109
  "186": string[];
@@ -109,7 +112,10 @@ declare const _default: {
109
112
  "199": string[];
110
113
  "200": string[];
111
114
  "211": string[];
115
+ "218": string[];
112
116
  "222": string[];
117
+ "225": string[];
118
+ "226": string[];
113
119
  "246": string[];
114
120
  "250": string[];
115
121
  "256": string[];
@@ -145,6 +151,7 @@ declare const _default: {
145
151
  "721": string[];
146
152
  "777": string[];
147
153
  "787": string[];
154
+ "788": string[];
148
155
  "803": string[];
149
156
  "820": string[];
150
157
  "821": string[];
@@ -180,14 +187,18 @@ declare const _default: {
180
187
  "1280": string[];
181
188
  "1284": string[];
182
189
  "1285": string[];
190
+ "1286": string[];
183
191
  "1287": string[];
184
192
  "1288": string[];
193
+ "1337": string[];
185
194
  "1618": string[];
186
195
  "1620": string[];
187
196
  "1657": string[];
197
+ "1688": string[];
188
198
  "1856": string[];
189
199
  "1898": string[];
190
200
  "1987": string[];
201
+ "2001": string[];
191
202
  "2020": string[];
192
203
  "2021": string[];
193
204
  "2022": string[];
@@ -195,7 +206,10 @@ declare const _default: {
195
206
  "2100": string[];
196
207
  "2101": string[];
197
208
  "2213": string[];
209
+ "2221": string[];
198
210
  "2559": string[];
211
+ "3000": string[];
212
+ "3001": string[];
199
213
  "3331": string[];
200
214
  "3333": string[];
201
215
  "3334": string[];
@@ -205,12 +219,14 @@ declare const _default: {
205
219
  "3966": string[];
206
220
  "3967": string[];
207
221
  "4002": string[];
222
+ "4102": string[];
208
223
  "4689": string[];
209
224
  "4690": string[];
210
225
  "4918": string[];
211
226
  "5197": string[];
212
227
  "5315": string[];
213
228
  "5700": string[];
229
+ "5777": string[];
214
230
  "5851": string[];
215
231
  "5869": string[];
216
232
  "6626": string[];
@@ -259,6 +275,7 @@ declare const _default: {
259
275
  "43113": string[];
260
276
  "43114": string[];
261
277
  "44787": string[];
278
+ "45000": string[];
262
279
  "47805": string[];
263
280
  "49797": string[];
264
281
  "53935": string[];
@@ -300,10 +317,10 @@ declare const _default: {
300
317
  "110006": string[];
301
318
  "110007": string[];
302
319
  "110008": string[];
320
+ "200101": string[];
303
321
  "200625": string[];
304
322
  "201018": string[];
305
323
  "201030": string[];
306
- "210309": string[];
307
324
  "210425": string[];
308
325
  "234666": string[];
309
326
  "246529": string[];
@@ -319,6 +336,7 @@ declare const _default: {
319
336
  "1313114": string[];
320
337
  "1313500": string[];
321
338
  "1337702": string[];
339
+ "2203181": string[];
322
340
  "7762959": string[];
323
341
  "11155111": string[];
324
342
  "13371337": string[];
@@ -141,6 +141,9 @@ export default {
141
141
  "53": [
142
142
  "tcet"
143
143
  ],
144
+ "54": [
145
+ "OP"
146
+ ],
144
147
  "55": [
145
148
  "ZYX"
146
149
  ],
@@ -300,6 +303,9 @@ export default {
300
303
  "137": [
301
304
  "MATIC"
302
305
  ],
306
+ "141": [
307
+ "OPtest"
308
+ ],
303
309
  "142": [
304
310
  "dax"
305
311
  ],
@@ -309,6 +315,9 @@ export default {
309
315
  "163": [
310
316
  "pht"
311
317
  ],
318
+ "168": [
319
+ "aioz"
320
+ ],
312
321
  "170": [
313
322
  "hoosmartchain"
314
323
  ],
@@ -333,9 +342,18 @@ export default {
333
342
  "211": [
334
343
  "EDI"
335
344
  ],
345
+ "218": [
346
+ "SO1-old"
347
+ ],
336
348
  "222": [
337
349
  "ASK"
338
350
  ],
351
+ "225": [
352
+ "LA"
353
+ ],
354
+ "226": [
355
+ "TLA"
356
+ ],
339
357
  "246": [
340
358
  "ewt"
341
359
  ],
@@ -441,6 +459,9 @@ export default {
441
459
  "787": [
442
460
  "aca"
443
461
  ],
462
+ "788": [
463
+ "taero"
464
+ ],
444
465
  "803": [
445
466
  "haic"
446
467
  ],
@@ -546,12 +567,18 @@ export default {
546
567
  "1285": [
547
568
  "mriver"
548
569
  ],
570
+ "1286": [
571
+ "mrock-old"
572
+ ],
549
573
  "1287": [
550
574
  "mbase"
551
575
  ],
552
576
  "1288": [
553
577
  "mrock"
554
578
  ],
579
+ "1337": [
580
+ "cennz-a"
581
+ ],
555
582
  "1618": [
556
583
  "cate"
557
584
  ],
@@ -561,6 +588,9 @@ export default {
561
588
  "1657": [
562
589
  "bta"
563
590
  ],
591
+ "1688": [
592
+ "LUDAN"
593
+ ],
564
594
  "1856": [
565
595
  "tsf"
566
596
  ],
@@ -570,6 +600,9 @@ export default {
570
600
  "1987": [
571
601
  "egem"
572
602
  ],
603
+ "2001": [
604
+ "milkAda"
605
+ ],
573
606
  "2020": [
574
607
  "420"
575
608
  ],
@@ -591,9 +624,18 @@ export default {
591
624
  "2213": [
592
625
  "evanesco"
593
626
  ],
627
+ "2221": [
628
+ "kava"
629
+ ],
594
630
  "2559": [
595
631
  "ktoc"
596
632
  ],
633
+ "3000": [
634
+ "cennz-r"
635
+ ],
636
+ "3001": [
637
+ "cennz-n"
638
+ ],
597
639
  "3331": [
598
640
  "zcrbeach"
599
641
  ],
@@ -621,6 +663,9 @@ export default {
621
663
  "4002": [
622
664
  "tftm"
623
665
  ],
666
+ "4102": [
667
+ "aioz-testnet"
668
+ ],
624
669
  "4689": [
625
670
  "iotex-mainnet"
626
671
  ],
@@ -639,6 +684,9 @@ export default {
639
684
  "5700": [
640
685
  "tsys"
641
686
  ],
687
+ "5777": [
688
+ "dgcc"
689
+ ],
642
690
  "5851": [
643
691
  "Ontology Testnet"
644
692
  ],
@@ -783,6 +831,9 @@ export default {
783
831
  "44787": [
784
832
  "ALFA"
785
833
  ],
834
+ "45000": [
835
+ "autobahn"
836
+ ],
786
837
  "47805": [
787
838
  "REI"
788
839
  ],
@@ -906,6 +957,9 @@ export default {
906
957
  "110008": [
907
958
  "qkc-d-s7"
908
959
  ],
960
+ "200101": [
961
+ "milkTAda"
962
+ ],
909
963
  "200625": [
910
964
  "aka"
911
965
  ],
@@ -915,9 +969,6 @@ export default {
915
969
  "201030": [
916
970
  "alayadev"
917
971
  ],
918
- "210309": [
919
- "platondev"
920
- ],
921
972
  "210425": [
922
973
  "platon"
923
974
  ],
@@ -963,6 +1014,9 @@ export default {
963
1014
  "1337702": [
964
1015
  "kintsugi"
965
1016
  ],
1017
+ "2203181": [
1018
+ "platondev"
1019
+ ],
966
1020
  "7762959": [
967
1021
  "music"
968
1022
  ],
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,31 +1,13 @@
1
1
  {
2
2
  "name": "essential-eth",
3
3
  "description": "Ultralight JS library for Ethereum utilities",
4
- "version": "0.4.9-beta.2",
4
+ "version": "0.4.9",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
- "exports": {
8
- ".": {
9
- "import": "./dist/esm/index.js",
10
- "require": "./dist/cjs/index.js"
11
- },
12
- "./utils": {
13
- "import": "./dist/esm/utils/index.js",
14
- "require": "./dist/cjs/utils/index.js"
15
- }
16
- },
17
- "typesVersions": {
18
- "*": {
19
- "*": [
20
- "./dist/cjs/index.d.ts"
21
- ],
22
- "utils": [
23
- "./dist/cjs/utils/index.d.ts"
24
- ]
25
- }
26
- },
7
+ "main": "./lib/cjs/index.js",
8
+ "module": "./lib/esm/index.js",
27
9
  "files": [
28
- "dist/"
10
+ "lib/"
29
11
  ],
30
12
  "bugs": {
31
13
  "url": "https://github.com/dawsbot/essential-eth/issues"
@@ -34,16 +16,15 @@
34
16
  "author": "@dawsbot",
35
17
  "scripts": {
36
18
  "test": "npm-run-all --parallel jest compile lint",
19
+ "test:all-node-versions": "npx trevor",
37
20
  "lint": "eslint .",
38
21
  "compile": "npm-run-all --parallel tsc:esm tsc:cjs",
39
22
  "tsc:esm": "tsc -p tsconfig.json",
40
23
  "tsc:cjs": "tsc -p tsconfig-cjs.json",
41
- "build": "rm -rf dist && npm run compile",
42
- "prepublishOnly": "npm run build && npm run build:website && npm run build:website:new-version",
24
+ "build": "rm -rf lib && npm run compile",
25
+ "prepublishOnly": "npm run build",
43
26
  "jest": "jest",
44
27
  "build:chains-info": "npx ts-node scripts/fetch-chains-info.ts # used in getNetwork()",
45
- "build:website": "sh scripts/build-website.sh",
46
- "build:website:new-version": "typedoc --options typedoc/options-new-version.js",
47
28
  "pre-commit": "sh scripts/pre-commit.sh"
48
29
  },
49
30
  "devDependencies": {
@@ -55,7 +36,6 @@
55
36
  "@types/jest-dev-server": "^5.0.0",
56
37
  "@types/node": "^16.10.1",
57
38
  "@types/prettier": "^2.4.4",
58
- "@types/supertest": "^2.0.11",
59
39
  "@typescript-eslint/eslint-plugin": "^5.17.0",
60
40
  "@typescript-eslint/parser": "^5.17.0",
61
41
  "body-parser": "^1.19.0",
@@ -67,15 +47,14 @@
67
47
  "husky": "^4.3.0",
68
48
  "jest": "^27.5.1",
69
49
  "jest-dev-server": "^6.0.3",
70
- "just-omit": "^1.2.0",
50
+ "just-omit": "^2.0.1",
71
51
  "lint-staged": "^12.3.7",
72
52
  "npm-run-all": "^4.1.5",
73
- "prettier": "^2.6.1",
53
+ "prettier": "^2.6.2",
74
54
  "prettier-plugin-organize-imports": "^2.3.4",
75
- "supertest": "^6.1.6",
76
55
  "ts-jest": "^27.1.4",
77
56
  "ts-node": "^10.2.1",
78
- "typedoc": "^0.22.12",
57
+ "typedoc": "^0.22.13",
79
58
  "typescript": "^4.6.3",
80
59
  "web3": "^1.7.1"
81
60
  },
@@ -87,7 +66,7 @@
87
66
  },
88
67
  "husky": {
89
68
  "hooks": {
90
- "pre-commit": "lint-staged && run-p pre-commit test build:website build:chains-info"
69
+ "pre-commit": "lint-staged && run-p pre-commit test build:chains-info"
91
70
  }
92
71
  },
93
72
  "lint-staged": {