quantumcoin 6.14.5 → 7.0.2

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 (1296) hide show
  1. package/.github/workflows/publish-npmjs.yaml +22 -0
  2. package/.gitignore +15 -0
  3. package/{LICENSE.md → LICENSE} +21 -21
  4. package/README-SDK.md +756 -0
  5. package/README.md +152 -132
  6. package/SPEC.md +3845 -0
  7. package/config.d.ts +50 -0
  8. package/config.js +115 -0
  9. package/examples/AllSolidityTypes.sol +184 -0
  10. package/examples/SimpleIERC20.sol +74 -0
  11. package/examples/events.js +35 -0
  12. package/examples/example-generator-sdk-js.js +95 -0
  13. package/examples/example-generator-sdk-ts.js +95 -0
  14. package/examples/example.js +61 -0
  15. package/examples/package-lock.json +57 -0
  16. package/examples/package.json +16 -0
  17. package/examples/read-operations.js +27 -0
  18. package/examples/sdk-generator-erc20.inline.json +251 -0
  19. package/examples/solidity-types.ts +43 -0
  20. package/examples/wallet-offline.js +29 -0
  21. package/generate-sdk.js +1383 -0
  22. package/index.js +12 -0
  23. package/package.json +61 -116
  24. package/src/abi/fragments.d.ts +42 -0
  25. package/src/abi/fragments.js +63 -0
  26. package/src/abi/index.d.ts +13 -0
  27. package/src/abi/index.js +9 -0
  28. package/src/abi/interface.d.ts +132 -0
  29. package/src/abi/interface.js +590 -0
  30. package/src/abi/js-abi-coder.js +474 -0
  31. package/src/constants.d.ts +61 -0
  32. package/src/constants.js +94 -0
  33. package/src/contract/contract-factory.d.ts +28 -0
  34. package/src/contract/contract-factory.js +105 -0
  35. package/src/contract/contract.d.ts +105 -0
  36. package/src/contract/contract.js +312 -0
  37. package/src/contract/index.d.ts +9 -0
  38. package/src/contract/index.js +9 -0
  39. package/src/errors/index.d.ts +92 -0
  40. package/src/errors/index.js +188 -0
  41. package/src/generator/index.js +1201 -0
  42. package/src/index.d.ts +127 -0
  43. package/src/index.js +41 -0
  44. package/src/internal/hex.d.ts +61 -0
  45. package/src/internal/hex.js +144 -0
  46. package/src/providers/extra-providers.d.ts +128 -0
  47. package/src/providers/extra-providers.js +575 -0
  48. package/src/providers/index.d.ts +16 -0
  49. package/src/providers/index.js +10 -0
  50. package/src/providers/json-rpc-provider.d.ts +12 -0
  51. package/src/providers/json-rpc-provider.js +79 -0
  52. package/src/providers/provider.d.ts +196 -0
  53. package/src/providers/provider.js +359 -0
  54. package/src/types/index.d.ts +462 -0
  55. package/src/types/index.js +9 -0
  56. package/src/utils/address.d.ts +72 -0
  57. package/src/utils/address.js +182 -0
  58. package/src/utils/encoding.d.ts +120 -0
  59. package/src/utils/encoding.js +306 -0
  60. package/src/utils/hashing.d.ts +76 -0
  61. package/src/utils/hashing.js +298 -0
  62. package/src/utils/index.d.ts +55 -0
  63. package/src/utils/index.js +13 -0
  64. package/src/utils/result.d.ts +57 -0
  65. package/src/utils/result.js +128 -0
  66. package/src/utils/rlp.d.ts +12 -0
  67. package/src/utils/rlp.js +200 -0
  68. package/src/utils/units.d.ts +29 -0
  69. package/src/utils/units.js +107 -0
  70. package/src/wallet/index.d.ts +10 -0
  71. package/src/wallet/index.js +8 -0
  72. package/src/wallet/wallet.d.ts +160 -0
  73. package/src/wallet/wallet.js +489 -0
  74. package/test/e2e/all-solidity-types.dynamic.test.js +200 -0
  75. package/test/e2e/all-solidity-types.fixtures.js +231 -0
  76. package/test/e2e/all-solidity-types.generated-sdks.e2e.test.js +361 -0
  77. package/test/e2e/helpers.js +47 -0
  78. package/test/e2e/simple-erc20.generated-sdks.e2e.test.js +144 -0
  79. package/test/e2e/transactional.test.js +191 -0
  80. package/test/e2e/typed-generator.e2e.test.js +402 -0
  81. package/test/fixtures/ConstructorParam.sol +23 -0
  82. package/test/fixtures/MultiContracts.sol +37 -0
  83. package/test/fixtures/SimpleStorage.sol +18 -0
  84. package/test/fixtures/StakingContract.abi.json +1 -0
  85. package/test/integration/ipc-provider.test.js +44 -0
  86. package/test/integration/provider.test.js +72 -0
  87. package/test/integration/ws-provider.test.js +33 -0
  88. package/test/security/malformed-input.test.js +31 -0
  89. package/test/unit/abi-interface.test.js +98 -0
  90. package/test/unit/address-wallet.test.js +257 -0
  91. package/test/unit/browser-provider.test.js +82 -0
  92. package/test/unit/contract.test.js +82 -0
  93. package/test/unit/encoding-units-rlp.test.js +89 -0
  94. package/test/unit/errors.test.js +74 -0
  95. package/test/unit/filter-by-blockhash.test.js +52 -0
  96. package/test/unit/generate-contract-cli.test.js +39 -0
  97. package/test/unit/generate-sdk-artifacts-json.test.js +110 -0
  98. package/test/unit/generator.test.js +98 -0
  99. package/test/unit/hashing.test.js +54 -0
  100. package/test/unit/init.test.js +36 -0
  101. package/test/unit/interface.test.js +53 -0
  102. package/test/unit/internal-hex.test.js +47 -0
  103. package/test/unit/providers.test.js +144 -0
  104. package/test/unit/result.test.js +77 -0
  105. package/test/unit/solidity-types.test.js +46 -0
  106. package/test/unit/utils.test.js +54 -0
  107. package/CHANGELOG.md +0 -442
  108. package/FUNDING.json +0 -10
  109. package/SECURITY.md +0 -34
  110. package/dist/README.md +0 -22
  111. package/dist/quantumcoin.js +0 -20940
  112. package/dist/quantumcoin.js.map +0 -1
  113. package/dist/quantumcoin.min.js +0 -1
  114. package/dist/quantumcoin.umd.js +0 -21117
  115. package/dist/quantumcoin.umd.js.map +0 -1
  116. package/dist/quantumcoin.umd.min.js +0 -1
  117. package/dist/wordlists-extra.js +0 -1500
  118. package/dist/wordlists-extra.js.map +0 -1
  119. package/dist/wordlists-extra.min.js +0 -1
  120. package/lib.commonjs/README.md +0 -16
  121. package/lib.commonjs/_version.d.ts +0 -5
  122. package/lib.commonjs/_version.d.ts.map +0 -1
  123. package/lib.commonjs/_version.js +0 -9
  124. package/lib.commonjs/_version.js.map +0 -1
  125. package/lib.commonjs/abi/abi-coder.d.ts +0 -61
  126. package/lib.commonjs/abi/abi-coder.d.ts.map +0 -1
  127. package/lib.commonjs/abi/abi-coder.js +0 -210
  128. package/lib.commonjs/abi/abi-coder.js.map +0 -1
  129. package/lib.commonjs/abi/bytes32.d.ts +0 -15
  130. package/lib.commonjs/abi/bytes32.d.ts.map +0 -1
  131. package/lib.commonjs/abi/bytes32.js +0 -45
  132. package/lib.commonjs/abi/bytes32.js.map +0 -1
  133. package/lib.commonjs/abi/coders/abstract-coder.d.ts +0 -124
  134. package/lib.commonjs/abi/coders/abstract-coder.d.ts.map +0 -1
  135. package/lib.commonjs/abi/coders/abstract-coder.js +0 -472
  136. package/lib.commonjs/abi/coders/abstract-coder.js.map +0 -1
  137. package/lib.commonjs/abi/coders/address.d.ts +0 -13
  138. package/lib.commonjs/abi/coders/address.d.ts.map +0 -1
  139. package/lib.commonjs/abi/coders/address.js +0 -33
  140. package/lib.commonjs/abi/coders/address.js.map +0 -1
  141. package/lib.commonjs/abi/coders/anonymous.d.ts +0 -15
  142. package/lib.commonjs/abi/coders/anonymous.d.ts.map +0 -1
  143. package/lib.commonjs/abi/coders/anonymous.js +0 -27
  144. package/lib.commonjs/abi/coders/anonymous.js.map +0 -1
  145. package/lib.commonjs/abi/coders/array.d.ts +0 -25
  146. package/lib.commonjs/abi/coders/array.d.ts.map +0 -1
  147. package/lib.commonjs/abi/coders/array.js +0 -165
  148. package/lib.commonjs/abi/coders/array.js.map +0 -1
  149. package/lib.commonjs/abi/coders/boolean.d.ts +0 -13
  150. package/lib.commonjs/abi/coders/boolean.d.ts.map +0 -1
  151. package/lib.commonjs/abi/coders/boolean.js +0 -25
  152. package/lib.commonjs/abi/coders/boolean.js.map +0 -1
  153. package/lib.commonjs/abi/coders/bytes.d.ts +0 -19
  154. package/lib.commonjs/abi/coders/bytes.d.ts.map +0 -1
  155. package/lib.commonjs/abi/coders/bytes.js +0 -39
  156. package/lib.commonjs/abi/coders/bytes.js.map +0 -1
  157. package/lib.commonjs/abi/coders/fixed-bytes.d.ts +0 -15
  158. package/lib.commonjs/abi/coders/fixed-bytes.d.ts.map +0 -1
  159. package/lib.commonjs/abi/coders/fixed-bytes.js +0 -32
  160. package/lib.commonjs/abi/coders/fixed-bytes.js.map +0 -1
  161. package/lib.commonjs/abi/coders/null.d.ts +0 -12
  162. package/lib.commonjs/abi/coders/null.d.ts.map +0 -1
  163. package/lib.commonjs/abi/coders/null.js +0 -28
  164. package/lib.commonjs/abi/coders/null.js.map +0 -1
  165. package/lib.commonjs/abi/coders/number.d.ts +0 -16
  166. package/lib.commonjs/abi/coders/number.d.ts.map +0 -1
  167. package/lib.commonjs/abi/coders/number.js +0 -49
  168. package/lib.commonjs/abi/coders/number.js.map +0 -1
  169. package/lib.commonjs/abi/coders/string.d.ts +0 -13
  170. package/lib.commonjs/abi/coders/string.d.ts.map +0 -1
  171. package/lib.commonjs/abi/coders/string.js +0 -25
  172. package/lib.commonjs/abi/coders/string.js.map +0 -1
  173. package/lib.commonjs/abi/coders/tuple.d.ts +0 -16
  174. package/lib.commonjs/abi/coders/tuple.d.ts.map +0 -1
  175. package/lib.commonjs/abi/coders/tuple.js +0 -67
  176. package/lib.commonjs/abi/coders/tuple.js.map +0 -1
  177. package/lib.commonjs/abi/fragments.d.ts +0 -466
  178. package/lib.commonjs/abi/fragments.d.ts.map +0 -1
  179. package/lib.commonjs/abi/fragments.js +0 -1331
  180. package/lib.commonjs/abi/fragments.js.map +0 -1
  181. package/lib.commonjs/abi/index.d.ts +0 -18
  182. package/lib.commonjs/abi/index.d.ts.map +0 -1
  183. package/lib.commonjs/abi/index.js +0 -40
  184. package/lib.commonjs/abi/index.js.map +0 -1
  185. package/lib.commonjs/abi/interface.d.ts +0 -382
  186. package/lib.commonjs/abi/interface.d.ts.map +0 -1
  187. package/lib.commonjs/abi/interface.js +0 -1110
  188. package/lib.commonjs/abi/interface.js.map +0 -1
  189. package/lib.commonjs/abi/typed.d.ts +0 -570
  190. package/lib.commonjs/abi/typed.d.ts.map +0 -1
  191. package/lib.commonjs/abi/typed.js +0 -606
  192. package/lib.commonjs/abi/typed.js.map +0 -1
  193. package/lib.commonjs/address/address.d.ts +0 -36
  194. package/lib.commonjs/address/address.d.ts.map +0 -1
  195. package/lib.commonjs/address/address.js +0 -133
  196. package/lib.commonjs/address/address.js.map +0 -1
  197. package/lib.commonjs/address/checks.d.ts +0 -81
  198. package/lib.commonjs/address/checks.d.ts.map +0 -1
  199. package/lib.commonjs/address/checks.js +0 -120
  200. package/lib.commonjs/address/checks.js.map +0 -1
  201. package/lib.commonjs/address/contract-address.d.ts +0 -48
  202. package/lib.commonjs/address/contract-address.d.ts.map +0 -1
  203. package/lib.commonjs/address/contract-address.js +0 -74
  204. package/lib.commonjs/address/contract-address.js.map +0 -1
  205. package/lib.commonjs/address/index.d.ts +0 -49
  206. package/lib.commonjs/address/index.d.ts.map +0 -1
  207. package/lib.commonjs/address/index.js +0 -28
  208. package/lib.commonjs/address/index.js.map +0 -1
  209. package/lib.commonjs/constants/addresses.d.ts +0 -7
  210. package/lib.commonjs/constants/addresses.d.ts.map +0 -1
  211. package/lib.commonjs/constants/addresses.js +0 -10
  212. package/lib.commonjs/constants/addresses.js.map +0 -1
  213. package/lib.commonjs/constants/hashes.d.ts +0 -7
  214. package/lib.commonjs/constants/hashes.d.ts.map +0 -1
  215. package/lib.commonjs/constants/hashes.js +0 -10
  216. package/lib.commonjs/constants/hashes.js.map +0 -1
  217. package/lib.commonjs/constants/index.d.ts +0 -10
  218. package/lib.commonjs/constants/index.d.ts.map +0 -1
  219. package/lib.commonjs/constants/index.js +0 -22
  220. package/lib.commonjs/constants/index.js.map +0 -1
  221. package/lib.commonjs/constants/numbers.d.ts +0 -31
  222. package/lib.commonjs/constants/numbers.d.ts.map +0 -1
  223. package/lib.commonjs/constants/numbers.js +0 -34
  224. package/lib.commonjs/constants/numbers.js.map +0 -1
  225. package/lib.commonjs/constants/strings.d.ts +0 -13
  226. package/lib.commonjs/constants/strings.d.ts.map +0 -1
  227. package/lib.commonjs/constants/strings.js +0 -17
  228. package/lib.commonjs/constants/strings.js.map +0 -1
  229. package/lib.commonjs/contract/contract.d.ts +0 -168
  230. package/lib.commonjs/contract/contract.d.ts.map +0 -1
  231. package/lib.commonjs/contract/contract.js +0 -960
  232. package/lib.commonjs/contract/contract.js.map +0 -1
  233. package/lib.commonjs/contract/factory.d.ts +0 -62
  234. package/lib.commonjs/contract/factory.d.ts.map +0 -1
  235. package/lib.commonjs/contract/factory.js +0 -116
  236. package/lib.commonjs/contract/factory.js.map +0 -1
  237. package/lib.commonjs/contract/index.d.ts +0 -13
  238. package/lib.commonjs/contract/index.d.ts.map +0 -1
  239. package/lib.commonjs/contract/index.js +0 -24
  240. package/lib.commonjs/contract/index.js.map +0 -1
  241. package/lib.commonjs/contract/types.d.ts +0 -193
  242. package/lib.commonjs/contract/types.d.ts.map +0 -1
  243. package/lib.commonjs/contract/types.js +0 -6
  244. package/lib.commonjs/contract/types.js.map +0 -1
  245. package/lib.commonjs/contract/wrappers.d.ts +0 -143
  246. package/lib.commonjs/contract/wrappers.d.ts.map +0 -1
  247. package/lib.commonjs/contract/wrappers.js +0 -186
  248. package/lib.commonjs/contract/wrappers.js.map +0 -1
  249. package/lib.commonjs/crypto/crypto-browser.d.ts +0 -15
  250. package/lib.commonjs/crypto/crypto-browser.d.ts.map +0 -1
  251. package/lib.commonjs/crypto/crypto-browser.js +0 -55
  252. package/lib.commonjs/crypto/crypto-browser.js.map +0 -1
  253. package/lib.commonjs/crypto/crypto.d.ts +0 -2
  254. package/lib.commonjs/crypto/crypto.d.ts.map +0 -1
  255. package/lib.commonjs/crypto/crypto.js +0 -9
  256. package/lib.commonjs/crypto/crypto.js.map +0 -1
  257. package/lib.commonjs/crypto/hmac.d.ts +0 -25
  258. package/lib.commonjs/crypto/hmac.d.ts.map +0 -1
  259. package/lib.commonjs/crypto/hmac.js +0 -51
  260. package/lib.commonjs/crypto/hmac.js.map +0 -1
  261. package/lib.commonjs/crypto/index.d.ts +0 -25
  262. package/lib.commonjs/crypto/index.d.ts.map +0 -1
  263. package/lib.commonjs/crypto/index.js +0 -49
  264. package/lib.commonjs/crypto/index.js.map +0 -1
  265. package/lib.commonjs/crypto/keccak.d.ts +0 -35
  266. package/lib.commonjs/crypto/keccak.d.ts.map +0 -1
  267. package/lib.commonjs/crypto/keccak.js +0 -52
  268. package/lib.commonjs/crypto/keccak.js.map +0 -1
  269. package/lib.commonjs/crypto/pbkdf2.d.ts +0 -35
  270. package/lib.commonjs/crypto/pbkdf2.d.ts.map +0 -1
  271. package/lib.commonjs/crypto/pbkdf2.js +0 -53
  272. package/lib.commonjs/crypto/pbkdf2.js.map +0 -1
  273. package/lib.commonjs/crypto/random.d.ts +0 -14
  274. package/lib.commonjs/crypto/random.d.ts.map +0 -1
  275. package/lib.commonjs/crypto/random.js +0 -38
  276. package/lib.commonjs/crypto/random.js.map +0 -1
  277. package/lib.commonjs/crypto/ripemd160.d.ts +0 -25
  278. package/lib.commonjs/crypto/ripemd160.d.ts.map +0 -1
  279. package/lib.commonjs/crypto/ripemd160.js +0 -42
  280. package/lib.commonjs/crypto/ripemd160.js.map +0 -1
  281. package/lib.commonjs/crypto/scrypt.d.ts +0 -82
  282. package/lib.commonjs/crypto/scrypt.d.ts.map +0 -1
  283. package/lib.commonjs/crypto/scrypt.js +0 -104
  284. package/lib.commonjs/crypto/scrypt.js.map +0 -1
  285. package/lib.commonjs/crypto/sha2.d.ts +0 -47
  286. package/lib.commonjs/crypto/sha2.d.ts.map +0 -1
  287. package/lib.commonjs/crypto/sha2.js +0 -76
  288. package/lib.commonjs/crypto/sha2.js.map +0 -1
  289. package/lib.commonjs/crypto/signature.d.ts +0 -72
  290. package/lib.commonjs/crypto/signature.d.ts.map +0 -1
  291. package/lib.commonjs/crypto/signature.js +0 -118
  292. package/lib.commonjs/crypto/signature.js.map +0 -1
  293. package/lib.commonjs/crypto/signing-key.d.ts +0 -63
  294. package/lib.commonjs/crypto/signing-key.d.ts.map +0 -1
  295. package/lib.commonjs/crypto/signing-key.js +0 -105
  296. package/lib.commonjs/crypto/signing-key.js.map +0 -1
  297. package/lib.commonjs/hash/authorization.d.ts +0 -18
  298. package/lib.commonjs/hash/authorization.d.ts.map +0 -1
  299. package/lib.commonjs/hash/authorization.js +0 -30
  300. package/lib.commonjs/hash/authorization.js.map +0 -1
  301. package/lib.commonjs/hash/id.d.ts +0 -13
  302. package/lib.commonjs/hash/id.d.ts.map +0 -1
  303. package/lib.commonjs/hash/id.js +0 -21
  304. package/lib.commonjs/hash/id.js.map +0 -1
  305. package/lib.commonjs/hash/index.d.ts +0 -15
  306. package/lib.commonjs/hash/index.d.ts.map +0 -1
  307. package/lib.commonjs/hash/index.js +0 -30
  308. package/lib.commonjs/hash/index.js.map +0 -1
  309. package/lib.commonjs/hash/message.d.ts +0 -36
  310. package/lib.commonjs/hash/message.d.ts.map +0 -1
  311. package/lib.commonjs/hash/message.js +0 -56
  312. package/lib.commonjs/hash/message.js.map +0 -1
  313. package/lib.commonjs/hash/namehash.d.ts +0 -20
  314. package/lib.commonjs/hash/namehash.d.ts.map +0 -1
  315. package/lib.commonjs/hash/namehash.js +0 -91
  316. package/lib.commonjs/hash/namehash.js.map +0 -1
  317. package/lib.commonjs/hash/solidity.d.ts +0 -31
  318. package/lib.commonjs/hash/solidity.d.ts.map +0 -1
  319. package/lib.commonjs/hash/solidity.js +0 -109
  320. package/lib.commonjs/hash/solidity.js.map +0 -1
  321. package/lib.commonjs/hash/typed-data.d.ts +0 -150
  322. package/lib.commonjs/hash/typed-data.d.ts.map +0 -1
  323. package/lib.commonjs/hash/typed-data.js +0 -524
  324. package/lib.commonjs/hash/typed-data.js.map +0 -1
  325. package/lib.commonjs/index.d.ts +0 -11
  326. package/lib.commonjs/index.d.ts.map +0 -1
  327. package/lib.commonjs/index.js +0 -15
  328. package/lib.commonjs/index.js.map +0 -1
  329. package/lib.commonjs/package.json +0 -12
  330. package/lib.commonjs/providers/abstract-provider.d.ts +0 -451
  331. package/lib.commonjs/providers/abstract-provider.d.ts.map +0 -1
  332. package/lib.commonjs/providers/abstract-provider.js +0 -1409
  333. package/lib.commonjs/providers/abstract-provider.js.map +0 -1
  334. package/lib.commonjs/providers/abstract-signer.d.ts +0 -69
  335. package/lib.commonjs/providers/abstract-signer.d.ts.map +0 -1
  336. package/lib.commonjs/providers/abstract-signer.js +0 -249
  337. package/lib.commonjs/providers/abstract-signer.js.map +0 -1
  338. package/lib.commonjs/providers/community.d.ts +0 -29
  339. package/lib.commonjs/providers/community.d.ts.map +0 -1
  340. package/lib.commonjs/providers/community.js +0 -40
  341. package/lib.commonjs/providers/community.js.map +0 -1
  342. package/lib.commonjs/providers/contracts.d.ts +0 -36
  343. package/lib.commonjs/providers/contracts.d.ts.map +0 -1
  344. package/lib.commonjs/providers/contracts.js +0 -3
  345. package/lib.commonjs/providers/contracts.js.map +0 -1
  346. package/lib.commonjs/providers/default-provider.d.ts +0 -41
  347. package/lib.commonjs/providers/default-provider.d.ts.map +0 -1
  348. package/lib.commonjs/providers/default-provider.js +0 -92
  349. package/lib.commonjs/providers/default-provider.js.map +0 -1
  350. package/lib.commonjs/providers/ens-resolver.d.ts +0 -147
  351. package/lib.commonjs/providers/ens-resolver.d.ts.map +0 -1
  352. package/lib.commonjs/providers/ens-resolver.js +0 -502
  353. package/lib.commonjs/providers/ens-resolver.js.map +0 -1
  354. package/lib.commonjs/providers/format.d.ts +0 -15
  355. package/lib.commonjs/providers/format.d.ts.map +0 -1
  356. package/lib.commonjs/providers/format.js +0 -298
  357. package/lib.commonjs/providers/format.js.map +0 -1
  358. package/lib.commonjs/providers/formatting.d.ts +0 -318
  359. package/lib.commonjs/providers/formatting.d.ts.map +0 -1
  360. package/lib.commonjs/providers/formatting.js +0 -10
  361. package/lib.commonjs/providers/formatting.js.map +0 -1
  362. package/lib.commonjs/providers/index.d.ts +0 -41
  363. package/lib.commonjs/providers/index.d.ts.map +0 -1
  364. package/lib.commonjs/providers/index.js +0 -64
  365. package/lib.commonjs/providers/index.js.map +0 -1
  366. package/lib.commonjs/providers/network.d.ts +0 -99
  367. package/lib.commonjs/providers/network.d.ts.map +0 -1
  368. package/lib.commonjs/providers/network.js +0 -269
  369. package/lib.commonjs/providers/network.js.map +0 -1
  370. package/lib.commonjs/providers/pagination.d.ts +0 -6
  371. package/lib.commonjs/providers/pagination.d.ts.map +0 -1
  372. package/lib.commonjs/providers/pagination.js +0 -3
  373. package/lib.commonjs/providers/pagination.js.map +0 -1
  374. package/lib.commonjs/providers/plugin-fallback.d.ts +0 -13
  375. package/lib.commonjs/providers/plugin-fallback.d.ts.map +0 -1
  376. package/lib.commonjs/providers/plugin-fallback.js +0 -31
  377. package/lib.commonjs/providers/plugin-fallback.js.map +0 -1
  378. package/lib.commonjs/providers/plugins-network.d.ts +0 -170
  379. package/lib.commonjs/providers/plugins-network.d.ts.map +0 -1
  380. package/lib.commonjs/providers/plugins-network.js +0 -216
  381. package/lib.commonjs/providers/plugins-network.js.map +0 -1
  382. package/lib.commonjs/providers/provider-browser.d.ts +0 -108
  383. package/lib.commonjs/providers/provider-browser.d.ts.map +0 -1
  384. package/lib.commonjs/providers/provider-browser.js +0 -204
  385. package/lib.commonjs/providers/provider-browser.js.map +0 -1
  386. package/lib.commonjs/providers/provider-fallback.d.ts +0 -115
  387. package/lib.commonjs/providers/provider-fallback.d.ts.map +0 -1
  388. package/lib.commonjs/providers/provider-fallback.js +0 -624
  389. package/lib.commonjs/providers/provider-fallback.js.map +0 -1
  390. package/lib.commonjs/providers/provider-ipcsocket-browser.d.ts +0 -3
  391. package/lib.commonjs/providers/provider-ipcsocket-browser.d.ts.map +0 -1
  392. package/lib.commonjs/providers/provider-ipcsocket-browser.js +0 -6
  393. package/lib.commonjs/providers/provider-ipcsocket-browser.js.map +0 -1
  394. package/lib.commonjs/providers/provider-ipcsocket.d.ts +0 -21
  395. package/lib.commonjs/providers/provider-ipcsocket.d.ts.map +0 -1
  396. package/lib.commonjs/providers/provider-ipcsocket.js +0 -72
  397. package/lib.commonjs/providers/provider-ipcsocket.js.map +0 -1
  398. package/lib.commonjs/providers/provider-jsonrpc.d.ts +0 -360
  399. package/lib.commonjs/providers/provider-jsonrpc.d.ts.map +0 -1
  400. package/lib.commonjs/providers/provider-jsonrpc.js +0 -979
  401. package/lib.commonjs/providers/provider-jsonrpc.js.map +0 -1
  402. package/lib.commonjs/providers/provider-socket.d.ts +0 -113
  403. package/lib.commonjs/providers/provider-socket.d.ts.map +0 -1
  404. package/lib.commonjs/providers/provider-socket.js +0 -309
  405. package/lib.commonjs/providers/provider-socket.js.map +0 -1
  406. package/lib.commonjs/providers/provider-websocket.d.ts +0 -37
  407. package/lib.commonjs/providers/provider-websocket.d.ts.map +0 -1
  408. package/lib.commonjs/providers/provider-websocket.js +0 -80
  409. package/lib.commonjs/providers/provider-websocket.js.map +0 -1
  410. package/lib.commonjs/providers/provider.d.ts +0 -1223
  411. package/lib.commonjs/providers/provider.d.ts.map +0 -1
  412. package/lib.commonjs/providers/provider.js +0 -1321
  413. package/lib.commonjs/providers/provider.js.map +0 -1
  414. package/lib.commonjs/providers/signer-noncemanager.d.ts +0 -38
  415. package/lib.commonjs/providers/signer-noncemanager.d.ts.map +0 -1
  416. package/lib.commonjs/providers/signer-noncemanager.js +0 -78
  417. package/lib.commonjs/providers/signer-noncemanager.js.map +0 -1
  418. package/lib.commonjs/providers/signer.d.ts +0 -131
  419. package/lib.commonjs/providers/signer.d.ts.map +0 -1
  420. package/lib.commonjs/providers/signer.js +0 -3
  421. package/lib.commonjs/providers/signer.js.map +0 -1
  422. package/lib.commonjs/providers/subscriber-connection.d.ts +0 -25
  423. package/lib.commonjs/providers/subscriber-connection.d.ts.map +0 -1
  424. package/lib.commonjs/providers/subscriber-connection.js +0 -56
  425. package/lib.commonjs/providers/subscriber-connection.js.map +0 -1
  426. package/lib.commonjs/providers/subscriber-filterid.d.ts +0 -64
  427. package/lib.commonjs/providers/subscriber-filterid.d.ts.map +0 -1
  428. package/lib.commonjs/providers/subscriber-filterid.js +0 -180
  429. package/lib.commonjs/providers/subscriber-filterid.js.map +0 -1
  430. package/lib.commonjs/providers/subscriber-polling.d.ts +0 -100
  431. package/lib.commonjs/providers/subscriber-polling.d.ts.map +0 -1
  432. package/lib.commonjs/providers/subscriber-polling.js +0 -303
  433. package/lib.commonjs/providers/subscriber-polling.js.map +0 -1
  434. package/lib.commonjs/providers/ws-browser.d.ts +0 -3
  435. package/lib.commonjs/providers/ws-browser.d.ts.map +0 -1
  436. package/lib.commonjs/providers/ws-browser.js +0 -19
  437. package/lib.commonjs/providers/ws-browser.js.map +0 -1
  438. package/lib.commonjs/providers/ws.d.ts +0 -2
  439. package/lib.commonjs/providers/ws.d.ts.map +0 -1
  440. package/lib.commonjs/providers/ws.js +0 -6
  441. package/lib.commonjs/providers/ws.js.map +0 -1
  442. package/lib.commonjs/quantumcoin.d.ts +0 -24
  443. package/lib.commonjs/quantumcoin.d.ts.map +0 -1
  444. package/lib.commonjs/quantumcoin.js +0 -199
  445. package/lib.commonjs/quantumcoin.js.map +0 -1
  446. package/lib.commonjs/transaction/accesslist.d.ts +0 -6
  447. package/lib.commonjs/transaction/accesslist.d.ts.map +0 -1
  448. package/lib.commonjs/transaction/accesslist.js +0 -41
  449. package/lib.commonjs/transaction/accesslist.js.map +0 -1
  450. package/lib.commonjs/transaction/address.d.ts +0 -15
  451. package/lib.commonjs/transaction/address.d.ts.map +0 -1
  452. package/lib.commonjs/transaction/address.js +0 -39
  453. package/lib.commonjs/transaction/address.js.map +0 -1
  454. package/lib.commonjs/transaction/authorization.d.ts +0 -3
  455. package/lib.commonjs/transaction/authorization.d.ts.map +0 -1
  456. package/lib.commonjs/transaction/authorization.js +0 -16
  457. package/lib.commonjs/transaction/authorization.js.map +0 -1
  458. package/lib.commonjs/transaction/index.d.ts +0 -40
  459. package/lib.commonjs/transaction/index.d.ts.map +0 -1
  460. package/lib.commonjs/transaction/index.js +0 -19
  461. package/lib.commonjs/transaction/index.js.map +0 -1
  462. package/lib.commonjs/transaction/transaction.d.ts +0 -400
  463. package/lib.commonjs/transaction/transaction.d.ts.map +0 -1
  464. package/lib.commonjs/transaction/transaction.js +0 -1115
  465. package/lib.commonjs/transaction/transaction.js.map +0 -1
  466. package/lib.commonjs/utils/base58.d.ts +0 -23
  467. package/lib.commonjs/utils/base58.d.ts.map +0 -1
  468. package/lib.commonjs/utils/base58.js +0 -68
  469. package/lib.commonjs/utils/base58.js.map +0 -1
  470. package/lib.commonjs/utils/base64-browser.d.ts +0 -4
  471. package/lib.commonjs/utils/base64-browser.d.ts.map +0 -1
  472. package/lib.commonjs/utils/base64-browser.js +0 -24
  473. package/lib.commonjs/utils/base64-browser.js.map +0 -1
  474. package/lib.commonjs/utils/base64.d.ts +0 -40
  475. package/lib.commonjs/utils/base64.d.ts.map +0 -1
  476. package/lib.commonjs/utils/base64.js +0 -58
  477. package/lib.commonjs/utils/base64.js.map +0 -1
  478. package/lib.commonjs/utils/data.d.ts +0 -93
  479. package/lib.commonjs/utils/data.d.ts.map +0 -1
  480. package/lib.commonjs/utils/data.js +0 -184
  481. package/lib.commonjs/utils/data.js.map +0 -1
  482. package/lib.commonjs/utils/errors.d.ts +0 -512
  483. package/lib.commonjs/utils/errors.d.ts.map +0 -1
  484. package/lib.commonjs/utils/errors.js +0 -235
  485. package/lib.commonjs/utils/errors.js.map +0 -1
  486. package/lib.commonjs/utils/events.d.ts +0 -77
  487. package/lib.commonjs/utils/events.d.ts.map +0 -1
  488. package/lib.commonjs/utils/events.js +0 -46
  489. package/lib.commonjs/utils/events.js.map +0 -1
  490. package/lib.commonjs/utils/fetch.d.ts +0 -363
  491. package/lib.commonjs/utils/fetch.d.ts.map +0 -1
  492. package/lib.commonjs/utils/fetch.js +0 -858
  493. package/lib.commonjs/utils/fetch.js.map +0 -1
  494. package/lib.commonjs/utils/fixednumber.d.ts +0 -252
  495. package/lib.commonjs/utils/fixednumber.d.ts.map +0 -1
  496. package/lib.commonjs/utils/fixednumber.js +0 -530
  497. package/lib.commonjs/utils/fixednumber.js.map +0 -1
  498. package/lib.commonjs/utils/geturl-browser.d.ts +0 -4
  499. package/lib.commonjs/utils/geturl-browser.d.ts.map +0 -1
  500. package/lib.commonjs/utils/geturl-browser.js +0 -67
  501. package/lib.commonjs/utils/geturl-browser.js.map +0 -1
  502. package/lib.commonjs/utils/geturl.d.ts +0 -10
  503. package/lib.commonjs/utils/geturl.d.ts.map +0 -1
  504. package/lib.commonjs/utils/geturl.js +0 -120
  505. package/lib.commonjs/utils/geturl.js.map +0 -1
  506. package/lib.commonjs/utils/index.d.ts +0 -30
  507. package/lib.commonjs/utils/index.d.ts.map +0 -1
  508. package/lib.commonjs/utils/index.js +0 -78
  509. package/lib.commonjs/utils/index.js.map +0 -1
  510. package/lib.commonjs/utils/maths.d.ts +0 -66
  511. package/lib.commonjs/utils/maths.d.ts.map +0 -1
  512. package/lib.commonjs/utils/maths.js +0 -229
  513. package/lib.commonjs/utils/maths.js.map +0 -1
  514. package/lib.commonjs/utils/properties.d.ts +0 -23
  515. package/lib.commonjs/utils/properties.d.ts.map +0 -1
  516. package/lib.commonjs/utils/properties.js +0 -59
  517. package/lib.commonjs/utils/properties.js.map +0 -1
  518. package/lib.commonjs/utils/rlp-decode.d.ts +0 -6
  519. package/lib.commonjs/utils/rlp-decode.d.ts.map +0 -1
  520. package/lib.commonjs/utils/rlp-decode.js +0 -83
  521. package/lib.commonjs/utils/rlp-decode.js.map +0 -1
  522. package/lib.commonjs/utils/rlp-encode.d.ts +0 -6
  523. package/lib.commonjs/utils/rlp-encode.d.ts.map +0 -1
  524. package/lib.commonjs/utils/rlp-encode.js +0 -53
  525. package/lib.commonjs/utils/rlp-encode.js.map +0 -1
  526. package/lib.commonjs/utils/rlp.d.ts +0 -17
  527. package/lib.commonjs/utils/rlp.d.ts.map +0 -1
  528. package/lib.commonjs/utils/rlp.js +0 -14
  529. package/lib.commonjs/utils/rlp.js.map +0 -1
  530. package/lib.commonjs/utils/units.d.ts +0 -24
  531. package/lib.commonjs/utils/units.d.ts.map +0 -1
  532. package/lib.commonjs/utils/units.js +0 -90
  533. package/lib.commonjs/utils/units.js.map +0 -1
  534. package/lib.commonjs/utils/utf8.d.ts +0 -96
  535. package/lib.commonjs/utils/utf8.d.ts.map +0 -1
  536. package/lib.commonjs/utils/utf8.js +0 -227
  537. package/lib.commonjs/utils/utf8.js.map +0 -1
  538. package/lib.commonjs/utils/uuid.d.ts +0 -8
  539. package/lib.commonjs/utils/uuid.d.ts.map +0 -1
  540. package/lib.commonjs/utils/uuid.js +0 -34
  541. package/lib.commonjs/utils/uuid.js.map +0 -1
  542. package/lib.commonjs/wallet/base-wallet.d.ts +0 -57
  543. package/lib.commonjs/wallet/base-wallet.d.ts.map +0 -1
  544. package/lib.commonjs/wallet/base-wallet.js +0 -127
  545. package/lib.commonjs/wallet/base-wallet.js.map +0 -1
  546. package/lib.commonjs/wallet/index.d.ts +0 -23
  547. package/lib.commonjs/wallet/index.d.ts.map +0 -1
  548. package/lib.commonjs/wallet/index.js +0 -30
  549. package/lib.commonjs/wallet/index.js.map +0 -1
  550. package/lib.commonjs/wallet/json-keystore.d.ts +0 -40
  551. package/lib.commonjs/wallet/json-keystore.d.ts.map +0 -1
  552. package/lib.commonjs/wallet/json-keystore.js +0 -90
  553. package/lib.commonjs/wallet/json-keystore.js.map +0 -1
  554. package/lib.commonjs/wallet/utils.d.ts +0 -8
  555. package/lib.commonjs/wallet/utils.d.ts.map +0 -1
  556. package/lib.commonjs/wallet/utils.js +0 -149
  557. package/lib.commonjs/wallet/utils.js.map +0 -1
  558. package/lib.commonjs/wallet/wallet.d.ts +0 -62
  559. package/lib.commonjs/wallet/wallet.d.ts.map +0 -1
  560. package/lib.commonjs/wallet/wallet.js +0 -109
  561. package/lib.commonjs/wallet/wallet.js.map +0 -1
  562. package/lib.commonjs/wordlists/bit-reader.d.ts +0 -5
  563. package/lib.commonjs/wordlists/bit-reader.d.ts.map +0 -1
  564. package/lib.commonjs/wordlists/bit-reader.js +0 -36
  565. package/lib.commonjs/wordlists/bit-reader.js.map +0 -1
  566. package/lib.commonjs/wordlists/decode-owl.d.ts +0 -9
  567. package/lib.commonjs/wordlists/decode-owl.d.ts.map +0 -1
  568. package/lib.commonjs/wordlists/decode-owl.js +0 -60
  569. package/lib.commonjs/wordlists/decode-owl.js.map +0 -1
  570. package/lib.commonjs/wordlists/decode-owla.d.ts +0 -5
  571. package/lib.commonjs/wordlists/decode-owla.d.ts.map +0 -1
  572. package/lib.commonjs/wordlists/decode-owla.js +0 -32
  573. package/lib.commonjs/wordlists/decode-owla.js.map +0 -1
  574. package/lib.commonjs/wordlists/generation/encode-latin.d.ts +0 -25
  575. package/lib.commonjs/wordlists/generation/encode-latin.d.ts.map +0 -1
  576. package/lib.commonjs/wordlists/generation/encode-latin.js +0 -351
  577. package/lib.commonjs/wordlists/generation/encode-latin.js.map +0 -1
  578. package/lib.commonjs/wordlists/index.d.ts +0 -25
  579. package/lib.commonjs/wordlists/index.d.ts.map +0 -1
  580. package/lib.commonjs/wordlists/index.js +0 -33
  581. package/lib.commonjs/wordlists/index.js.map +0 -1
  582. package/lib.commonjs/wordlists/lang-cz.d.ts +0 -23
  583. package/lib.commonjs/wordlists/lang-cz.d.ts.map +0 -1
  584. package/lib.commonjs/wordlists/lang-cz.js +0 -35
  585. package/lib.commonjs/wordlists/lang-cz.js.map +0 -1
  586. package/lib.commonjs/wordlists/lang-en.d.ts +0 -23
  587. package/lib.commonjs/wordlists/lang-en.d.ts.map +0 -1
  588. package/lib.commonjs/wordlists/lang-en.js +0 -35
  589. package/lib.commonjs/wordlists/lang-en.js.map +0 -1
  590. package/lib.commonjs/wordlists/lang-es.d.ts +0 -23
  591. package/lib.commonjs/wordlists/lang-es.d.ts.map +0 -1
  592. package/lib.commonjs/wordlists/lang-es.js +0 -36
  593. package/lib.commonjs/wordlists/lang-es.js.map +0 -1
  594. package/lib.commonjs/wordlists/lang-fr.d.ts +0 -23
  595. package/lib.commonjs/wordlists/lang-fr.d.ts.map +0 -1
  596. package/lib.commonjs/wordlists/lang-fr.js +0 -36
  597. package/lib.commonjs/wordlists/lang-fr.js.map +0 -1
  598. package/lib.commonjs/wordlists/lang-it.d.ts +0 -23
  599. package/lib.commonjs/wordlists/lang-it.d.ts.map +0 -1
  600. package/lib.commonjs/wordlists/lang-it.js +0 -35
  601. package/lib.commonjs/wordlists/lang-it.js.map +0 -1
  602. package/lib.commonjs/wordlists/lang-ja.d.ts +0 -27
  603. package/lib.commonjs/wordlists/lang-ja.d.ts.map +0 -1
  604. package/lib.commonjs/wordlists/lang-ja.js +0 -158
  605. package/lib.commonjs/wordlists/lang-ja.js.map +0 -1
  606. package/lib.commonjs/wordlists/lang-ko.d.ts +0 -25
  607. package/lib.commonjs/wordlists/lang-ko.d.ts.map +0 -1
  608. package/lib.commonjs/wordlists/lang-ko.js +0 -93
  609. package/lib.commonjs/wordlists/lang-ko.js.map +0 -1
  610. package/lib.commonjs/wordlists/lang-pt.d.ts +0 -23
  611. package/lib.commonjs/wordlists/lang-pt.d.ts.map +0 -1
  612. package/lib.commonjs/wordlists/lang-pt.js +0 -35
  613. package/lib.commonjs/wordlists/lang-pt.js.map +0 -1
  614. package/lib.commonjs/wordlists/lang-zh.d.ts +0 -32
  615. package/lib.commonjs/wordlists/lang-zh.d.ts.map +0 -1
  616. package/lib.commonjs/wordlists/lang-zh.js +0 -96
  617. package/lib.commonjs/wordlists/lang-zh.js.map +0 -1
  618. package/lib.commonjs/wordlists/wordlist-owl.d.ts +0 -32
  619. package/lib.commonjs/wordlists/wordlist-owl.d.ts.map +0 -1
  620. package/lib.commonjs/wordlists/wordlist-owl.js +0 -70
  621. package/lib.commonjs/wordlists/wordlist-owl.js.map +0 -1
  622. package/lib.commonjs/wordlists/wordlist-owla.d.ts +0 -30
  623. package/lib.commonjs/wordlists/wordlist-owla.d.ts.map +0 -1
  624. package/lib.commonjs/wordlists/wordlist-owla.js +0 -40
  625. package/lib.commonjs/wordlists/wordlist-owla.js.map +0 -1
  626. package/lib.commonjs/wordlists/wordlist.d.ts +0 -47
  627. package/lib.commonjs/wordlists/wordlist.d.ts.map +0 -1
  628. package/lib.commonjs/wordlists/wordlist.js +0 -46
  629. package/lib.commonjs/wordlists/wordlist.js.map +0 -1
  630. package/lib.commonjs/wordlists/wordlists-browser.d.ts +0 -3
  631. package/lib.commonjs/wordlists/wordlists-browser.d.ts.map +0 -1
  632. package/lib.commonjs/wordlists/wordlists-browser.js +0 -8
  633. package/lib.commonjs/wordlists/wordlists-browser.js.map +0 -1
  634. package/lib.commonjs/wordlists/wordlists-extra.d.ts +0 -9
  635. package/lib.commonjs/wordlists/wordlists-extra.d.ts.map +0 -1
  636. package/lib.commonjs/wordlists/wordlists-extra.js +0 -20
  637. package/lib.commonjs/wordlists/wordlists-extra.js.map +0 -1
  638. package/lib.commonjs/wordlists/wordlists.d.ts +0 -16
  639. package/lib.commonjs/wordlists/wordlists.d.ts.map +0 -1
  640. package/lib.commonjs/wordlists/wordlists.js +0 -38
  641. package/lib.commonjs/wordlists/wordlists.js.map +0 -1
  642. package/lib.esm/README.md +0 -16
  643. package/lib.esm/_version.d.ts +0 -5
  644. package/lib.esm/_version.d.ts.map +0 -1
  645. package/lib.esm/_version.js +0 -6
  646. package/lib.esm/_version.js.map +0 -1
  647. package/lib.esm/abi/abi-coder.d.ts +0 -61
  648. package/lib.esm/abi/abi-coder.d.ts.map +0 -1
  649. package/lib.esm/abi/abi-coder.js +0 -206
  650. package/lib.esm/abi/abi-coder.js.map +0 -1
  651. package/lib.esm/abi/bytes32.d.ts +0 -15
  652. package/lib.esm/abi/bytes32.d.ts.map +0 -1
  653. package/lib.esm/abi/bytes32.js +0 -40
  654. package/lib.esm/abi/bytes32.js.map +0 -1
  655. package/lib.esm/abi/coders/abstract-coder.d.ts +0 -124
  656. package/lib.esm/abi/coders/abstract-coder.d.ts.map +0 -1
  657. package/lib.esm/abi/coders/abstract-coder.js +0 -466
  658. package/lib.esm/abi/coders/abstract-coder.js.map +0 -1
  659. package/lib.esm/abi/coders/address.d.ts +0 -13
  660. package/lib.esm/abi/coders/address.d.ts.map +0 -1
  661. package/lib.esm/abi/coders/address.js +0 -29
  662. package/lib.esm/abi/coders/address.js.map +0 -1
  663. package/lib.esm/abi/coders/anonymous.d.ts +0 -15
  664. package/lib.esm/abi/coders/anonymous.d.ts.map +0 -1
  665. package/lib.esm/abi/coders/anonymous.js +0 -23
  666. package/lib.esm/abi/coders/anonymous.js.map +0 -1
  667. package/lib.esm/abi/coders/array.d.ts +0 -25
  668. package/lib.esm/abi/coders/array.d.ts.map +0 -1
  669. package/lib.esm/abi/coders/array.js +0 -159
  670. package/lib.esm/abi/coders/array.js.map +0 -1
  671. package/lib.esm/abi/coders/boolean.d.ts +0 -13
  672. package/lib.esm/abi/coders/boolean.d.ts.map +0 -1
  673. package/lib.esm/abi/coders/boolean.js +0 -21
  674. package/lib.esm/abi/coders/boolean.js.map +0 -1
  675. package/lib.esm/abi/coders/bytes.d.ts +0 -19
  676. package/lib.esm/abi/coders/bytes.d.ts.map +0 -1
  677. package/lib.esm/abi/coders/bytes.js +0 -34
  678. package/lib.esm/abi/coders/bytes.js.map +0 -1
  679. package/lib.esm/abi/coders/fixed-bytes.d.ts +0 -15
  680. package/lib.esm/abi/coders/fixed-bytes.d.ts.map +0 -1
  681. package/lib.esm/abi/coders/fixed-bytes.js +0 -28
  682. package/lib.esm/abi/coders/fixed-bytes.js.map +0 -1
  683. package/lib.esm/abi/coders/null.d.ts +0 -12
  684. package/lib.esm/abi/coders/null.d.ts.map +0 -1
  685. package/lib.esm/abi/coders/null.js +0 -24
  686. package/lib.esm/abi/coders/null.js.map +0 -1
  687. package/lib.esm/abi/coders/number.d.ts +0 -16
  688. package/lib.esm/abi/coders/number.d.ts.map +0 -1
  689. package/lib.esm/abi/coders/number.js +0 -45
  690. package/lib.esm/abi/coders/number.js.map +0 -1
  691. package/lib.esm/abi/coders/string.d.ts +0 -13
  692. package/lib.esm/abi/coders/string.d.ts.map +0 -1
  693. package/lib.esm/abi/coders/string.js +0 -21
  694. package/lib.esm/abi/coders/string.js.map +0 -1
  695. package/lib.esm/abi/coders/tuple.d.ts +0 -16
  696. package/lib.esm/abi/coders/tuple.d.ts.map +0 -1
  697. package/lib.esm/abi/coders/tuple.js +0 -63
  698. package/lib.esm/abi/coders/tuple.js.map +0 -1
  699. package/lib.esm/abi/fragments.d.ts +0 -466
  700. package/lib.esm/abi/fragments.d.ts.map +0 -1
  701. package/lib.esm/abi/fragments.js +0 -1319
  702. package/lib.esm/abi/fragments.js.map +0 -1
  703. package/lib.esm/abi/index.d.ts +0 -18
  704. package/lib.esm/abi/index.d.ts.map +0 -1
  705. package/lib.esm/abi/index.js +0 -17
  706. package/lib.esm/abi/index.js.map +0 -1
  707. package/lib.esm/abi/interface.d.ts +0 -382
  708. package/lib.esm/abi/interface.d.ts.map +0 -1
  709. package/lib.esm/abi/interface.js +0 -1101
  710. package/lib.esm/abi/interface.js.map +0 -1
  711. package/lib.esm/abi/typed.d.ts +0 -570
  712. package/lib.esm/abi/typed.d.ts.map +0 -1
  713. package/lib.esm/abi/typed.js +0 -602
  714. package/lib.esm/abi/typed.js.map +0 -1
  715. package/lib.esm/address/address.d.ts +0 -36
  716. package/lib.esm/address/address.d.ts.map +0 -1
  717. package/lib.esm/address/address.js +0 -129
  718. package/lib.esm/address/address.js.map +0 -1
  719. package/lib.esm/address/checks.d.ts +0 -81
  720. package/lib.esm/address/checks.d.ts.map +0 -1
  721. package/lib.esm/address/checks.js +0 -114
  722. package/lib.esm/address/checks.js.map +0 -1
  723. package/lib.esm/address/contract-address.d.ts +0 -48
  724. package/lib.esm/address/contract-address.d.ts.map +0 -1
  725. package/lib.esm/address/contract-address.js +0 -69
  726. package/lib.esm/address/contract-address.js.map +0 -1
  727. package/lib.esm/address/index.d.ts +0 -49
  728. package/lib.esm/address/index.d.ts.map +0 -1
  729. package/lib.esm/address/index.js +0 -19
  730. package/lib.esm/address/index.js.map +0 -1
  731. package/lib.esm/constants/addresses.d.ts +0 -7
  732. package/lib.esm/constants/addresses.d.ts.map +0 -1
  733. package/lib.esm/constants/addresses.js +0 -7
  734. package/lib.esm/constants/addresses.js.map +0 -1
  735. package/lib.esm/constants/hashes.d.ts +0 -7
  736. package/lib.esm/constants/hashes.d.ts.map +0 -1
  737. package/lib.esm/constants/hashes.js +0 -7
  738. package/lib.esm/constants/hashes.js.map +0 -1
  739. package/lib.esm/constants/index.d.ts +0 -10
  740. package/lib.esm/constants/index.d.ts.map +0 -1
  741. package/lib.esm/constants/index.js +0 -10
  742. package/lib.esm/constants/index.js.map +0 -1
  743. package/lib.esm/constants/numbers.d.ts +0 -31
  744. package/lib.esm/constants/numbers.d.ts.map +0 -1
  745. package/lib.esm/constants/numbers.js +0 -31
  746. package/lib.esm/constants/numbers.js.map +0 -1
  747. package/lib.esm/constants/strings.d.ts +0 -13
  748. package/lib.esm/constants/strings.d.ts.map +0 -1
  749. package/lib.esm/constants/strings.js +0 -14
  750. package/lib.esm/constants/strings.js.map +0 -1
  751. package/lib.esm/contract/contract.d.ts +0 -168
  752. package/lib.esm/contract/contract.d.ts.map +0 -1
  753. package/lib.esm/contract/contract.js +0 -953
  754. package/lib.esm/contract/contract.js.map +0 -1
  755. package/lib.esm/contract/factory.d.ts +0 -62
  756. package/lib.esm/contract/factory.d.ts.map +0 -1
  757. package/lib.esm/contract/factory.js +0 -112
  758. package/lib.esm/contract/factory.js.map +0 -1
  759. package/lib.esm/contract/index.d.ts +0 -13
  760. package/lib.esm/contract/index.d.ts.map +0 -1
  761. package/lib.esm/contract/index.js +0 -12
  762. package/lib.esm/contract/index.js.map +0 -1
  763. package/lib.esm/contract/types.d.ts +0 -193
  764. package/lib.esm/contract/types.d.ts.map +0 -1
  765. package/lib.esm/contract/types.js +0 -5
  766. package/lib.esm/contract/types.js.map +0 -1
  767. package/lib.esm/contract/wrappers.d.ts +0 -143
  768. package/lib.esm/contract/wrappers.d.ts.map +0 -1
  769. package/lib.esm/contract/wrappers.js +0 -177
  770. package/lib.esm/contract/wrappers.js.map +0 -1
  771. package/lib.esm/crypto/crypto-browser.d.ts +0 -15
  772. package/lib.esm/crypto/crypto-browser.d.ts.map +0 -1
  773. package/lib.esm/crypto/crypto-browser.js +0 -48
  774. package/lib.esm/crypto/crypto-browser.js.map +0 -1
  775. package/lib.esm/crypto/crypto.d.ts +0 -2
  776. package/lib.esm/crypto/crypto.d.ts.map +0 -1
  777. package/lib.esm/crypto/crypto.js +0 -2
  778. package/lib.esm/crypto/crypto.js.map +0 -1
  779. package/lib.esm/crypto/hmac.d.ts +0 -25
  780. package/lib.esm/crypto/hmac.d.ts.map +0 -1
  781. package/lib.esm/crypto/hmac.js +0 -47
  782. package/lib.esm/crypto/hmac.js.map +0 -1
  783. package/lib.esm/crypto/index.d.ts +0 -25
  784. package/lib.esm/crypto/index.d.ts.map +0 -1
  785. package/lib.esm/crypto/index.js +0 -36
  786. package/lib.esm/crypto/index.js.map +0 -1
  787. package/lib.esm/crypto/keccak.d.ts +0 -35
  788. package/lib.esm/crypto/keccak.d.ts.map +0 -1
  789. package/lib.esm/crypto/keccak.js +0 -48
  790. package/lib.esm/crypto/keccak.js.map +0 -1
  791. package/lib.esm/crypto/pbkdf2.d.ts +0 -35
  792. package/lib.esm/crypto/pbkdf2.d.ts.map +0 -1
  793. package/lib.esm/crypto/pbkdf2.js +0 -49
  794. package/lib.esm/crypto/pbkdf2.js.map +0 -1
  795. package/lib.esm/crypto/random.d.ts +0 -14
  796. package/lib.esm/crypto/random.d.ts.map +0 -1
  797. package/lib.esm/crypto/random.js +0 -34
  798. package/lib.esm/crypto/random.js.map +0 -1
  799. package/lib.esm/crypto/ripemd160.d.ts +0 -25
  800. package/lib.esm/crypto/ripemd160.d.ts.map +0 -1
  801. package/lib.esm/crypto/ripemd160.js +0 -38
  802. package/lib.esm/crypto/ripemd160.js.map +0 -1
  803. package/lib.esm/crypto/scrypt.d.ts +0 -82
  804. package/lib.esm/crypto/scrypt.d.ts.map +0 -1
  805. package/lib.esm/crypto/scrypt.js +0 -99
  806. package/lib.esm/crypto/scrypt.js.map +0 -1
  807. package/lib.esm/crypto/sha2.d.ts +0 -47
  808. package/lib.esm/crypto/sha2.d.ts.map +0 -1
  809. package/lib.esm/crypto/sha2.js +0 -71
  810. package/lib.esm/crypto/sha2.js.map +0 -1
  811. package/lib.esm/crypto/signature.d.ts +0 -72
  812. package/lib.esm/crypto/signature.d.ts.map +0 -1
  813. package/lib.esm/crypto/signature.js +0 -114
  814. package/lib.esm/crypto/signature.js.map +0 -1
  815. package/lib.esm/crypto/signing-key.d.ts +0 -63
  816. package/lib.esm/crypto/signing-key.d.ts.map +0 -1
  817. package/lib.esm/crypto/signing-key.js +0 -101
  818. package/lib.esm/crypto/signing-key.js.map +0 -1
  819. package/lib.esm/hash/authorization.d.ts +0 -18
  820. package/lib.esm/hash/authorization.d.ts.map +0 -1
  821. package/lib.esm/hash/authorization.js +0 -25
  822. package/lib.esm/hash/authorization.js.map +0 -1
  823. package/lib.esm/hash/id.d.ts +0 -13
  824. package/lib.esm/hash/id.d.ts.map +0 -1
  825. package/lib.esm/hash/id.js +0 -17
  826. package/lib.esm/hash/id.js.map +0 -1
  827. package/lib.esm/hash/index.d.ts +0 -15
  828. package/lib.esm/hash/index.d.ts.map +0 -1
  829. package/lib.esm/hash/index.js +0 -13
  830. package/lib.esm/hash/index.js.map +0 -1
  831. package/lib.esm/hash/message.d.ts +0 -36
  832. package/lib.esm/hash/message.d.ts.map +0 -1
  833. package/lib.esm/hash/message.js +0 -51
  834. package/lib.esm/hash/message.js.map +0 -1
  835. package/lib.esm/hash/namehash.d.ts +0 -20
  836. package/lib.esm/hash/namehash.d.ts.map +0 -1
  837. package/lib.esm/hash/namehash.js +0 -84
  838. package/lib.esm/hash/namehash.js.map +0 -1
  839. package/lib.esm/hash/solidity.d.ts +0 -31
  840. package/lib.esm/hash/solidity.d.ts.map +0 -1
  841. package/lib.esm/hash/solidity.js +0 -103
  842. package/lib.esm/hash/solidity.js.map +0 -1
  843. package/lib.esm/hash/typed-data.d.ts +0 -150
  844. package/lib.esm/hash/typed-data.d.ts.map +0 -1
  845. package/lib.esm/hash/typed-data.js +0 -519
  846. package/lib.esm/hash/typed-data.js.map +0 -1
  847. package/lib.esm/index.d.ts +0 -11
  848. package/lib.esm/index.d.ts.map +0 -1
  849. package/lib.esm/index.js +0 -11
  850. package/lib.esm/index.js.map +0 -1
  851. package/lib.esm/package.json +0 -12
  852. package/lib.esm/providers/abstract-provider.d.ts +0 -451
  853. package/lib.esm/providers/abstract-provider.d.ts.map +0 -1
  854. package/lib.esm/providers/abstract-provider.js +0 -1404
  855. package/lib.esm/providers/abstract-provider.js.map +0 -1
  856. package/lib.esm/providers/abstract-signer.d.ts +0 -69
  857. package/lib.esm/providers/abstract-signer.d.ts.map +0 -1
  858. package/lib.esm/providers/abstract-signer.js +0 -244
  859. package/lib.esm/providers/abstract-signer.js.map +0 -1
  860. package/lib.esm/providers/community.d.ts +0 -29
  861. package/lib.esm/providers/community.d.ts.map +0 -1
  862. package/lib.esm/providers/community.js +0 -36
  863. package/lib.esm/providers/community.js.map +0 -1
  864. package/lib.esm/providers/contracts.d.ts +0 -36
  865. package/lib.esm/providers/contracts.d.ts.map +0 -1
  866. package/lib.esm/providers/contracts.js +0 -2
  867. package/lib.esm/providers/contracts.js.map +0 -1
  868. package/lib.esm/providers/default-provider.d.ts +0 -41
  869. package/lib.esm/providers/default-provider.d.ts.map +0 -1
  870. package/lib.esm/providers/default-provider.js +0 -88
  871. package/lib.esm/providers/default-provider.js.map +0 -1
  872. package/lib.esm/providers/ens-resolver.d.ts +0 -147
  873. package/lib.esm/providers/ens-resolver.d.ts.map +0 -1
  874. package/lib.esm/providers/ens-resolver.js +0 -496
  875. package/lib.esm/providers/ens-resolver.js.map +0 -1
  876. package/lib.esm/providers/format.d.ts +0 -15
  877. package/lib.esm/providers/format.d.ts.map +0 -1
  878. package/lib.esm/providers/format.js +0 -283
  879. package/lib.esm/providers/format.js.map +0 -1
  880. package/lib.esm/providers/formatting.d.ts +0 -318
  881. package/lib.esm/providers/formatting.d.ts.map +0 -1
  882. package/lib.esm/providers/formatting.js +0 -9
  883. package/lib.esm/providers/formatting.js.map +0 -1
  884. package/lib.esm/providers/index.d.ts +0 -41
  885. package/lib.esm/providers/index.d.ts.map +0 -1
  886. package/lib.esm/providers/index.js +0 -31
  887. package/lib.esm/providers/index.js.map +0 -1
  888. package/lib.esm/providers/network.d.ts +0 -99
  889. package/lib.esm/providers/network.d.ts.map +0 -1
  890. package/lib.esm/providers/network.js +0 -265
  891. package/lib.esm/providers/network.js.map +0 -1
  892. package/lib.esm/providers/pagination.d.ts +0 -6
  893. package/lib.esm/providers/pagination.d.ts.map +0 -1
  894. package/lib.esm/providers/pagination.js +0 -2
  895. package/lib.esm/providers/pagination.js.map +0 -1
  896. package/lib.esm/providers/plugin-fallback.d.ts +0 -13
  897. package/lib.esm/providers/plugin-fallback.d.ts.map +0 -1
  898. package/lib.esm/providers/plugin-fallback.js +0 -26
  899. package/lib.esm/providers/plugin-fallback.js.map +0 -1
  900. package/lib.esm/providers/plugins-network.d.ts +0 -170
  901. package/lib.esm/providers/plugins-network.d.ts.map +0 -1
  902. package/lib.esm/providers/plugins-network.js +0 -208
  903. package/lib.esm/providers/plugins-network.js.map +0 -1
  904. package/lib.esm/providers/provider-browser.d.ts +0 -108
  905. package/lib.esm/providers/provider-browser.d.ts.map +0 -1
  906. package/lib.esm/providers/provider-browser.js +0 -200
  907. package/lib.esm/providers/provider-browser.js.map +0 -1
  908. package/lib.esm/providers/provider-fallback.d.ts +0 -115
  909. package/lib.esm/providers/provider-fallback.d.ts.map +0 -1
  910. package/lib.esm/providers/provider-fallback.js +0 -620
  911. package/lib.esm/providers/provider-fallback.js.map +0 -1
  912. package/lib.esm/providers/provider-ipcsocket-browser.d.ts +0 -3
  913. package/lib.esm/providers/provider-ipcsocket-browser.d.ts.map +0 -1
  914. package/lib.esm/providers/provider-ipcsocket-browser.js +0 -3
  915. package/lib.esm/providers/provider-ipcsocket-browser.js.map +0 -1
  916. package/lib.esm/providers/provider-ipcsocket.d.ts +0 -21
  917. package/lib.esm/providers/provider-ipcsocket.d.ts.map +0 -1
  918. package/lib.esm/providers/provider-ipcsocket.js +0 -68
  919. package/lib.esm/providers/provider-ipcsocket.js.map +0 -1
  920. package/lib.esm/providers/provider-jsonrpc.d.ts +0 -360
  921. package/lib.esm/providers/provider-jsonrpc.d.ts.map +0 -1
  922. package/lib.esm/providers/provider-jsonrpc.js +0 -972
  923. package/lib.esm/providers/provider-jsonrpc.js.map +0 -1
  924. package/lib.esm/providers/provider-socket.d.ts +0 -113
  925. package/lib.esm/providers/provider-socket.d.ts.map +0 -1
  926. package/lib.esm/providers/provider-socket.js +0 -301
  927. package/lib.esm/providers/provider-socket.js.map +0 -1
  928. package/lib.esm/providers/provider-websocket.d.ts +0 -37
  929. package/lib.esm/providers/provider-websocket.d.ts.map +0 -1
  930. package/lib.esm/providers/provider-websocket.js +0 -76
  931. package/lib.esm/providers/provider-websocket.js.map +0 -1
  932. package/lib.esm/providers/provider.d.ts +0 -1223
  933. package/lib.esm/providers/provider.d.ts.map +0 -1
  934. package/lib.esm/providers/provider.js +0 -1312
  935. package/lib.esm/providers/provider.js.map +0 -1
  936. package/lib.esm/providers/signer-noncemanager.d.ts +0 -38
  937. package/lib.esm/providers/signer-noncemanager.d.ts.map +0 -1
  938. package/lib.esm/providers/signer-noncemanager.js +0 -74
  939. package/lib.esm/providers/signer-noncemanager.js.map +0 -1
  940. package/lib.esm/providers/signer.d.ts +0 -131
  941. package/lib.esm/providers/signer.d.ts.map +0 -1
  942. package/lib.esm/providers/signer.js +0 -2
  943. package/lib.esm/providers/signer.js.map +0 -1
  944. package/lib.esm/providers/subscriber-connection.d.ts +0 -25
  945. package/lib.esm/providers/subscriber-connection.d.ts.map +0 -1
  946. package/lib.esm/providers/subscriber-connection.js +0 -52
  947. package/lib.esm/providers/subscriber-connection.js.map +0 -1
  948. package/lib.esm/providers/subscriber-filterid.d.ts +0 -64
  949. package/lib.esm/providers/subscriber-filterid.d.ts.map +0 -1
  950. package/lib.esm/providers/subscriber-filterid.js +0 -174
  951. package/lib.esm/providers/subscriber-filterid.js.map +0 -1
  952. package/lib.esm/providers/subscriber-polling.d.ts +0 -100
  953. package/lib.esm/providers/subscriber-polling.d.ts.map +0 -1
  954. package/lib.esm/providers/subscriber-polling.js +0 -293
  955. package/lib.esm/providers/subscriber-polling.js.map +0 -1
  956. package/lib.esm/providers/ws-browser.d.ts +0 -3
  957. package/lib.esm/providers/ws-browser.d.ts.map +0 -1
  958. package/lib.esm/providers/ws-browser.js +0 -16
  959. package/lib.esm/providers/ws-browser.js.map +0 -1
  960. package/lib.esm/providers/ws.d.ts +0 -2
  961. package/lib.esm/providers/ws.d.ts.map +0 -1
  962. package/lib.esm/providers/ws.js +0 -2
  963. package/lib.esm/providers/ws.js.map +0 -1
  964. package/lib.esm/quantumcoin.d.ts +0 -24
  965. package/lib.esm/quantumcoin.d.ts.map +0 -1
  966. package/lib.esm/quantumcoin.js +0 -22
  967. package/lib.esm/quantumcoin.js.map +0 -1
  968. package/lib.esm/transaction/accesslist.d.ts +0 -6
  969. package/lib.esm/transaction/accesslist.d.ts.map +0 -1
  970. package/lib.esm/transaction/accesslist.js +0 -37
  971. package/lib.esm/transaction/accesslist.js.map +0 -1
  972. package/lib.esm/transaction/address.d.ts +0 -15
  973. package/lib.esm/transaction/address.d.ts.map +0 -1
  974. package/lib.esm/transaction/address.js +0 -34
  975. package/lib.esm/transaction/address.js.map +0 -1
  976. package/lib.esm/transaction/authorization.d.ts +0 -3
  977. package/lib.esm/transaction/authorization.d.ts.map +0 -1
  978. package/lib.esm/transaction/authorization.js +0 -12
  979. package/lib.esm/transaction/authorization.js.map +0 -1
  980. package/lib.esm/transaction/index.d.ts +0 -40
  981. package/lib.esm/transaction/index.d.ts.map +0 -1
  982. package/lib.esm/transaction/index.js +0 -11
  983. package/lib.esm/transaction/index.js.map +0 -1
  984. package/lib.esm/transaction/transaction.d.ts +0 -400
  985. package/lib.esm/transaction/transaction.d.ts.map +0 -1
  986. package/lib.esm/transaction/transaction.js +0 -1111
  987. package/lib.esm/transaction/transaction.js.map +0 -1
  988. package/lib.esm/utils/base58.d.ts +0 -23
  989. package/lib.esm/utils/base58.d.ts.map +0 -1
  990. package/lib.esm/utils/base58.js +0 -63
  991. package/lib.esm/utils/base58.js.map +0 -1
  992. package/lib.esm/utils/base64-browser.d.ts +0 -4
  993. package/lib.esm/utils/base64-browser.d.ts.map +0 -1
  994. package/lib.esm/utils/base64-browser.js +0 -19
  995. package/lib.esm/utils/base64-browser.js.map +0 -1
  996. package/lib.esm/utils/base64.d.ts +0 -40
  997. package/lib.esm/utils/base64.d.ts.map +0 -1
  998. package/lib.esm/utils/base64.js +0 -53
  999. package/lib.esm/utils/base64.js.map +0 -1
  1000. package/lib.esm/utils/data.d.ts +0 -93
  1001. package/lib.esm/utils/data.d.ts.map +0 -1
  1002. package/lib.esm/utils/data.js +0 -170
  1003. package/lib.esm/utils/data.js.map +0 -1
  1004. package/lib.esm/utils/errors.d.ts +0 -512
  1005. package/lib.esm/utils/errors.d.ts.map +0 -1
  1006. package/lib.esm/utils/errors.js +0 -224
  1007. package/lib.esm/utils/errors.js.map +0 -1
  1008. package/lib.esm/utils/events.d.ts +0 -77
  1009. package/lib.esm/utils/events.d.ts.map +0 -1
  1010. package/lib.esm/utils/events.js +0 -42
  1011. package/lib.esm/utils/events.js.map +0 -1
  1012. package/lib.esm/utils/fetch.d.ts +0 -363
  1013. package/lib.esm/utils/fetch.d.ts.map +0 -1
  1014. package/lib.esm/utils/fetch.js +0 -852
  1015. package/lib.esm/utils/fetch.js.map +0 -1
  1016. package/lib.esm/utils/fixednumber.d.ts +0 -252
  1017. package/lib.esm/utils/fixednumber.d.ts.map +0 -1
  1018. package/lib.esm/utils/fixednumber.js +0 -526
  1019. package/lib.esm/utils/fixednumber.js.map +0 -1
  1020. package/lib.esm/utils/geturl-browser.d.ts +0 -4
  1021. package/lib.esm/utils/geturl-browser.d.ts.map +0 -1
  1022. package/lib.esm/utils/geturl-browser.js +0 -62
  1023. package/lib.esm/utils/geturl-browser.js.map +0 -1
  1024. package/lib.esm/utils/geturl.d.ts +0 -10
  1025. package/lib.esm/utils/geturl.d.ts.map +0 -1
  1026. package/lib.esm/utils/geturl.js +0 -114
  1027. package/lib.esm/utils/geturl.js.map +0 -1
  1028. package/lib.esm/utils/index.d.ts +0 -30
  1029. package/lib.esm/utils/index.d.ts.map +0 -1
  1030. package/lib.esm/utils/index.js +0 -22
  1031. package/lib.esm/utils/index.js.map +0 -1
  1032. package/lib.esm/utils/maths.d.ts +0 -66
  1033. package/lib.esm/utils/maths.d.ts.map +0 -1
  1034. package/lib.esm/utils/maths.js +0 -215
  1035. package/lib.esm/utils/maths.js.map +0 -1
  1036. package/lib.esm/utils/properties.d.ts +0 -23
  1037. package/lib.esm/utils/properties.d.ts.map +0 -1
  1038. package/lib.esm/utils/properties.js +0 -54
  1039. package/lib.esm/utils/properties.js.map +0 -1
  1040. package/lib.esm/utils/rlp-decode.d.ts +0 -6
  1041. package/lib.esm/utils/rlp-decode.d.ts.map +0 -1
  1042. package/lib.esm/utils/rlp-decode.js +0 -79
  1043. package/lib.esm/utils/rlp-decode.js.map +0 -1
  1044. package/lib.esm/utils/rlp-encode.d.ts +0 -6
  1045. package/lib.esm/utils/rlp-encode.d.ts.map +0 -1
  1046. package/lib.esm/utils/rlp-encode.js +0 -49
  1047. package/lib.esm/utils/rlp-encode.js.map +0 -1
  1048. package/lib.esm/utils/rlp.d.ts +0 -17
  1049. package/lib.esm/utils/rlp.d.ts.map +0 -1
  1050. package/lib.esm/utils/rlp.js +0 -9
  1051. package/lib.esm/utils/rlp.js.map +0 -1
  1052. package/lib.esm/utils/units.d.ts +0 -24
  1053. package/lib.esm/utils/units.d.ts.map +0 -1
  1054. package/lib.esm/utils/units.js +0 -83
  1055. package/lib.esm/utils/units.js.map +0 -1
  1056. package/lib.esm/utils/utf8.d.ts +0 -96
  1057. package/lib.esm/utils/utf8.d.ts.map +0 -1
  1058. package/lib.esm/utils/utf8.js +0 -221
  1059. package/lib.esm/utils/utf8.js.map +0 -1
  1060. package/lib.esm/utils/uuid.d.ts +0 -8
  1061. package/lib.esm/utils/uuid.d.ts.map +0 -1
  1062. package/lib.esm/utils/uuid.js +0 -30
  1063. package/lib.esm/utils/uuid.js.map +0 -1
  1064. package/lib.esm/wallet/base-wallet.d.ts +0 -57
  1065. package/lib.esm/wallet/base-wallet.d.ts.map +0 -1
  1066. package/lib.esm/wallet/base-wallet.js +0 -123
  1067. package/lib.esm/wallet/base-wallet.js.map +0 -1
  1068. package/lib.esm/wallet/index.d.ts +0 -23
  1069. package/lib.esm/wallet/index.d.ts.map +0 -1
  1070. package/lib.esm/wallet/index.js +0 -22
  1071. package/lib.esm/wallet/index.js.map +0 -1
  1072. package/lib.esm/wallet/json-keystore.d.ts +0 -40
  1073. package/lib.esm/wallet/json-keystore.d.ts.map +0 -1
  1074. package/lib.esm/wallet/json-keystore.js +0 -84
  1075. package/lib.esm/wallet/json-keystore.js.map +0 -1
  1076. package/lib.esm/wallet/utils.d.ts +0 -8
  1077. package/lib.esm/wallet/utils.d.ts.map +0 -1
  1078. package/lib.esm/wallet/utils.js +0 -142
  1079. package/lib.esm/wallet/utils.js.map +0 -1
  1080. package/lib.esm/wallet/wallet.d.ts +0 -62
  1081. package/lib.esm/wallet/wallet.d.ts.map +0 -1
  1082. package/lib.esm/wallet/wallet.js +0 -105
  1083. package/lib.esm/wallet/wallet.js.map +0 -1
  1084. package/lib.esm/wordlists/bit-reader.d.ts +0 -5
  1085. package/lib.esm/wordlists/bit-reader.d.ts.map +0 -1
  1086. package/lib.esm/wordlists/bit-reader.js +0 -32
  1087. package/lib.esm/wordlists/bit-reader.js.map +0 -1
  1088. package/lib.esm/wordlists/decode-owl.d.ts +0 -9
  1089. package/lib.esm/wordlists/decode-owl.d.ts.map +0 -1
  1090. package/lib.esm/wordlists/decode-owl.js +0 -55
  1091. package/lib.esm/wordlists/decode-owl.js.map +0 -1
  1092. package/lib.esm/wordlists/decode-owla.d.ts +0 -5
  1093. package/lib.esm/wordlists/decode-owla.d.ts.map +0 -1
  1094. package/lib.esm/wordlists/decode-owla.js +0 -28
  1095. package/lib.esm/wordlists/decode-owla.js.map +0 -1
  1096. package/lib.esm/wordlists/generation/encode-latin.d.ts +0 -25
  1097. package/lib.esm/wordlists/generation/encode-latin.d.ts.map +0 -1
  1098. package/lib.esm/wordlists/generation/encode-latin.js +0 -344
  1099. package/lib.esm/wordlists/generation/encode-latin.js.map +0 -1
  1100. package/lib.esm/wordlists/index.d.ts +0 -25
  1101. package/lib.esm/wordlists/index.d.ts.map +0 -1
  1102. package/lib.esm/wordlists/index.js +0 -25
  1103. package/lib.esm/wordlists/index.js.map +0 -1
  1104. package/lib.esm/wordlists/lang-cz.d.ts +0 -23
  1105. package/lib.esm/wordlists/lang-cz.d.ts.map +0 -1
  1106. package/lib.esm/wordlists/lang-cz.js +0 -31
  1107. package/lib.esm/wordlists/lang-cz.js.map +0 -1
  1108. package/lib.esm/wordlists/lang-en.d.ts +0 -23
  1109. package/lib.esm/wordlists/lang-en.d.ts.map +0 -1
  1110. package/lib.esm/wordlists/lang-en.js +0 -31
  1111. package/lib.esm/wordlists/lang-en.js.map +0 -1
  1112. package/lib.esm/wordlists/lang-es.d.ts +0 -23
  1113. package/lib.esm/wordlists/lang-es.d.ts.map +0 -1
  1114. package/lib.esm/wordlists/lang-es.js +0 -32
  1115. package/lib.esm/wordlists/lang-es.js.map +0 -1
  1116. package/lib.esm/wordlists/lang-fr.d.ts +0 -23
  1117. package/lib.esm/wordlists/lang-fr.d.ts.map +0 -1
  1118. package/lib.esm/wordlists/lang-fr.js +0 -32
  1119. package/lib.esm/wordlists/lang-fr.js.map +0 -1
  1120. package/lib.esm/wordlists/lang-it.d.ts +0 -23
  1121. package/lib.esm/wordlists/lang-it.d.ts.map +0 -1
  1122. package/lib.esm/wordlists/lang-it.js +0 -31
  1123. package/lib.esm/wordlists/lang-it.js.map +0 -1
  1124. package/lib.esm/wordlists/lang-ja.d.ts +0 -27
  1125. package/lib.esm/wordlists/lang-ja.d.ts.map +0 -1
  1126. package/lib.esm/wordlists/lang-ja.js +0 -154
  1127. package/lib.esm/wordlists/lang-ja.js.map +0 -1
  1128. package/lib.esm/wordlists/lang-ko.d.ts +0 -25
  1129. package/lib.esm/wordlists/lang-ko.d.ts.map +0 -1
  1130. package/lib.esm/wordlists/lang-ko.js +0 -89
  1131. package/lib.esm/wordlists/lang-ko.js.map +0 -1
  1132. package/lib.esm/wordlists/lang-pt.d.ts +0 -23
  1133. package/lib.esm/wordlists/lang-pt.d.ts.map +0 -1
  1134. package/lib.esm/wordlists/lang-pt.js +0 -31
  1135. package/lib.esm/wordlists/lang-pt.js.map +0 -1
  1136. package/lib.esm/wordlists/lang-zh.d.ts +0 -32
  1137. package/lib.esm/wordlists/lang-zh.d.ts.map +0 -1
  1138. package/lib.esm/wordlists/lang-zh.js +0 -92
  1139. package/lib.esm/wordlists/lang-zh.js.map +0 -1
  1140. package/lib.esm/wordlists/wordlist-owl.d.ts +0 -32
  1141. package/lib.esm/wordlists/wordlist-owl.d.ts.map +0 -1
  1142. package/lib.esm/wordlists/wordlist-owl.js +0 -66
  1143. package/lib.esm/wordlists/wordlist-owl.js.map +0 -1
  1144. package/lib.esm/wordlists/wordlist-owla.d.ts +0 -30
  1145. package/lib.esm/wordlists/wordlist-owla.d.ts.map +0 -1
  1146. package/lib.esm/wordlists/wordlist-owla.js +0 -36
  1147. package/lib.esm/wordlists/wordlist-owla.js.map +0 -1
  1148. package/lib.esm/wordlists/wordlist.d.ts +0 -47
  1149. package/lib.esm/wordlists/wordlist.d.ts.map +0 -1
  1150. package/lib.esm/wordlists/wordlist.js +0 -42
  1151. package/lib.esm/wordlists/wordlist.js.map +0 -1
  1152. package/lib.esm/wordlists/wordlists-browser.d.ts +0 -3
  1153. package/lib.esm/wordlists/wordlists-browser.d.ts.map +0 -1
  1154. package/lib.esm/wordlists/wordlists-browser.js +0 -5
  1155. package/lib.esm/wordlists/wordlists-browser.js.map +0 -1
  1156. package/lib.esm/wordlists/wordlists-extra.d.ts +0 -9
  1157. package/lib.esm/wordlists/wordlists-extra.d.ts.map +0 -1
  1158. package/lib.esm/wordlists/wordlists-extra.js +0 -9
  1159. package/lib.esm/wordlists/wordlists-extra.js.map +0 -1
  1160. package/lib.esm/wordlists/wordlists.d.ts +0 -16
  1161. package/lib.esm/wordlists/wordlists.d.ts.map +0 -1
  1162. package/lib.esm/wordlists/wordlists.js +0 -35
  1163. package/lib.esm/wordlists/wordlists.js.map +0 -1
  1164. package/rollup.config.mjs +0 -50
  1165. package/src.ts/_version.ts +0 -6
  1166. package/src.ts/abi/abi-coder.ts +0 -237
  1167. package/src.ts/abi/bytes32.ts +0 -45
  1168. package/src.ts/abi/coders/abstract-coder.ts +0 -541
  1169. package/src.ts/abi/coders/address.ts +0 -36
  1170. package/src.ts/abi/coders/anonymous.ts +0 -29
  1171. package/src.ts/abi/coders/array.ts +0 -199
  1172. package/src.ts/abi/coders/boolean.ts +0 -27
  1173. package/src.ts/abi/coders/bytes.ts +0 -43
  1174. package/src.ts/abi/coders/fixed-bytes.ts +0 -37
  1175. package/src.ts/abi/coders/null.ts +0 -28
  1176. package/src.ts/abi/coders/number.ts +0 -63
  1177. package/src.ts/abi/coders/string.ts +0 -29
  1178. package/src.ts/abi/coders/tuple.ts +0 -69
  1179. package/src.ts/abi/fragments.ts +0 -1617
  1180. package/src.ts/abi/index.ts +0 -41
  1181. package/src.ts/abi/interface.ts +0 -1271
  1182. package/src.ts/abi/typed.ts +0 -796
  1183. package/src.ts/address/address.ts +0 -148
  1184. package/src.ts/address/checks.ts +0 -123
  1185. package/src.ts/address/contract-address.ts +0 -80
  1186. package/src.ts/address/index.ts +0 -57
  1187. package/src.ts/constants/addresses.ts +0 -8
  1188. package/src.ts/constants/hashes.ts +0 -7
  1189. package/src.ts/constants/index.ts +0 -16
  1190. package/src.ts/constants/numbers.ts +0 -35
  1191. package/src.ts/constants/strings.ts +0 -16
  1192. package/src.ts/contract/contract.ts +0 -1120
  1193. package/src.ts/contract/factory.ts +0 -143
  1194. package/src.ts/contract/index.ts +0 -31
  1195. package/src.ts/contract/types.ts +0 -236
  1196. package/src.ts/contract/wrappers.ts +0 -225
  1197. package/src.ts/crypto/crypto-browser.ts +0 -64
  1198. package/src.ts/crypto/crypto.ts +0 -4
  1199. package/src.ts/crypto/hmac.ts +0 -51
  1200. package/src.ts/crypto/index.ts +0 -59
  1201. package/src.ts/crypto/keccak.ts +0 -54
  1202. package/src.ts/crypto/pbkdf2.ts +0 -55
  1203. package/src.ts/crypto/random.ts +0 -36
  1204. package/src.ts/crypto/ripemd160.ts +0 -43
  1205. package/src.ts/crypto/scrypt.ts +0 -114
  1206. package/src.ts/crypto/sha2.ts +0 -78
  1207. package/src.ts/crypto/signature.ts +0 -145
  1208. package/src.ts/crypto/signing-key.ts +0 -126
  1209. package/src.ts/hash/authorization.ts +0 -38
  1210. package/src.ts/hash/id.ts +0 -17
  1211. package/src.ts/hash/index.ts +0 -18
  1212. package/src.ts/hash/message.ts +0 -51
  1213. package/src.ts/hash/namehash.ts +0 -101
  1214. package/src.ts/hash/solidity.ts +0 -117
  1215. package/src.ts/hash/typed-data.ts +0 -658
  1216. package/src.ts/index.ts +0 -12
  1217. package/src.ts/providers/abstract-provider.ts +0 -1761
  1218. package/src.ts/providers/abstract-signer.ts +0 -314
  1219. package/src.ts/providers/community.ts +0 -49
  1220. package/src.ts/providers/contracts.ts +0 -42
  1221. package/src.ts/providers/default-provider.ts +0 -96
  1222. package/src.ts/providers/ens-resolver.ts +0 -606
  1223. package/src.ts/providers/format.ts +0 -320
  1224. package/src.ts/providers/formatting.ts +0 -418
  1225. package/src.ts/providers/index.ts +0 -125
  1226. package/src.ts/providers/network.ts +0 -327
  1227. package/src.ts/providers/pagination.ts +0 -8
  1228. package/src.ts/providers/plugin-fallback.ts +0 -35
  1229. package/src.ts/providers/plugins-network.ts +0 -281
  1230. package/src.ts/providers/provider-browser.ts +0 -334
  1231. package/src.ts/providers/provider-fallback.ts +0 -801
  1232. package/src.ts/providers/provider-ipcsocket-browser.ts +0 -3
  1233. package/src.ts/providers/provider-ipcsocket.ts +0 -81
  1234. package/src.ts/providers/provider-jsonrpc.ts +0 -1334
  1235. package/src.ts/providers/provider-socket.ts +0 -352
  1236. package/src.ts/providers/provider-websocket.ts +0 -103
  1237. package/src.ts/providers/provider.ts +0 -2136
  1238. package/src.ts/providers/signer-noncemanager.ts +0 -98
  1239. package/src.ts/providers/signer.ts +0 -166
  1240. package/src.ts/providers/subscriber-connection.ts +0 -74
  1241. package/src.ts/providers/subscriber-filterid.ts +0 -199
  1242. package/src.ts/providers/subscriber-polling.ts +0 -321
  1243. package/src.ts/providers/ws-browser.ts +0 -11
  1244. package/src.ts/providers/ws.ts +0 -3
  1245. package/src.ts/quantumcoin.ts +0 -219
  1246. package/src.ts/thirdparty.d.ts +0 -16
  1247. package/src.ts/transaction/accesslist.ts +0 -43
  1248. package/src.ts/transaction/address.ts +0 -35
  1249. package/src.ts/transaction/authorization.ts +0 -14
  1250. package/src.ts/transaction/index.ts +0 -51
  1251. package/src.ts/transaction/transaction.ts +0 -1349
  1252. package/src.ts/utils/base58.ts +0 -73
  1253. package/src.ts/utils/base64-browser.ts +0 -25
  1254. package/src.ts/utils/base64.ts +0 -56
  1255. package/src.ts/utils/data.ts +0 -199
  1256. package/src.ts/utils/errors.ts +0 -793
  1257. package/src.ts/utils/events.ts +0 -105
  1258. package/src.ts/utils/fetch.ts +0 -970
  1259. package/src.ts/utils/fixednumber.ts +0 -643
  1260. package/src.ts/utils/geturl-browser.ts +0 -81
  1261. package/src.ts/utils/geturl.ts +0 -134
  1262. package/src.ts/utils/index.ts +0 -95
  1263. package/src.ts/utils/maths.ts +0 -240
  1264. package/src.ts/utils/properties.ts +0 -60
  1265. package/src.ts/utils/rlp-decode.ts +0 -104
  1266. package/src.ts/utils/rlp-encode.ts +0 -64
  1267. package/src.ts/utils/rlp.ts +0 -20
  1268. package/src.ts/utils/test.txt +0 -0
  1269. package/src.ts/utils/units.ts +0 -91
  1270. package/src.ts/utils/utf8.ts +0 -325
  1271. package/src.ts/utils/uuid.ts +0 -36
  1272. package/src.ts/wallet/base-wallet.ts +0 -160
  1273. package/src.ts/wallet/index.ts +0 -32
  1274. package/src.ts/wallet/json-keystore.ts +0 -108
  1275. package/src.ts/wallet/utils.ts +0 -147
  1276. package/src.ts/wallet/wallet.ts +0 -138
  1277. package/src.ts/wordlists/bit-reader.ts +0 -35
  1278. package/src.ts/wordlists/decode-owl.ts +0 -58
  1279. package/src.ts/wordlists/decode-owla.ts +0 -33
  1280. package/src.ts/wordlists/generation/encode-latin.ts +0 -370
  1281. package/src.ts/wordlists/index.ts +0 -26
  1282. package/src.ts/wordlists/lang-cz.ts +0 -33
  1283. package/src.ts/wordlists/lang-en.ts +0 -33
  1284. package/src.ts/wordlists/lang-es.ts +0 -35
  1285. package/src.ts/wordlists/lang-fr.ts +0 -34
  1286. package/src.ts/wordlists/lang-it.ts +0 -33
  1287. package/src.ts/wordlists/lang-ja.ts +0 -181
  1288. package/src.ts/wordlists/lang-ko.ts +0 -104
  1289. package/src.ts/wordlists/lang-pt.ts +0 -34
  1290. package/src.ts/wordlists/lang-zh.ts +0 -112
  1291. package/src.ts/wordlists/wordlist-owl.ts +0 -77
  1292. package/src.ts/wordlists/wordlist-owla.ts +0 -41
  1293. package/src.ts/wordlists/wordlist.ts +0 -59
  1294. package/src.ts/wordlists/wordlists-browser.ts +0 -8
  1295. package/src.ts/wordlists/wordlists-extra.ts +0 -9
  1296. package/src.ts/wordlists/wordlists.ts +0 -38
@@ -1,2136 +0,0 @@
1
- //import { resolveAddress } from "@ethersproject/address";
2
- import {
3
- defineProperties, getBigInt, getNumber, hexlify, isBytesLike,
4
- resolveProperties,
5
- assert, assertArgument, isError, makeError
6
- } from "../utils/index.js";
7
- import { accessListify } from "../transaction/index.js";
8
-
9
- import type { AddressLike, NameResolver } from "../address/index.js";
10
- import type { BigNumberish, EventEmitterable } from "../utils/index.js";
11
- import type { Signature } from "../crypto/index.js";
12
- import type {
13
- AccessList, AccessListish, Authorization, AuthorizationLike, BlobLike,
14
- KzgLibraryLike, TransactionLike
15
- } from "../transaction/index.js";
16
-
17
- import type { ContractRunner } from "./contracts.js";
18
- import type { Network } from "./network.js";
19
-
20
-
21
- const BN_0 = BigInt(0);
22
-
23
- /**
24
- * A **BlockTag** specifies a specific block.
25
- *
26
- * **numeric value** - specifies the block height, where
27
- * the genesis block is block 0; many operations accept a negative
28
- * value which indicates the block number should be deducted from
29
- * the most recent block. A numeric value may be a ``number``, ``bigint``,
30
- * or a decimal of hex string.
31
- *
32
- * **blockhash** - specifies a specific block by its blockhash; this allows
33
- * potentially orphaned blocks to be specifed, without ambiguity, but many
34
- * backends do not support this for some operations.
35
- */
36
- export type BlockTag = BigNumberish | string;
37
-
38
- import {
39
- BlockParams, LogParams, TransactionReceiptParams,
40
- TransactionResponseParams
41
- } from "./formatting.js";
42
-
43
- // -----------------------
44
-
45
- function getValue<T>(value: undefined | null | T): null | T {
46
- if (value == null) { return null; }
47
- return value;
48
- }
49
-
50
- function toJson(value: null | bigint): null | string {
51
- if (value == null) { return null; }
52
- return value.toString();
53
- }
54
-
55
- // @TODO? <T extends FeeData = { }> implements Required<T>
56
-
57
- /**
58
- * A **FeeData** wraps all the fee-related values associated with
59
- * the network.
60
- */
61
- export class FeeData {
62
- /**
63
- * The gas price for legacy networks.
64
- */
65
- readonly gasPrice!: null | bigint;
66
-
67
- /**
68
- * The maximum fee to pay per gas.
69
- *
70
- * The base fee per gas is defined by the network and based on
71
- * congestion, increasing the cost during times of heavy load
72
- * and lowering when less busy.
73
- *
74
- * The actual fee per gas will be the base fee for the block
75
- * and the priority fee, up to the max fee per gas.
76
- *
77
- * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))
78
- */
79
- readonly maxFeePerGas!: null | bigint;
80
-
81
- /**
82
- * The additional amout to pay per gas to encourage a validator
83
- * to include the transaction.
84
- *
85
- * The purpose of this is to compensate the validator for the
86
- * adjusted risk for including a given transaction.
87
- *
88
- * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))
89
- */
90
- readonly maxPriorityFeePerGas!: null | bigint;
91
-
92
- /**
93
- * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and
94
- * %%maxPriorityFeePerGas%%.
95
- */
96
- constructor(gasPrice?: null | bigint, maxFeePerGas?: null | bigint, maxPriorityFeePerGas?: null | bigint) {
97
- defineProperties<FeeData>(this, {
98
- gasPrice: getValue(gasPrice),
99
- maxFeePerGas: getValue(maxFeePerGas),
100
- maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)
101
- });
102
- }
103
-
104
- /**
105
- * Returns a JSON-friendly value.
106
- */
107
- toJSON(): any {
108
- const {
109
- gasPrice, maxFeePerGas, maxPriorityFeePerGas
110
- } = this;
111
- return {
112
- _type: "FeeData",
113
- gasPrice: toJson(gasPrice),
114
- maxFeePerGas: toJson(maxFeePerGas),
115
- maxPriorityFeePerGas: toJson(maxPriorityFeePerGas),
116
- };
117
- }
118
- }
119
-
120
-
121
- /**
122
- * A **TransactionRequest** is a transactions with potentially various
123
- * properties not defined, or with less strict types for its values.
124
- *
125
- * This is used to pass to various operations, which will internally
126
- * coerce any types and populate any necessary values.
127
- */
128
- export interface TransactionRequest {
129
- /**
130
- * The transaction type.
131
- */
132
- type?: null | number;
133
-
134
- /**
135
- * The target of the transaction.
136
- */
137
- to?: null | AddressLike;
138
-
139
- /**
140
- * The sender of the transaction.
141
- */
142
- from?: null | AddressLike;
143
-
144
- /**
145
- * The nonce of the transaction, used to prevent replay attacks.
146
- */
147
- nonce?: null | number;
148
-
149
- /**
150
- * The maximum amount of gas to allow this transaction to consume.
151
- */
152
- gasLimit?: null | BigNumberish;
153
-
154
- /**
155
- * The gas price to use for legacy transactions or transactions on
156
- * legacy networks.
157
- *
158
- * Most of the time the ``max*FeePerGas`` is preferred.
159
- */
160
- gasPrice?: null | BigNumberish;
161
-
162
- /**
163
- * The [[link-eip-1559]] maximum priority fee to pay per gas.
164
- */
165
- maxPriorityFeePerGas?: null | BigNumberish;
166
-
167
- /**
168
- * The [[link-eip-1559]] maximum total fee to pay per gas. The actual
169
- * value used is protocol enforced to be the block's base fee.
170
- */
171
- maxFeePerGas?: null | BigNumberish;
172
-
173
- /**
174
- * The transaction data.
175
- */
176
- data?: null | string;
177
-
178
- /**
179
- * The transaction value (in wei).
180
- */
181
- value?: null | BigNumberish;
182
-
183
- /**
184
- * The chain ID for the network this transaction is valid on.
185
- */
186
- chainId?: null | BigNumberish;
187
-
188
- /**
189
- * The [[link-eip-2930]] access list. Storage slots included in the access
190
- * list are //warmed// by pre-loading them, so their initial cost to
191
- * fetch is guaranteed, but then each additional access is cheaper.
192
- */
193
- accessList?: null | AccessListish;
194
-
195
- /**
196
- * A custom object, which can be passed along for network-specific
197
- * values.
198
- */
199
- customData?: any;
200
-
201
- // Only meaningful when used for call
202
-
203
- /**
204
- * When using ``call`` or ``estimateGas``, this allows a specific
205
- * block to be queried. Many backends do not support this and when
206
- * unsupported errors are silently squelched and ``"latest"`` is used.
207
- */
208
- blockTag?: BlockTag;
209
-
210
- /**
211
- * When using ``call``, this enables CCIP-read, which permits the
212
- * provider to be redirected to web-based content during execution,
213
- * which is then further validated by the contract.
214
- *
215
- * There are potential security implications allowing CCIP-read, as
216
- * it could be used to expose the IP address or user activity during
217
- * the fetch to unexpected parties.
218
- */
219
- enableCcipRead?: boolean;
220
-
221
- /**
222
- * The blob versioned hashes (see [[link-eip-4844]]).
223
- */
224
- blobVersionedHashes?: null | Array<string>
225
-
226
- /**
227
- * The maximum fee per blob gas (see [[link-eip-4844]]).
228
- */
229
- maxFeePerBlobGas?: null | BigNumberish;
230
-
231
- /**
232
- * Any blobs to include in the transaction (see [[link-eip-4844]]).
233
- */
234
- blobs?: null | Array<BlobLike>;
235
-
236
- /**
237
- * An external library for computing the KZG commitments and
238
- * proofs necessary for EIP-4844 transactions (see [[link-eip-4844]]).
239
- *
240
- * This is generally ``null``, unless you are creating BLOb
241
- * transactions.
242
- */
243
- kzg?: null | KzgLibraryLike;
244
-
245
- /**
246
- * The [[link-eip-7702]] authorizations (if any).
247
- */
248
- authorizationList?: null | Array<AuthorizationLike>;
249
-
250
- // Todo?
251
- //gasMultiplier?: number;
252
- };
253
-
254
- /**
255
- * A **PreparedTransactionRequest** is identical to a [[TransactionRequest]]
256
- * except all the property types are strictly enforced.
257
- */
258
- export interface PreparedTransactionRequest {
259
- /**
260
- * The transaction type.
261
- */
262
- type?: number;
263
-
264
-
265
- /**
266
- * The target of the transaction.
267
- */
268
- to?: AddressLike;
269
-
270
- /**
271
- * The sender of the transaction.
272
- */
273
- from?: AddressLike;
274
-
275
- /**
276
- * The nonce of the transaction, used to prevent replay attacks.
277
- */
278
-
279
- nonce?: number;
280
-
281
- /**
282
- * The maximum amount of gas to allow this transaction to consume.
283
- */
284
- gasLimit?: bigint;
285
-
286
- /**
287
- * The gas price to use for legacy transactions or transactions on
288
- * legacy networks.
289
- *
290
- * Most of the time the ``max*FeePerGas`` is preferred.
291
- */
292
- gasPrice?: bigint;
293
-
294
- /**
295
- * The [[link-eip-1559]] maximum priority fee to pay per gas.
296
- */
297
- maxPriorityFeePerGas?: bigint;
298
-
299
- /**
300
- * The [[link-eip-1559]] maximum total fee to pay per gas. The actual
301
- * value used is protocol enforced to be the block's base fee.
302
- */
303
- maxFeePerGas?: bigint;
304
-
305
- /**
306
- * The transaction data.
307
- */
308
- data?: string;
309
-
310
-
311
- /**
312
- * The transaction value (in wei).
313
- */
314
- value?: bigint;
315
-
316
- /**
317
- * The chain ID for the network this transaction is valid on.
318
- */
319
- chainId?: bigint;
320
-
321
- /**
322
- * The [[link-eip-2930]] access list. Storage slots included in the access
323
- * list are //warmed// by pre-loading them, so their initial cost to
324
- * fetch is guaranteed, but then each additional access is cheaper.
325
- */
326
- accessList?: AccessList;
327
-
328
- /**
329
- * The [[link-eip-7702]] authorizations (if any).
330
- */
331
- authorizationList?: Array<Authorization>;
332
-
333
- /**
334
- * A custom object, which can be passed along for network-specific
335
- * values.
336
- */
337
- customData?: any;
338
-
339
-
340
-
341
- /**
342
- * When using ``call`` or ``estimateGas``, this allows a specific
343
- * block to be queried. Many backends do not support this and when
344
- * unsupported errors are silently squelched and ``"latest"`` is used.
345
- */
346
- blockTag?: BlockTag;
347
-
348
- /**
349
- * When using ``call``, this enables CCIP-read, which permits the
350
- * provider to be redirected to web-based content during execution,
351
- * which is then further validated by the contract.
352
- *
353
- * There are potential security implications allowing CCIP-read, as
354
- * it could be used to expose the IP address or user activity during
355
- * the fetch to unexpected parties.
356
- */
357
- enableCcipRead?: boolean;
358
- }
359
-
360
- /**
361
- * Returns a copy of %%req%% with all properties coerced to their strict
362
- * types.
363
- */
364
- export function copyRequest(req: TransactionRequest): PreparedTransactionRequest {
365
- const result: any = { };
366
-
367
- // These could be addresses, ENS names or Addressables
368
- if (req.to) { result.to = req.to; }
369
- if (req.from) { result.from = req.from; }
370
-
371
- if (req.data) { result.data = hexlify(req.data); }
372
-
373
- const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
374
- for (const key of bigIntKeys) {
375
- if (!(key in req) || (<any>req)[key] == null) { continue; }
376
- result[key] = getBigInt((<any>req)[key], `request.${ key }`);
377
- }
378
-
379
- const numberKeys = "type,nonce".split(/,/);
380
- for (const key of numberKeys) {
381
- if (!(key in req) || (<any>req)[key] == null) { continue; }
382
- result[key] = getNumber((<any>req)[key], `request.${ key }`);
383
- }
384
-
385
- if (req.accessList) {
386
- result.accessList = accessListify(req.accessList);
387
- }
388
-
389
- if (req.authorizationList) {
390
- result.authorizationList = req.authorizationList.slice();
391
- }
392
-
393
- if ("blockTag" in req) { result.blockTag = req.blockTag; }
394
-
395
- if ("enableCcipRead" in req) {
396
- result.enableCcipRead = !!req.enableCcipRead
397
- }
398
-
399
- if ("customData" in req) {
400
- result.customData = req.customData;
401
- }
402
-
403
- if ("blobVersionedHashes" in req && req.blobVersionedHashes) {
404
- result.blobVersionedHashes = req.blobVersionedHashes.slice();
405
- }
406
-
407
- if ("kzg" in req) { result.kzg = req.kzg; }
408
-
409
- if ("blobs" in req && req.blobs) {
410
- result.blobs = req.blobs.map((b) => {
411
- if (isBytesLike(b)) { return hexlify(b); }
412
- return Object.assign({ }, b);
413
- });
414
- }
415
-
416
- return result;
417
- }
418
-
419
- //////////////////////
420
- // Block
421
-
422
- /**
423
- * An Interface to indicate a [[Block]] has been included in the
424
- * blockchain. This asserts a Type Guard that necessary properties
425
- * are non-null.
426
- *
427
- * Before a block is included, it is a //pending// block.
428
- */
429
- export interface MinedBlock extends Block {
430
- /**
431
- * The block number also known as the block height.
432
- */
433
- readonly number: number;
434
-
435
- /**
436
- * The block hash.
437
- */
438
- readonly hash: string;
439
-
440
- /**
441
- * The block timestamp, in seconds from epoch.
442
- */
443
- readonly timestamp: number;
444
-
445
- /**
446
- * The block date, created from the [[timestamp]].
447
- */
448
- readonly date: Date;
449
-
450
- /**
451
- * The miner of the block, also known as the ``author`` or
452
- * block ``producer``.
453
- */
454
- readonly miner: string;
455
- }
456
-
457
- /**
458
- * A **Block** represents the data associated with a full block on
459
- * Ethereum.
460
- */
461
- export class Block implements BlockParams, Iterable<string> {
462
-
463
- /**
464
- * The provider connected to the block used to fetch additional details
465
- * if necessary.
466
- */
467
- readonly provider!: Provider;
468
-
469
- /**
470
- * The block number, sometimes called the block height. This is a
471
- * sequential number that is one higher than the parent block.
472
- */
473
- readonly number!: number;
474
-
475
- /**
476
- * The block hash.
477
- *
478
- * This hash includes all properties, so can be safely used to identify
479
- * an exact set of block properties.
480
- */
481
- readonly hash!: null | string;
482
-
483
- /**
484
- * The timestamp for this block, which is the number of seconds since
485
- * epoch that this block was included.
486
- */
487
- readonly timestamp!: number;
488
-
489
- /**
490
- * The block hash of the parent block.
491
- */
492
- readonly parentHash!: string;
493
-
494
- /**
495
- * The hash tree root of the parent beacon block for the given
496
- * execution block. See [[link-eip-4788]].
497
- */
498
- parentBeaconBlockRoot!: null | string;
499
-
500
- /**
501
- * The nonce.
502
- *
503
- * On legacy networks, this is the random number inserted which
504
- * permitted the difficulty target to be reached.
505
- */
506
- readonly nonce!: string;
507
-
508
- /**
509
- * The difficulty target.
510
- *
511
- * On legacy networks, this is the proof-of-work target required
512
- * for a block to meet the protocol rules to be included.
513
- *
514
- * On modern networks, this is a random number arrived at using
515
- * randao. @TODO: Find links?
516
- */
517
- readonly difficulty!: bigint;
518
-
519
-
520
- /**
521
- * The total gas limit for this block.
522
- */
523
- readonly gasLimit!: bigint;
524
-
525
- /**
526
- * The total gas used in this block.
527
- */
528
- readonly gasUsed!: bigint;
529
-
530
-
531
- /**
532
- * The root hash for the global state after applying changes
533
- * in this block.
534
- */
535
- readonly stateRoot!: null | string;
536
-
537
- /**
538
- * The hash of the transaction receipts trie.
539
- */
540
- readonly receiptsRoot!: null | string;
541
-
542
- /**
543
- * The total amount of blob gas consumed by the transactions
544
- * within the block. See [[link-eip-4844]].
545
- */
546
- readonly blobGasUsed!: null | bigint;
547
-
548
- /**
549
- * The running total of blob gas consumed in excess of the
550
- * target, prior to the block. See [[link-eip-4844]].
551
- */
552
- readonly excessBlobGas!: null | bigint;
553
-
554
- /**
555
- * The miner coinbase address, wihch receives any subsidies for
556
- * including this block.
557
- */
558
- readonly miner!: string;
559
-
560
- /**
561
- * The latest RANDAO mix of the post beacon state of
562
- * the previous block.
563
- */
564
- readonly prevRandao!: null | string;
565
-
566
- /**
567
- * Any extra data the validator wished to include.
568
- */
569
- readonly extraData!: string;
570
-
571
- /**
572
- * The base fee per gas that all transactions in this block were
573
- * charged.
574
- *
575
- * This adjusts after each block, depending on how congested the network
576
- * is.
577
- */
578
- readonly baseFeePerGas!: null | bigint;
579
-
580
- readonly #transactions: Array<string | TransactionResponse>;
581
-
582
- /**
583
- * Create a new **Block** object.
584
- *
585
- * This should generally not be necessary as the unless implementing a
586
- * low-level library.
587
- */
588
- constructor(block: BlockParams, provider: Provider) {
589
-
590
- this.#transactions = block.transactions.map((tx) => {
591
- if (typeof(tx) !== "string") {
592
- return new TransactionResponse(tx, provider);
593
- }
594
- return tx;
595
- });
596
-
597
- defineProperties<Block>(this, {
598
- provider,
599
-
600
- hash: getValue(block.hash),
601
-
602
- number: block.number,
603
- timestamp: block.timestamp,
604
-
605
- parentHash: block.parentHash,
606
- parentBeaconBlockRoot: block.parentBeaconBlockRoot,
607
-
608
- nonce: block.nonce,
609
- difficulty: block.difficulty,
610
-
611
- gasLimit: block.gasLimit,
612
- gasUsed: block.gasUsed,
613
- blobGasUsed: block.blobGasUsed,
614
- excessBlobGas: block.excessBlobGas,
615
- miner: block.miner,
616
- prevRandao: getValue(block.prevRandao),
617
- extraData: block.extraData,
618
-
619
- baseFeePerGas: getValue(block.baseFeePerGas),
620
-
621
- stateRoot: block.stateRoot,
622
- receiptsRoot: block.receiptsRoot,
623
- });
624
- }
625
-
626
- /**
627
- * Returns the list of transaction hashes, in the order
628
- * they were executed within the block.
629
- */
630
- get transactions(): ReadonlyArray<string> {
631
- return this.#transactions.map((tx) => {
632
- if (typeof(tx) === "string") { return tx; }
633
- return tx.hash;
634
- });
635
- }
636
-
637
- /**
638
- * Returns the complete transactions, in the order they
639
- * were executed within the block.
640
- *
641
- * This is only available for blocks which prefetched
642
- * transactions, by passing ``true`` to %%prefetchTxs%%
643
- * into [[Provider-getBlock]].
644
- */
645
- get prefetchedTransactions(): Array<TransactionResponse> {
646
- const txs = this.#transactions.slice();
647
-
648
- // Doesn't matter...
649
- if (txs.length === 0) { return [ ]; }
650
-
651
- // Make sure we prefetched the transactions
652
- assert(typeof(txs[0]) === "object", "transactions were not prefetched with block request", "UNSUPPORTED_OPERATION", {
653
- operation: "transactionResponses()"
654
- });
655
-
656
- return <Array<TransactionResponse>>txs;
657
- }
658
-
659
- /**
660
- * Returns a JSON-friendly value.
661
- */
662
- toJSON(): any {
663
- const {
664
- baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash,
665
- miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot,
666
- stateRoot, receiptsRoot, timestamp, transactions
667
- } = this;
668
-
669
- return {
670
- _type: "Block",
671
- baseFeePerGas: toJson(baseFeePerGas),
672
- difficulty: toJson(difficulty),
673
- extraData,
674
- gasLimit: toJson(gasLimit),
675
- gasUsed: toJson(gasUsed),
676
- blobGasUsed: toJson(this.blobGasUsed),
677
- excessBlobGas: toJson(this.excessBlobGas),
678
- hash, miner, prevRandao, nonce, number, parentHash, timestamp,
679
- parentBeaconBlockRoot, stateRoot, receiptsRoot,
680
- transactions,
681
- };
682
- }
683
-
684
- [Symbol.iterator](): Iterator<string> {
685
- let index = 0;
686
- const txs = this.transactions;
687
- return {
688
- next: () => {
689
- if (index < this.length) {
690
- return {
691
- value: txs[index++], done: false
692
- }
693
- }
694
- return { value: undefined, done: true };
695
- }
696
- };
697
- }
698
-
699
- /**
700
- * The number of transactions in this block.
701
- */
702
- get length(): number { return this.#transactions.length; }
703
-
704
- /**
705
- * The [[link-js-date]] this block was included at.
706
- */
707
- get date(): null | Date {
708
- if (this.timestamp == null) { return null; }
709
- return new Date(this.timestamp * 1000);
710
- }
711
-
712
- /**
713
- * Get the transaction at %%indexe%% within this block.
714
- */
715
- async getTransaction(indexOrHash: number | string): Promise<TransactionResponse> {
716
- // Find the internal value by its index or hash
717
- let tx: string | TransactionResponse | undefined = undefined;
718
- if (typeof(indexOrHash) === "number") {
719
- tx = this.#transactions[indexOrHash];
720
-
721
- } else {
722
- const hash = indexOrHash.toLowerCase();
723
- for (const v of this.#transactions) {
724
- if (typeof(v) === "string") {
725
- if (v !== hash) { continue; }
726
- tx = v;
727
- break;
728
- } else {
729
- if (v.hash !== hash) { continue; }
730
- tx = v;
731
- break;
732
- }
733
- }
734
- }
735
- if (tx == null) { throw new Error("no such tx"); }
736
-
737
- if (typeof(tx) === "string") {
738
- return <TransactionResponse>(await this.provider.getTransaction(tx));
739
- } else {
740
- return tx;
741
- }
742
- }
743
-
744
- /**
745
- * If a **Block** was fetched with a request to include the transactions
746
- * this will allow synchronous access to those transactions.
747
- *
748
- * If the transactions were not prefetched, this will throw.
749
- */
750
- getPrefetchedTransaction(indexOrHash: number | string): TransactionResponse {
751
- const txs = this.prefetchedTransactions;
752
- if (typeof(indexOrHash) === "number") {
753
- return txs[indexOrHash];
754
- }
755
-
756
- indexOrHash = indexOrHash.toLowerCase();
757
- for (const tx of txs) {
758
- if (tx.hash === indexOrHash) { return tx; }
759
- }
760
-
761
- assertArgument(false, "no matching transaction", "indexOrHash", indexOrHash);
762
- }
763
-
764
- /**
765
- * Returns true if this block been mined. This provides a type guard
766
- * for all properties on a [[MinedBlock]].
767
- */
768
- isMined(): this is MinedBlock { return !!this.hash; }
769
-
770
- /**
771
- * Returns true if this block is an [[link-eip-2930]] block.
772
- */
773
- isLondon(): this is (Block & { baseFeePerGas: bigint }) {
774
- return !!this.baseFeePerGas;
775
- }
776
-
777
- /**
778
- * @_ignore:
779
- */
780
- orphanedEvent(): OrphanFilter {
781
- if (!this.isMined()) { throw new Error(""); }
782
- return createOrphanedBlockFilter(this);
783
- }
784
- }
785
-
786
- //////////////////////
787
- // Log
788
-
789
- /**
790
- * A **Log** in Ethereum represents an event that has been included in a
791
- * transaction using the ``LOG*`` opcodes, which are most commonly used by
792
- * Solidity's emit for announcing events.
793
- */
794
- export class Log implements LogParams {
795
-
796
- /**
797
- * The provider connected to the log used to fetch additional details
798
- * if necessary.
799
- */
800
- readonly provider: Provider;
801
-
802
- /**
803
- * The transaction hash of the transaction this log occurred in. Use the
804
- * [[Log-getTransaction]] to get the [[TransactionResponse]].
805
- */
806
- readonly transactionHash!: string;
807
-
808
- /**
809
- * The block hash of the block this log occurred in. Use the
810
- * [[Log-getBlock]] to get the [[Block]].
811
- */
812
- readonly blockHash!: string;
813
-
814
- /**
815
- * The block number of the block this log occurred in. It is preferred
816
- * to use the [[Block-hash]] when fetching the related [[Block]],
817
- * since in the case of an orphaned block, the block at that height may
818
- * have changed.
819
- */
820
- readonly blockNumber!: number;
821
-
822
- /**
823
- * If the **Log** represents a block that was removed due to an orphaned
824
- * block, this will be true.
825
- *
826
- * This can only happen within an orphan event listener.
827
- */
828
- readonly removed!: boolean;
829
-
830
- /**
831
- * The address of the contract that emitted this log.
832
- */
833
- readonly address!: string;
834
-
835
- /**
836
- * The data included in this log when it was emitted.
837
- */
838
- readonly data!: string;
839
-
840
- /**
841
- * The indexed topics included in this log when it was emitted.
842
- *
843
- * All topics are included in the bloom filters, so they can be
844
- * efficiently filtered using the [[Provider-getLogs]] method.
845
- */
846
- readonly topics!: ReadonlyArray<string>;
847
-
848
- /**
849
- * The index within the block this log occurred at. This is generally
850
- * not useful to developers, but can be used with the various roots
851
- * to proof inclusion within a block.
852
- */
853
- readonly index!: number;
854
-
855
- /**
856
- * The index within the transaction of this log.
857
- */
858
- readonly transactionIndex!: number;
859
-
860
- /**
861
- * @_ignore:
862
- */
863
- constructor(log: LogParams, provider: Provider) {
864
- this.provider = provider;
865
-
866
- const topics = Object.freeze(log.topics.slice());
867
- defineProperties<Log>(this, {
868
- transactionHash: log.transactionHash,
869
- blockHash: log.blockHash,
870
- blockNumber: log.blockNumber,
871
-
872
- removed: log.removed,
873
-
874
- address: log.address,
875
- data: log.data,
876
-
877
- topics,
878
-
879
- index: log.index,
880
- transactionIndex: log.transactionIndex,
881
- });
882
- }
883
-
884
- /**
885
- * Returns a JSON-compatible object.
886
- */
887
- toJSON(): any {
888
- const {
889
- address, blockHash, blockNumber, data, index,
890
- removed, topics, transactionHash, transactionIndex
891
- } = this;
892
-
893
- return {
894
- _type: "log",
895
- address, blockHash, blockNumber, data, index,
896
- removed, topics, transactionHash, transactionIndex
897
- };
898
- }
899
-
900
- /**
901
- * Returns the block that this log occurred in.
902
- */
903
- async getBlock(): Promise<Block> {
904
- const block = await this.provider.getBlock(this.blockHash);
905
- assert(!!block, "failed to find transaction", "UNKNOWN_ERROR", { });
906
- return block;
907
- }
908
-
909
- /**
910
- * Returns the transaction that this log occurred in.
911
- */
912
- async getTransaction(): Promise<TransactionResponse> {
913
- const tx = await this.provider.getTransaction(this.transactionHash);
914
- assert(!!tx, "failed to find transaction", "UNKNOWN_ERROR", { });
915
- return tx;
916
- }
917
-
918
- /**
919
- * Returns the transaction receipt fot the transaction that this
920
- * log occurred in.
921
- */
922
- async getTransactionReceipt(): Promise<TransactionReceipt> {
923
- const receipt = await this.provider.getTransactionReceipt(this.transactionHash);
924
- assert(!!receipt, "failed to find transaction receipt", "UNKNOWN_ERROR", { });
925
- return receipt;
926
- }
927
-
928
- /**
929
- * @_ignore:
930
- */
931
- removedEvent(): OrphanFilter {
932
- return createRemovedLogFilter(this);
933
- }
934
- }
935
-
936
- //////////////////////
937
- // Transaction Receipt
938
-
939
- /*
940
- export interface LegacyTransactionReceipt {
941
- byzantium: false;
942
- status: null;
943
- root: string;
944
- }
945
-
946
- export interface ByzantiumTransactionReceipt {
947
- byzantium: true;
948
- status: number;
949
- root: null;
950
- }
951
- */
952
-
953
- /**
954
- * A **TransactionReceipt** includes additional information about a
955
- * transaction that is only available after it has been mined.
956
- */
957
- export class TransactionReceipt implements TransactionReceiptParams, Iterable<Log> {
958
- /**
959
- * The provider connected to the log used to fetch additional details
960
- * if necessary.
961
- */
962
- readonly provider!: Provider;
963
-
964
- /**
965
- * The address the transaction was sent to.
966
- */
967
- readonly to!: null | string;
968
-
969
- /**
970
- * The sender of the transaction.
971
- */
972
- readonly from!: string;
973
-
974
- /**
975
- * The address of the contract if the transaction was directly
976
- * responsible for deploying one.
977
- *
978
- * This is non-null **only** if the ``to`` is empty and the ``data``
979
- * was successfully executed as initcode.
980
- */
981
- readonly contractAddress!: null | string;
982
-
983
- /**
984
- * The transaction hash.
985
- */
986
- readonly hash!: string;
987
-
988
- /**
989
- * The index of this transaction within the block transactions.
990
- */
991
- readonly index!: number;
992
-
993
- /**
994
- * The block hash of the [[Block]] this transaction was included in.
995
- */
996
- readonly blockHash!: string;
997
-
998
- /**
999
- * The block number of the [[Block]] this transaction was included in.
1000
- */
1001
- readonly blockNumber!: number;
1002
-
1003
- /**
1004
- * The bloom filter bytes that represent all logs that occurred within
1005
- * this transaction. This is generally not useful for most developers,
1006
- * but can be used to validate the included logs.
1007
- */
1008
- readonly logsBloom!: string;
1009
-
1010
- /**
1011
- * The actual amount of gas used by this transaction.
1012
- *
1013
- * When creating a transaction, the amount of gas that will be used can
1014
- * only be approximated, but the sender must pay the gas fee for the
1015
- * entire gas limit. After the transaction, the difference is refunded.
1016
- */
1017
- readonly gasUsed!: bigint;
1018
-
1019
- /**
1020
- * The gas used for BLObs. See [[link-eip-4844]].
1021
- */
1022
- readonly blobGasUsed!: null | bigint;
1023
-
1024
- /**
1025
- * The amount of gas used by all transactions within the block for this
1026
- * and all transactions with a lower ``index``.
1027
- *
1028
- * This is generally not useful for developers but can be used to
1029
- * validate certain aspects of execution.
1030
- */
1031
- readonly cumulativeGasUsed!: bigint;
1032
-
1033
- /**
1034
- * The actual gas price used during execution.
1035
- *
1036
- * Due to the complexity of [[link-eip-1559]] this value can only
1037
- * be caluclated after the transaction has been mined, snce the base
1038
- * fee is protocol-enforced.
1039
- */
1040
- readonly gasPrice!: bigint;
1041
-
1042
- /**
1043
- * The price paid per BLOB in gas. See [[link-eip-4844]].
1044
- */
1045
- readonly blobGasPrice!: null | bigint;
1046
-
1047
- /**
1048
- * The [[link-eip-2718]] transaction type.
1049
- */
1050
- readonly type!: number;
1051
- //readonly byzantium!: boolean;
1052
-
1053
- /**
1054
- * The status of this transaction, indicating success (i.e. ``1``) or
1055
- * a revert (i.e. ``0``).
1056
- *
1057
- * This is available in post-byzantium blocks, but some backends may
1058
- * backfill this value.
1059
- */
1060
- readonly status!: null | number;
1061
-
1062
- /**
1063
- * The root hash of this transaction.
1064
- *
1065
- * This is no present and was only included in pre-byzantium blocks, but
1066
- * could be used to validate certain parts of the receipt.
1067
- */
1068
- readonly root!: null | string;
1069
-
1070
- readonly #logs: ReadonlyArray<Log>;
1071
-
1072
- /**
1073
- * @_ignore:
1074
- */
1075
- constructor(tx: TransactionReceiptParams, provider: Provider) {
1076
- this.#logs = Object.freeze(tx.logs.map((log) => {
1077
- return new Log(log, provider);
1078
- }));
1079
-
1080
- let gasPrice = BN_0;
1081
- if (tx.effectiveGasPrice != null) {
1082
- gasPrice = tx.effectiveGasPrice;
1083
- } else if (tx.gasPrice != null) {
1084
- gasPrice = tx.gasPrice;
1085
- }
1086
-
1087
- defineProperties<TransactionReceipt>(this, {
1088
- provider,
1089
-
1090
- to: tx.to,
1091
- from: tx.from,
1092
- contractAddress: tx.contractAddress,
1093
-
1094
- hash: tx.hash,
1095
- index: tx.index,
1096
-
1097
- blockHash: tx.blockHash,
1098
- blockNumber: tx.blockNumber,
1099
-
1100
- logsBloom: tx.logsBloom,
1101
-
1102
- gasUsed: tx.gasUsed,
1103
- cumulativeGasUsed: tx.cumulativeGasUsed,
1104
- blobGasUsed: tx.blobGasUsed,
1105
- gasPrice,
1106
- blobGasPrice: tx.blobGasPrice,
1107
-
1108
- type: tx.type,
1109
- //byzantium: tx.byzantium,
1110
- status: tx.status,
1111
- root: tx.root
1112
- });
1113
- }
1114
-
1115
- /**
1116
- * The logs for this transaction.
1117
- */
1118
- get logs(): ReadonlyArray<Log> { return this.#logs; }
1119
-
1120
- /**
1121
- * Returns a JSON-compatible representation.
1122
- */
1123
- toJSON(): any {
1124
- const {
1125
- to, from, contractAddress, hash, index,
1126
- blockHash, blockNumber, logsBloom,
1127
- logs, //byzantium,
1128
- status, root
1129
- } = this;
1130
-
1131
- return {
1132
- _type: "TransactionReceipt",
1133
- blockHash, blockNumber,
1134
- //byzantium,
1135
- contractAddress,
1136
- cumulativeGasUsed: toJson(this.cumulativeGasUsed),
1137
- from,
1138
- gasPrice: toJson(this.gasPrice),
1139
- blobGasUsed: toJson(this.blobGasUsed),
1140
- blobGasPrice: toJson(this.blobGasPrice),
1141
- gasUsed: toJson(this.gasUsed),
1142
- hash, index, logs, logsBloom, root, status, to
1143
- };
1144
- }
1145
-
1146
- /**
1147
- * @_ignore:
1148
- */
1149
- get length(): number { return this.logs.length; }
1150
-
1151
- [Symbol.iterator](): Iterator<Log> {
1152
- let index = 0;
1153
- return {
1154
- next: () => {
1155
- if (index < this.length) {
1156
- return { value: this.logs[index++], done: false }
1157
- }
1158
- return { value: undefined, done: true };
1159
- }
1160
- };
1161
- }
1162
-
1163
- /**
1164
- * The total fee for this transaction, in wei.
1165
- */
1166
- get fee(): bigint {
1167
- return this.gasUsed * this.gasPrice;
1168
- }
1169
-
1170
- /**
1171
- * Resolves to the block this transaction occurred in.
1172
- */
1173
- async getBlock(): Promise<Block> {
1174
- const block = await this.provider.getBlock(this.blockHash);
1175
- if (block == null) { throw new Error("TODO"); }
1176
- return block;
1177
- }
1178
-
1179
- /**
1180
- * Resolves to the transaction this transaction occurred in.
1181
- */
1182
- async getTransaction(): Promise<TransactionResponse> {
1183
- const tx = await this.provider.getTransaction(this.hash);
1184
- if (tx == null) { throw new Error("TODO"); }
1185
- return tx;
1186
- }
1187
-
1188
- /**
1189
- * Resolves to the return value of the execution of this transaction.
1190
- *
1191
- * Support for this feature is limited, as it requires an archive node
1192
- * with the ``debug_`` or ``trace_`` API enabled.
1193
- */
1194
- async getResult(): Promise<string> {
1195
- return <string>(await this.provider.getTransactionResult(this.hash));
1196
- }
1197
-
1198
- /**
1199
- * Resolves to the number of confirmations this transaction has.
1200
- */
1201
- async confirmations(): Promise<number> {
1202
- return (await this.provider.getBlockNumber()) - this.blockNumber + 1;
1203
- }
1204
-
1205
- /**
1206
- * @_ignore:
1207
- */
1208
- removedEvent(): OrphanFilter {
1209
- return createRemovedTransactionFilter(this);
1210
- }
1211
-
1212
- /**
1213
- * @_ignore:
1214
- */
1215
- reorderedEvent(other?: TransactionResponse): OrphanFilter {
1216
- assert(!other || other.isMined(), "unmined 'other' transction cannot be orphaned",
1217
- "UNSUPPORTED_OPERATION", { operation: "reorderedEvent(other)" });
1218
- return createReorderedTransactionFilter(this, other);
1219
- }
1220
- }
1221
-
1222
-
1223
- //////////////////////
1224
- // Transaction Response
1225
-
1226
- /**
1227
- * A **MinedTransactionResponse** is an interface representing a
1228
- * transaction which has been mined and allows for a type guard for its
1229
- * property values being defined.
1230
- */
1231
- export interface MinedTransactionResponse extends TransactionResponse {
1232
- /**
1233
- * The block number this transaction occurred in.
1234
- */
1235
- blockNumber: number;
1236
-
1237
- /**
1238
- * The block hash this transaction occurred in.
1239
- */
1240
- blockHash: string;
1241
-
1242
- /**
1243
- * The date this transaction occurred on.
1244
- */
1245
- date: Date;
1246
- }
1247
-
1248
-
1249
- /**
1250
- * A **TransactionResponse** includes all properties about a transaction
1251
- * that was sent to the network, which may or may not be included in a
1252
- * block.
1253
- *
1254
- * The [[TransactionResponse-isMined]] can be used to check if the
1255
- * transaction has been mined as well as type guard that the otherwise
1256
- * possibly ``null`` properties are defined.
1257
- */
1258
- export class TransactionResponse implements TransactionLike<string>, TransactionResponseParams {
1259
- /**
1260
- * The provider this is connected to, which will influence how its
1261
- * methods will resolve its async inspection methods.
1262
- */
1263
- readonly provider: Provider;
1264
-
1265
- /**
1266
- * The block number of the block that this transaction was included in.
1267
- *
1268
- * This is ``null`` for pending transactions.
1269
- */
1270
- readonly blockNumber: null | number;
1271
-
1272
- /**
1273
- * The blockHash of the block that this transaction was included in.
1274
- *
1275
- * This is ``null`` for pending transactions.
1276
- */
1277
- readonly blockHash: null | string;
1278
-
1279
- /**
1280
- * The index within the block that this transaction resides at.
1281
- */
1282
- readonly index!: number;
1283
-
1284
- /**
1285
- * The transaction hash.
1286
- */
1287
- readonly hash!: string;
1288
-
1289
- /**
1290
- * The [[link-eip-2718]] transaction envelope type. This is
1291
- * ``0`` for legacy transactions types.
1292
- */
1293
- readonly type!: number;
1294
-
1295
- /**
1296
- * The receiver of this transaction.
1297
- *
1298
- * If ``null``, then the transaction is an initcode transaction.
1299
- * This means the result of executing the [[data]] will be deployed
1300
- * as a new contract on chain (assuming it does not revert) and the
1301
- * address may be computed using [[getCreateAddress]].
1302
- */
1303
- readonly to!: null | string;
1304
-
1305
- /**
1306
- * The sender of this transaction. It is implicitly computed
1307
- * from the transaction pre-image hash (as the digest) and the
1308
- * [[signature]] using ecrecover.
1309
- */
1310
- readonly from!: string;
1311
-
1312
- /**
1313
- * The nonce, which is used to prevent replay attacks and offer
1314
- * a method to ensure transactions from a given sender are explicitly
1315
- * ordered.
1316
- *
1317
- * When sending a transaction, this must be equal to the number of
1318
- * transactions ever sent by [[from]].
1319
- */
1320
- readonly nonce!: number;
1321
-
1322
- /**
1323
- * The maximum units of gas this transaction can consume. If execution
1324
- * exceeds this, the entries transaction is reverted and the sender
1325
- * is charged for the full amount, despite not state changes being made.
1326
- */
1327
- readonly gasLimit!: bigint;
1328
-
1329
- /**
1330
- * The gas price can have various values, depending on the network.
1331
- *
1332
- * In modern networks, for transactions that are included this is
1333
- * the //effective gas price// (the fee per gas that was actually
1334
- * charged), while for transactions that have not been included yet
1335
- * is the [[maxFeePerGas]].
1336
- *
1337
- * For legacy transactions, or transactions on legacy networks, this
1338
- * is the fee that will be charged per unit of gas the transaction
1339
- * consumes.
1340
- */
1341
- readonly gasPrice!: bigint;
1342
-
1343
- /**
1344
- * The maximum priority fee (per unit of gas) to allow a
1345
- * validator to charge the sender. This is inclusive of the
1346
- * [[maxFeeFeePerGas]].
1347
- */
1348
- readonly maxPriorityFeePerGas!: null | bigint;
1349
-
1350
- /**
1351
- * The maximum fee (per unit of gas) to allow this transaction
1352
- * to charge the sender.
1353
- */
1354
- readonly maxFeePerGas!: null | bigint;
1355
-
1356
- /**
1357
- * The [[link-eip-4844]] max fee per BLOb gas.
1358
- */
1359
- readonly maxFeePerBlobGas!: null | bigint;
1360
-
1361
- /**
1362
- * The data.
1363
- */
1364
- readonly data!: string;
1365
-
1366
- /**
1367
- * The value, in wei. Use [[formatEther]] to format this value
1368
- * as ether.
1369
- */
1370
- readonly value!: bigint;
1371
-
1372
- /**
1373
- * The chain ID.
1374
- */
1375
- readonly chainId!: bigint;
1376
-
1377
- /**
1378
- * The signature.
1379
- */
1380
- readonly signature!: Signature;
1381
-
1382
- /**
1383
- * The [[link-eip-2930]] access list for transaction types that
1384
- * support it, otherwise ``null``.
1385
- */
1386
- readonly accessList!: null | AccessList;
1387
-
1388
- /**
1389
- * The [[link-eip-4844]] BLOb versioned hashes.
1390
- */
1391
- readonly blobVersionedHashes!: null | Array<string>;
1392
-
1393
- /**
1394
- * The [[link-eip-7702]] authorizations (if any).
1395
- */
1396
- readonly authorizationList!: null | Array<Authorization>;
1397
-
1398
- #startBlock: number;
1399
-
1400
- /**
1401
- * @_ignore:
1402
- */
1403
- constructor(tx: TransactionResponseParams, provider: Provider) {
1404
- this.provider = provider;
1405
-
1406
- this.blockNumber = (tx.blockNumber != null) ? tx.blockNumber: null;
1407
- this.blockHash = (tx.blockHash != null) ? tx.blockHash: null;
1408
-
1409
- this.hash = tx.hash;
1410
- this.index = tx.index;
1411
-
1412
- this.type = tx.type;
1413
-
1414
- this.from = tx.from;
1415
- this.to = tx.to || null;
1416
-
1417
- this.gasLimit = tx.gasLimit;
1418
- this.nonce = tx.nonce;
1419
- this.data = tx.data;
1420
- this.value = tx.value;
1421
-
1422
- this.gasPrice = tx.gasPrice;
1423
- this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas: null;
1424
- this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas: null;
1425
- this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas: null;
1426
-
1427
- this.chainId = tx.chainId;
1428
- this.signature = tx.signature;
1429
-
1430
- this.accessList = (tx.accessList != null) ? tx.accessList: null;
1431
- this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes: null;
1432
-
1433
- this.authorizationList = (tx.authorizationList != null) ? tx.authorizationList: null;
1434
-
1435
- this.#startBlock = -1;
1436
- }
1437
-
1438
- /**
1439
- * Returns a JSON-compatible representation of this transaction.
1440
- */
1441
- toJSON(): any {
1442
- const {
1443
- blockNumber, blockHash, index, hash, type, to, from, nonce,
1444
- data, signature, accessList, blobVersionedHashes
1445
- } = this;
1446
-
1447
- return {
1448
- _type: "TransactionResponse",
1449
- accessList, blockNumber, blockHash,
1450
- blobVersionedHashes,
1451
- chainId: toJson(this.chainId),
1452
- data, from,
1453
- gasLimit: toJson(this.gasLimit),
1454
- gasPrice: toJson(this.gasPrice),
1455
- hash,
1456
- maxFeePerGas: toJson(this.maxFeePerGas),
1457
- maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),
1458
- maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),
1459
- nonce, signature, to, index, type,
1460
- value: toJson(this.value),
1461
- };
1462
- }
1463
-
1464
- /**
1465
- * Resolves to the Block that this transaction was included in.
1466
- *
1467
- * This will return null if the transaction has not been included yet.
1468
- */
1469
- async getBlock(): Promise<null | Block> {
1470
- let blockNumber = this.blockNumber;
1471
- if (blockNumber == null) {
1472
- const tx = await this.getTransaction();
1473
- if (tx) { blockNumber = tx.blockNumber; }
1474
- }
1475
- if (blockNumber == null) { return null; }
1476
- const block = this.provider.getBlock(blockNumber);
1477
- if (block == null) { throw new Error("TODO"); }
1478
- return block;
1479
- }
1480
-
1481
- /**
1482
- * Resolves to this transaction being re-requested from the
1483
- * provider. This can be used if you have an unmined transaction
1484
- * and wish to get an up-to-date populated instance.
1485
- */
1486
- async getTransaction(): Promise<null | TransactionResponse> {
1487
- return this.provider.getTransaction(this.hash);
1488
- }
1489
-
1490
- /**
1491
- * Resolve to the number of confirmations this transaction has.
1492
- */
1493
- async confirmations(): Promise<number> {
1494
- if (this.blockNumber == null) {
1495
- const { tx, blockNumber } = await resolveProperties({
1496
- tx: this.getTransaction(),
1497
- blockNumber: this.provider.getBlockNumber()
1498
- });
1499
-
1500
- // Not mined yet...
1501
- if (tx == null || tx.blockNumber == null) { return 0; }
1502
-
1503
- return blockNumber - tx.blockNumber + 1;
1504
- }
1505
-
1506
- const blockNumber = await this.provider.getBlockNumber();
1507
- return blockNumber - this.blockNumber + 1;
1508
- }
1509
-
1510
- /**
1511
- * Resolves once this transaction has been mined and has
1512
- * %%confirms%% blocks including it (default: ``1``) with an
1513
- * optional %%timeout%%.
1514
- *
1515
- * This can resolve to ``null`` only if %%confirms%% is ``0``
1516
- * and the transaction has not been mined, otherwise this will
1517
- * wait until enough confirmations have completed.
1518
- */
1519
- async wait(_confirms?: number, _timeout?: number): Promise<null | TransactionReceipt> {
1520
- const confirms = (_confirms == null) ? 1: _confirms;
1521
- const timeout = (_timeout == null) ? 0: _timeout;
1522
-
1523
- let startBlock = this.#startBlock
1524
- let nextScan = -1;
1525
- let stopScanning = (startBlock === -1) ? true: false;
1526
- const checkReplacement = async () => {
1527
- // Get the current transaction count for this sender
1528
- if (stopScanning) { return null; }
1529
- const { blockNumber, nonce } = await resolveProperties({
1530
- blockNumber: this.provider.getBlockNumber(),
1531
- nonce: this.provider.getTransactionCount(this.from)
1532
- });
1533
-
1534
- // No transaction or our nonce has not been mined yet; but we
1535
- // can start scanning later when we do start
1536
- if (nonce < this.nonce) {
1537
- startBlock = blockNumber;
1538
- return;
1539
- }
1540
-
1541
- // We were mined; no replacement
1542
- if (stopScanning) { return null; }
1543
- const mined = await this.getTransaction();
1544
- if (mined && mined.blockNumber != null) { return; }
1545
-
1546
- // We were replaced; start scanning for that transaction
1547
-
1548
- // Starting to scan; look back a few extra blocks for safety
1549
- if (nextScan === -1) {
1550
- nextScan = startBlock - 3;
1551
- if (nextScan < this.#startBlock) { nextScan = this.#startBlock; }
1552
- }
1553
-
1554
- while (nextScan <= blockNumber) {
1555
- // Get the next block to scan
1556
- if (stopScanning) { return null; }
1557
- const block = await this.provider.getBlock(nextScan, true);
1558
-
1559
- // This should not happen; but we'll try again shortly
1560
- if (block == null) { return; }
1561
-
1562
- // We were mined; no replacement
1563
- for (const hash of block) {
1564
- if (hash === this.hash) { return; }
1565
- }
1566
-
1567
- // Search for the transaction that replaced us
1568
- for (let i = 0; i < block.length; i++) {
1569
- const tx: TransactionResponse = await block.getTransaction(i);
1570
-
1571
- if (tx.from === this.from && tx.nonce === this.nonce) {
1572
- // Get the receipt
1573
- if (stopScanning) { return null; }
1574
- const receipt = await this.provider.getTransactionReceipt(tx.hash);
1575
-
1576
- // This should not happen; but we'll try again shortly
1577
- if (receipt == null) { return; }
1578
-
1579
- // We will retry this on the next block (this case could be optimized)
1580
- if ((blockNumber - receipt.blockNumber + 1) < confirms) { return; }
1581
-
1582
- // The reason we were replaced
1583
- let reason: "replaced" | "repriced" | "cancelled" = "replaced";
1584
- if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {
1585
- reason = "repriced";
1586
- } else if (tx.data === "0x" && tx.from === tx.to && tx.value === BN_0) {
1587
- reason = "cancelled"
1588
- }
1589
-
1590
- assert(false, "transaction was replaced", "TRANSACTION_REPLACED", {
1591
- cancelled: (reason === "replaced" || reason === "cancelled"),
1592
- reason,
1593
- replacement: tx.replaceableTransaction(startBlock),
1594
- hash: tx.hash,
1595
- receipt
1596
- });
1597
- }
1598
- }
1599
-
1600
- nextScan++;
1601
- }
1602
- return;
1603
- };
1604
-
1605
- const checkReceipt = (receipt: null | TransactionReceipt) => {
1606
- if (receipt == null || receipt.status !== 0) { return receipt; }
1607
- assert(false, "transaction execution reverted", "CALL_EXCEPTION", {
1608
- action: "sendTransaction",
1609
- data: null, reason: null, invocation: null, revert: null,
1610
- transaction: {
1611
- to: receipt.to,
1612
- from: receipt.from,
1613
- data: "" // @TODO: in v7, split out sendTransaction properties
1614
- }, receipt
1615
- });
1616
- };
1617
-
1618
- const receipt = await this.provider.getTransactionReceipt(this.hash);
1619
-
1620
- if (confirms === 0) { return checkReceipt(receipt); }
1621
-
1622
- if (receipt) {
1623
- if ((await receipt.confirmations()) >= confirms) {
1624
- return checkReceipt(receipt);
1625
- }
1626
-
1627
- } else {
1628
- // Check for a replacement; throws if a replacement was found
1629
- await checkReplacement();
1630
-
1631
- // Allow null only when the confirms is 0
1632
- if (confirms === 0) { return null; }
1633
- }
1634
-
1635
- const waiter = new Promise((resolve, reject) => {
1636
- // List of things to cancel when we have a result (one way or the other)
1637
- const cancellers: Array<() => void> = [ ];
1638
- const cancel = () => { cancellers.forEach((c) => c()); };
1639
-
1640
- // On cancel, stop scanning for replacements
1641
- cancellers.push(() => { stopScanning = true; });
1642
-
1643
- // Set up any timeout requested
1644
- if (timeout > 0) {
1645
- const timer = setTimeout(() => {
1646
- cancel();
1647
- reject(makeError("wait for transaction timeout", "TIMEOUT"));
1648
- }, timeout);
1649
- cancellers.push(() => { clearTimeout(timer); });
1650
- }
1651
-
1652
- const txListener = async (receipt: TransactionReceipt) => {
1653
- // Done; return it!
1654
- if ((await receipt.confirmations()) >= confirms) {
1655
- cancel();
1656
- try {
1657
- resolve(checkReceipt(receipt));
1658
- } catch (error) { reject(error); }
1659
- }
1660
- };
1661
- cancellers.push(() => { this.provider.off(this.hash, txListener); });
1662
- this.provider.on(this.hash, txListener);
1663
- // We support replacement detection; start checking
1664
- if (startBlock >= 0) {
1665
- const replaceListener = async () => {
1666
- try {
1667
- // Check for a replacement; this throws only if one is found
1668
- await checkReplacement();
1669
-
1670
- } catch (error) {
1671
- // We were replaced (with enough confirms); re-throw the error
1672
- if (isError(error, "TRANSACTION_REPLACED")) {
1673
- cancel();
1674
- reject(error);
1675
- return;
1676
- }
1677
- }
1678
-
1679
- // Rescheudle a check on the next block
1680
- if (!stopScanning) {
1681
- this.provider.once("block", replaceListener);
1682
- }
1683
- };
1684
- cancellers.push(() => { this.provider.off("block", replaceListener); });
1685
- this.provider.once("block", replaceListener);
1686
- }
1687
- });
1688
-
1689
- return await <Promise<TransactionReceipt>>waiter;
1690
- }
1691
-
1692
- /**
1693
- * Returns ``true`` if this transaction has been included.
1694
- *
1695
- * This is effective only as of the time the TransactionResponse
1696
- * was instantiated. To get up-to-date information, use
1697
- * [[getTransaction]].
1698
- *
1699
- * This provides a Type Guard that this transaction will have
1700
- * non-null property values for properties that are null for
1701
- * unmined transactions.
1702
- */
1703
- isMined(): this is MinedTransactionResponse {
1704
- return (this.blockHash != null);
1705
- }
1706
-
1707
- /**
1708
- * Returns true if the transaction is a legacy (i.e. ``type == 0``)
1709
- * transaction.
1710
- *
1711
- * This provides a Type Guard that this transaction will have
1712
- * the ``null``-ness for hardfork-specific properties set correctly.
1713
- */
1714
- isLegacy(): this is (TransactionResponse & { accessList: null, maxFeePerGas: null, maxPriorityFeePerGas: null }) {
1715
- return (this.type === 0)
1716
- }
1717
-
1718
- /**
1719
- * Returns true if the transaction is a Berlin (i.e. ``type == 1``)
1720
- * transaction. See [[link-eip-2070]].
1721
- *
1722
- * This provides a Type Guard that this transaction will have
1723
- * the ``null``-ness for hardfork-specific properties set correctly.
1724
- */
1725
- isBerlin(): this is (TransactionResponse & { accessList: AccessList, maxFeePerGas: null, maxPriorityFeePerGas: null }) {
1726
- return (this.type === 1);
1727
- }
1728
-
1729
- /**
1730
- * Returns true if the transaction is a London (i.e. ``type == 2``)
1731
- * transaction. See [[link-eip-1559]].
1732
- *
1733
- * This provides a Type Guard that this transaction will have
1734
- * the ``null``-ness for hardfork-specific properties set correctly.
1735
- */
1736
- isLondon(): this is (TransactionResponse & { accessList: AccessList, maxFeePerGas: bigint, maxPriorityFeePerGas: bigint }){
1737
- return (this.type === 2);
1738
- }
1739
-
1740
- /**
1741
- * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
1742
- * transaction. See [[link-eip-4844]].
1743
- */
1744
- isCancun(): this is (TransactionResponse & { accessList: AccessList, maxFeePerGas: bigint, maxPriorityFeePerGas: bigint, maxFeePerBlobGas: bigint, blobVersionedHashes: Array<string> }){
1745
- return (this.type === 3);
1746
- }
1747
-
1748
- /**
1749
- * Returns a filter which can be used to listen for orphan events
1750
- * that evict this transaction.
1751
- */
1752
- removedEvent(): OrphanFilter {
1753
- assert(this.isMined(), "unmined transaction canot be orphaned",
1754
- "UNSUPPORTED_OPERATION", { operation: "removeEvent()" });
1755
- return createRemovedTransactionFilter(this);
1756
- }
1757
-
1758
- /**
1759
- * Returns a filter which can be used to listen for orphan events
1760
- * that re-order this event against %%other%%.
1761
- */
1762
- reorderedEvent(other?: TransactionResponse): OrphanFilter {
1763
- assert(this.isMined(), "unmined transaction canot be orphaned",
1764
- "UNSUPPORTED_OPERATION", { operation: "removeEvent()" });
1765
-
1766
- assert(!other || other.isMined(), "unmined 'other' transaction canot be orphaned",
1767
- "UNSUPPORTED_OPERATION", { operation: "removeEvent()" });
1768
-
1769
- return createReorderedTransactionFilter(this, other);
1770
- }
1771
-
1772
- /**
1773
- * Returns a new TransactionResponse instance which has the ability to
1774
- * detect (and throw an error) if the transaction is replaced, which
1775
- * will begin scanning at %%startBlock%%.
1776
- *
1777
- * This should generally not be used by developers and is intended
1778
- * primarily for internal use. Setting an incorrect %%startBlock%% can
1779
- * have devastating performance consequences if used incorrectly.
1780
- */
1781
- replaceableTransaction(startBlock: number): TransactionResponse {
1782
- assertArgument(Number.isInteger(startBlock) && startBlock >= 0, "invalid startBlock", "startBlock", startBlock);
1783
- const tx = new TransactionResponse(this, this.provider);
1784
- tx.#startBlock = startBlock;
1785
- return tx;
1786
- }
1787
- }
1788
-
1789
-
1790
- //////////////////////
1791
- // OrphanFilter
1792
-
1793
- /**
1794
- * An Orphan Filter allows detecting when an orphan block has
1795
- * resulted in dropping a block or transaction or has resulted
1796
- * in transactions changing order.
1797
- *
1798
- * Not currently fully supported.
1799
- */
1800
- export type OrphanFilter = {
1801
- orphan: "drop-block",
1802
- hash: string,
1803
- number: number
1804
- } | {
1805
- orphan: "drop-transaction",
1806
- tx: { hash: string, blockHash: string, blockNumber: number },
1807
- other?: { hash: string, blockHash: string, blockNumber: number }
1808
- } | {
1809
- orphan: "reorder-transaction",
1810
- tx: { hash: string, blockHash: string, blockNumber: number },
1811
- other?: { hash: string, blockHash: string, blockNumber: number }
1812
- } | {
1813
- orphan: "drop-log",
1814
- log: {
1815
- transactionHash: string,
1816
- blockHash: string,
1817
- blockNumber: number,
1818
- address: string,
1819
- data: string,
1820
- topics: ReadonlyArray<string>,
1821
- index: number
1822
- }
1823
- };
1824
-
1825
- function createOrphanedBlockFilter(block: { hash: string, number: number }): OrphanFilter {
1826
- return { orphan: "drop-block", hash: block.hash, number: block.number };
1827
- }
1828
-
1829
- function createReorderedTransactionFilter(tx: { hash: string, blockHash: string, blockNumber: number }, other?: { hash: string, blockHash: string, blockNumber: number }): OrphanFilter {
1830
- return { orphan: "reorder-transaction", tx, other };
1831
- }
1832
-
1833
- function createRemovedTransactionFilter(tx: { hash: string, blockHash: string, blockNumber: number }): OrphanFilter {
1834
- return { orphan: "drop-transaction", tx };
1835
- }
1836
-
1837
- function createRemovedLogFilter(log: { blockHash: string, transactionHash: string, blockNumber: number, address: string, data: string, topics: ReadonlyArray<string>, index: number }): OrphanFilter {
1838
- return { orphan: "drop-log", log: {
1839
- transactionHash: log.transactionHash,
1840
- blockHash: log.blockHash,
1841
- blockNumber: log.blockNumber,
1842
- address: log.address,
1843
- data: log.data,
1844
- topics: Object.freeze(log.topics.slice()),
1845
- index: log.index
1846
- } };
1847
- }
1848
-
1849
- //////////////////////
1850
- // EventFilter
1851
-
1852
- /**
1853
- * A **TopicFilter** provides a struture to define bloom-filter
1854
- * queries.
1855
- *
1856
- * Each field that is ``null`` matches **any** value, a field that is
1857
- * a ``string`` must match exactly that value and ``array`` is
1858
- * effectively an ``OR``-ed set, where any one of those values must
1859
- * match.
1860
- */
1861
- export type TopicFilter = Array<null | string | Array<string>>;
1862
-
1863
- // @TODO:
1864
- //export type DeferableTopicFilter = Array<null | string | Promise<string> | Array<string | Promise<string>>>;
1865
-
1866
- /**
1867
- * An **EventFilter** allows efficiently filtering logs (also known as
1868
- * events) using bloom filters included within blocks.
1869
- */
1870
- export interface EventFilter {
1871
- address?: AddressLike | Array<AddressLike>;
1872
- topics?: TopicFilter;
1873
- }
1874
-
1875
- /**
1876
- * A **Filter** allows searching a specific range of blocks for mathcing
1877
- * logs.
1878
- */
1879
- export interface Filter extends EventFilter {
1880
-
1881
- /**
1882
- * The start block for the filter (inclusive).
1883
- */
1884
- fromBlock?: BlockTag;
1885
-
1886
- /**
1887
- * The end block for the filter (inclusive).
1888
- */
1889
- toBlock?: BlockTag;
1890
- }
1891
-
1892
- /**
1893
- * A **FilterByBlockHash** allows searching a specific block for mathcing
1894
- * logs.
1895
- */
1896
- export interface FilterByBlockHash extends EventFilter {
1897
- /**
1898
- * The blockhash of the specific block for the filter.
1899
- */
1900
- blockHash?: string;
1901
- }
1902
-
1903
-
1904
- //////////////////////
1905
- // ProviderEvent
1906
-
1907
- /**
1908
- * A **ProviderEvent** provides the types of events that can be subscribed
1909
- * to on a [[Provider]].
1910
- *
1911
- * Each provider may include additional possible events it supports, but
1912
- * the most commonly supported are:
1913
- *
1914
- * **``"block"``** - calls the listener with the current block number on each
1915
- * new block.
1916
- *
1917
- * **``"error"``** - calls the listener on each async error that occurs during
1918
- * the event loop, with the error.
1919
- *
1920
- * **``"debug"``** - calls the listener on debug events, which can be used to
1921
- * troubleshoot network errors, provider problems, etc.
1922
- *
1923
- * **``transaction hash``** - calls the listener on each block after the
1924
- * transaction has been mined; generally ``.once`` is more appropriate for
1925
- * this event.
1926
- *
1927
- * **``Array``** - calls the listener on each log that matches the filter.
1928
- *
1929
- * [[EventFilter]] - calls the listener with each matching log
1930
- */
1931
- export type ProviderEvent = string | Array<string | Array<string>> | EventFilter | OrphanFilter;
1932
-
1933
-
1934
- //////////////////////
1935
- // Provider
1936
-
1937
- /**
1938
- * A **Provider** is the primary method to interact with the read-only
1939
- * content on Ethereum.
1940
- *
1941
- * It allows access to details about accounts, blocks and transactions
1942
- * and the ability to query event logs and simulate contract execution.
1943
- *
1944
- * Account data includes the [balance](getBalance),
1945
- * [transaction count](getTransactionCount), [code](getCode) and
1946
- * [state trie storage](getStorage).
1947
- *
1948
- * Simulating execution can be used to [call](call),
1949
- * [estimate gas](estimateGas) and
1950
- * [get transaction results](getTransactionResult).
1951
- *
1952
- * The [[broadcastTransaction]] is the only method which allows updating
1953
- * the blockchain, but it is usually accessed by a [[Signer]], since a
1954
- * private key must be used to sign the transaction before it can be
1955
- * broadcast.
1956
- */
1957
- export interface Provider extends ContractRunner, EventEmitterable<ProviderEvent>, NameResolver {
1958
-
1959
- /**
1960
- * The provider iteself.
1961
- *
1962
- * This is part of the necessary API for executing a contract, as
1963
- * it provides a common property on any [[ContractRunner]] that
1964
- * can be used to access the read-only portion of the runner.
1965
- */
1966
- provider: this;
1967
-
1968
- /**
1969
- * Shutdown any resources this provider is using. No additional
1970
- * calls should be made to this provider after calling this.
1971
- */
1972
- destroy(): void;
1973
-
1974
- ////////////////////
1975
- // State
1976
-
1977
- /**
1978
- * Get the current block number.
1979
- */
1980
- getBlockNumber(): Promise<number>;
1981
-
1982
- /**
1983
- * Get the connected [[Network]].
1984
- */
1985
- getNetwork(): Promise<Network>;
1986
-
1987
- /**
1988
- * Get the best guess at the recommended [[FeeData]].
1989
- */
1990
- getFeeData(): Promise<FeeData>;
1991
-
1992
-
1993
- ////////////////////
1994
- // Account
1995
-
1996
- /**
1997
- * Get the account balance (in wei) of %%address%%. If %%blockTag%%
1998
- * is specified and the node supports archive access for that
1999
- * %%blockTag%%, the balance is as of that [[BlockTag]].
2000
- *
2001
- * @note On nodes without archive access enabled, the %%blockTag%% may be
2002
- * **silently ignored** by the node, which may cause issues if relied on.
2003
- */
2004
- getBalance(address: AddressLike, blockTag?: BlockTag): Promise<bigint>;
2005
-
2006
- /**
2007
- * Get the number of transactions ever sent for %%address%%, which
2008
- * is used as the ``nonce`` when sending a transaction. If
2009
- * %%blockTag%% is specified and the node supports archive access
2010
- * for that %%blockTag%%, the transaction count is as of that
2011
- * [[BlockTag]].
2012
- *
2013
- * @note On nodes without archive access enabled, the %%blockTag%% may be
2014
- * **silently ignored** by the node, which may cause issues if relied on.
2015
- */
2016
- getTransactionCount(address: AddressLike, blockTag?: BlockTag): Promise<number>;
2017
-
2018
- /**
2019
- * Get the bytecode for %%address%%.
2020
- *
2021
- * @note On nodes without archive access enabled, the %%blockTag%% may be
2022
- * **silently ignored** by the node, which may cause issues if relied on.
2023
- */
2024
- getCode(address: AddressLike, blockTag?: BlockTag): Promise<string>
2025
-
2026
- /**
2027
- * Get the storage slot value for %%address%% at slot %%position%%.
2028
- *
2029
- * @note On nodes without archive access enabled, the %%blockTag%% may be
2030
- * **silently ignored** by the node, which may cause issues if relied on.
2031
- */
2032
- getStorage(address: AddressLike, position: BigNumberish, blockTag?: BlockTag): Promise<string>
2033
-
2034
-
2035
- ////////////////////
2036
- // Execution
2037
-
2038
- /**
2039
- * Estimates the amount of gas required to execute %%tx%%.
2040
- */
2041
- estimateGas(tx: TransactionRequest): Promise<bigint>;
2042
-
2043
- /**
2044
- * Simulate the execution of %%tx%%. If the call reverts, it will
2045
- * throw a [[CallExceptionError]] which includes the revert data.
2046
- */
2047
- call(tx: TransactionRequest): Promise<string>
2048
-
2049
- /**
2050
- * Broadcasts the %%signedTx%% to the network, adding it to the
2051
- * memory pool of any node for which the transaction meets the
2052
- * rebroadcast requirements.
2053
- */
2054
- broadcastTransaction(signedTx: string): Promise<TransactionResponse>;
2055
-
2056
-
2057
- ////////////////////
2058
- // Queries
2059
-
2060
- /**
2061
- * Resolves to the block for %%blockHashOrBlockTag%%.
2062
- *
2063
- * If %%prefetchTxs%%, and the backend supports including transactions
2064
- * with block requests, all transactions will be included and the
2065
- * [[Block]] object will not need to make remote calls for getting
2066
- * transactions.
2067
- */
2068
- getBlock(blockHashOrBlockTag: BlockTag | string, prefetchTxs?: boolean): Promise<null | Block>;
2069
-
2070
- /**
2071
- * Resolves to the transaction for %%hash%%.
2072
- *
2073
- * If the transaction is unknown or on pruning nodes which
2074
- * discard old transactions this resolves to ``null``.
2075
- */
2076
- getTransaction(hash: string): Promise<null | TransactionResponse>;
2077
-
2078
- /**
2079
- * Resolves to the transaction receipt for %%hash%%, if mined.
2080
- *
2081
- * If the transaction has not been mined, is unknown or on
2082
- * pruning nodes which discard old transactions this resolves to
2083
- * ``null``.
2084
- */
2085
- getTransactionReceipt(hash: string): Promise<null | TransactionReceipt>;
2086
-
2087
- /**
2088
- * Resolves to the result returned by the executions of %%hash%%.
2089
- *
2090
- * This is only supported on nodes with archive access and with
2091
- * the necessary debug APIs enabled.
2092
- */
2093
- getTransactionResult(hash: string): Promise<null | string>;
2094
-
2095
-
2096
- ////////////////////
2097
- // Bloom-filter Queries
2098
-
2099
- /**
2100
- * Resolves to the list of Logs that match %%filter%%
2101
- */
2102
- getLogs(filter: Filter | FilterByBlockHash): Promise<Array<Log>>;
2103
-
2104
-
2105
- ////////////////////
2106
- // ENS
2107
-
2108
- /**
2109
- * Resolves to the address configured for the %%ensName%% or
2110
- * ``null`` if unconfigured.
2111
- */
2112
- resolveName(ensName: string): Promise<null | string>;
2113
-
2114
- /**
2115
- * Resolves to the ENS name associated for the %%address%% or
2116
- * ``null`` if the //primary name// is not configured.
2117
- *
2118
- * Users must perform additional steps to configure a //primary name//,
2119
- * which is not currently common.
2120
- */
2121
- lookupAddress(address: string): Promise<null | string>;
2122
-
2123
- /**
2124
- * Waits until the transaction %%hash%% is mined and has %%confirms%%
2125
- * confirmations.
2126
- */
2127
- waitForTransaction(hash: string, confirms?: number, timeout?: number): Promise<null | TransactionReceipt>;
2128
-
2129
- /**
2130
- * Resolves to the block at %%blockTag%% once it has been mined.
2131
- *
2132
- * This can be useful for waiting some number of blocks by using
2133
- * the ``currentBlockNumber + N``.
2134
- */
2135
- waitForBlock(blockTag?: BlockTag): Promise<Block>;
2136
- }