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,1349 +0,0 @@
1
-
2
- import { getAddress } from "../address/index.js";
3
- import { ZeroAddress } from "../constants/addresses.js";
4
- import {
5
- keccak256, sha256, Signature, SigningKey
6
- } from "../crypto/index.js";
7
- import {
8
- concat, decodeRlp, encodeRlp, getBytes, getBigInt, getNumber, hexlify,
9
- assert, assertArgument, isBytesLike, isHexString, toBeArray, zeroPadValue
10
- } from "../utils/index.js";
11
-
12
- import { accessListify } from "./accesslist.js";
13
- import { authorizationify } from "./authorization.js";
14
- import { recoverAddress } from "./address.js";
15
-
16
- import type { BigNumberish, BytesLike } from "../utils/index.js";
17
- import type { SignatureLike } from "../crypto/index.js";
18
-
19
- import type {
20
- AccessList, AccessListish, Authorization, AuthorizationLike
21
- } from "./index.js";
22
-
23
-
24
- const BN_0 = BigInt(0);
25
- const BN_2 = BigInt(2);
26
- const BN_27 = BigInt(27)
27
- const BN_28 = BigInt(28)
28
- const BN_35 = BigInt(35);
29
- const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
30
-
31
- const BLOB_SIZE = 4096 * 32;
32
-
33
- // The BLS Modulo; each field within a BLOb must be less than this
34
- //const BLOB_BLS_MODULO = BigInt("0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001");
35
-
36
- /**
37
- * A **TransactionLike** is an object which is appropriate as a loose
38
- * input for many operations which will populate missing properties of
39
- * a transaction.
40
- */
41
- export interface TransactionLike<A = string> {
42
- /**
43
- * The type.
44
- */
45
- type?: null | number;
46
-
47
- /**
48
- * The recipient address or ``null`` for an ``init`` transaction.
49
- */
50
- to?: null | A;
51
-
52
- /**
53
- * The sender.
54
- */
55
- from?: null | A;
56
-
57
- /**
58
- * The nonce.
59
- */
60
- nonce?: null | number;
61
-
62
- /**
63
- * The maximum amount of gas that can be used.
64
- */
65
- gasLimit?: null | BigNumberish;
66
-
67
- /**
68
- * The gas price for legacy and berlin transactions.
69
- */
70
- gasPrice?: null | BigNumberish;
71
-
72
- /**
73
- * The maximum priority fee per gas for london transactions.
74
- */
75
- maxPriorityFeePerGas?: null | BigNumberish;
76
-
77
- /**
78
- * The maximum total fee per gas for london transactions.
79
- */
80
- maxFeePerGas?: null | BigNumberish;
81
-
82
- /**
83
- * The data.
84
- */
85
- data?: null | string;
86
-
87
- /**
88
- * The value (in wei) to send.
89
- */
90
- value?: null | BigNumberish;
91
-
92
- /**
93
- * The chain ID the transaction is valid on.
94
- */
95
- chainId?: null | BigNumberish;
96
-
97
- /**
98
- * The transaction hash.
99
- */
100
- hash?: null | string;
101
-
102
- /**
103
- * The signature provided by the sender.
104
- */
105
- signature?: null | SignatureLike;
106
-
107
- /**
108
- * The access list for berlin and london transactions.
109
- */
110
- accessList?: null | AccessListish;
111
-
112
- /**
113
- * The maximum fee per blob gas (see [[link-eip-4844]]).
114
- */
115
- maxFeePerBlobGas?: null | BigNumberish;
116
-
117
- /**
118
- * The versioned hashes (see [[link-eip-4844]]).
119
- */
120
- blobVersionedHashes?: null | Array<string>;
121
-
122
- /**
123
- * The blobs (if any) attached to this transaction (see [[link-eip-4844]]).
124
- */
125
- blobs?: null | Array<BlobLike>
126
-
127
- /**
128
- * An external library for computing the KZG commitments and
129
- * proofs necessary for EIP-4844 transactions (see [[link-eip-4844]]).
130
- *
131
- * This is generally ``null``, unless you are creating BLOb
132
- * transactions.
133
- */
134
- kzg?: null | KzgLibraryLike;
135
-
136
- /**
137
- * The [[link-eip-7702]] authorizations (if any).
138
- */
139
- authorizationList?: null | Array<Authorization>;
140
- }
141
-
142
- /**
143
- * A full-valid BLOb object for [[link-eip-4844]] transactions.
144
- *
145
- * The commitment and proof should have been computed using a
146
- * KZG library.
147
- */
148
- export interface Blob {
149
- data: string;
150
- proof: string;
151
- commitment: string;
152
- }
153
-
154
- /**
155
- * A BLOb object that can be passed for [[link-eip-4844]]
156
- * transactions.
157
- *
158
- * It may have had its commitment and proof already provided
159
- * or rely on an attached [[KzgLibrary]] to compute them.
160
- */
161
- export type BlobLike = BytesLike | {
162
- data: BytesLike;
163
- proof: BytesLike;
164
- commitment: BytesLike;
165
- };
166
-
167
- /**
168
- * A KZG Library with the necessary functions to compute
169
- * BLOb commitments and proofs.
170
- */
171
- export interface KzgLibrary {
172
- blobToKzgCommitment: (blob: Uint8Array) => Uint8Array;
173
- computeBlobKzgProof: (blob: Uint8Array, commitment: Uint8Array) => Uint8Array;
174
- }
175
-
176
- /**
177
- * A KZG Library with any of the various API configurations.
178
- * As the library is still experimental and the API is not
179
- * stable, depending on the version used the method names and
180
- * signatures are still in flux.
181
- *
182
- * This allows any of the versions to be passed into Transaction
183
- * while providing a stable external API.
184
- */
185
- export type KzgLibraryLike = KzgLibrary | {
186
- // kzg-wasm >= 0.5.0
187
- blobToKZGCommitment: (blob: string) => string;
188
- computeBlobKZGProof: (blob: string, commitment: string) => string;
189
- } | {
190
- // micro-ecc-signer
191
- blobToKzgCommitment: (blob: string) => string | Uint8Array;
192
- computeBlobProof: (blob: string, commitment: string) => string | Uint8Array;
193
- };
194
-
195
- function getKzgLibrary(kzg: KzgLibraryLike): KzgLibrary {
196
-
197
- const blobToKzgCommitment = (blob: Uint8Array) => {
198
-
199
- if ("computeBlobProof" in kzg) {
200
- // micro-ecc-signer; check for computeBlobProof since this API
201
- // expects a string while the kzg-wasm below expects a Unit8Array
202
-
203
- if ("blobToKzgCommitment" in kzg && typeof(kzg.blobToKzgCommitment) === "function") {
204
- return getBytes(kzg.blobToKzgCommitment(hexlify(blob)))
205
- }
206
-
207
- } else if ("blobToKzgCommitment" in kzg && typeof(kzg.blobToKzgCommitment) === "function") {
208
- // kzg-wasm <0.5.0; blobToKzgCommitment(Uint8Array) => Uint8Array
209
-
210
- return getBytes(kzg.blobToKzgCommitment(blob));
211
- }
212
-
213
- // kzg-wasm >= 0.5.0; blobToKZGCommitment(string) => string
214
- if ("blobToKZGCommitment" in kzg && typeof(kzg.blobToKZGCommitment) === "function") {
215
- return getBytes(kzg.blobToKZGCommitment(hexlify(blob)));
216
- }
217
-
218
- assertArgument(false, "unsupported KZG library", "kzg", kzg);
219
- };
220
-
221
- const computeBlobKzgProof = (blob: Uint8Array, commitment: Uint8Array) => {
222
-
223
- // micro-ecc-signer
224
- if ("computeBlobProof" in kzg && typeof(kzg.computeBlobProof) === "function") {
225
- return getBytes(kzg.computeBlobProof(hexlify(blob), hexlify(commitment)))
226
- }
227
-
228
- // kzg-wasm <0.5.0; computeBlobKzgProof(Uint8Array, Uint8Array) => Uint8Array
229
- if ("computeBlobKzgProof" in kzg && typeof(kzg.computeBlobKzgProof) === "function") {
230
- return kzg.computeBlobKzgProof(blob, commitment);
231
- }
232
-
233
- // kzg-wasm >= 0.5.0; computeBlobKZGProof(string, string) => string
234
- if ("computeBlobKZGProof" in kzg && typeof(kzg.computeBlobKZGProof) === "function") {
235
- return getBytes(kzg.computeBlobKZGProof(hexlify(blob), hexlify(commitment)));
236
- }
237
-
238
- assertArgument(false, "unsupported KZG library", "kzg", kzg);
239
- };
240
-
241
- return { blobToKzgCommitment, computeBlobKzgProof };
242
- }
243
-
244
- function getVersionedHash(version: number, hash: BytesLike): string {
245
- let versioned = version.toString(16);
246
- while (versioned.length < 2) { versioned = "0" + versioned; }
247
- versioned += sha256(hash).substring(4);
248
- return "0x" + versioned;
249
- }
250
-
251
- function handleAddress(value: string): null | string {
252
- if (value === "0x") { return null; }
253
- return getAddress(value);
254
- }
255
-
256
- function handleAccessList(value: any, param: string): AccessList {
257
- try {
258
- return accessListify(value);
259
- } catch (error: any) {
260
- assertArgument(false, error.message, param, value);
261
- }
262
- }
263
-
264
- function handleAuthorizationList(value: any, param: string): Array<Authorization> {
265
- try {
266
- if (!Array.isArray(value)) { throw new Error("authorizationList: invalid array"); }
267
- const result: Array<Authorization> = [ ];
268
- for (let i = 0; i < value.length; i++) {
269
- const auth: Array<string> = value[i];
270
- if (!Array.isArray(auth)) { throw new Error(`authorization[${ i }]: invalid array`); }
271
- if (auth.length !== 6) { throw new Error(`authorization[${ i }]: wrong length`); }
272
- if (!auth[1]) { throw new Error(`authorization[${ i }]: null address`); }
273
- result.push({
274
- address: <string>handleAddress(auth[1]),
275
- nonce: handleUint(auth[2], "nonce"),
276
- chainId: handleUint(auth[0], "chainId"),
277
- signature: Signature.from({
278
- r: auth[4],
279
- s: auth[5],
280
- v: 1
281
- })
282
- });
283
- }
284
- return result;
285
- } catch (error: any) {
286
- assertArgument(false, error.message, param, value);
287
- }
288
- }
289
-
290
- function handleNumber(_value: string, param: string): number {
291
- if (_value === "0x") { return 0; }
292
- return getNumber(_value, param);
293
- }
294
-
295
- function handleUint(_value: string, param: string): bigint {
296
- if (_value === "0x") { return BN_0; }
297
- const value = getBigInt(_value, param);
298
- assertArgument(value <= BN_MAX_UINT, "value exceeds uint size", param, value);
299
- return value;
300
- }
301
-
302
- function formatNumber(_value: BigNumberish, name: string): Uint8Array {
303
- const value = getBigInt(_value, "value");
304
- const result = toBeArray(value);
305
- assertArgument(result.length <= 32, `value too large`, `tx.${ name }`, value);
306
- return result;
307
- }
308
-
309
- function formatAccessList(value: AccessListish): Array<[ string, Array<string> ]> {
310
- return accessListify(value).map((set) => [ set.address, set.storageKeys ]);
311
- }
312
-
313
- function formatAuthorizationList(value: Array<Authorization>): Array<Array<string | Uint8Array>> {
314
- return value.map((a) => {
315
- return [
316
- formatNumber(a.chainId, "chainId"),
317
- a.address,
318
- formatNumber(a.nonce, "nonce"),
319
- a.signature.r,
320
- a.signature.s
321
- ];
322
- });
323
- }
324
-
325
- function formatHashes(value: Array<string>, param: string): Array<string> {
326
- assertArgument(Array.isArray(value), `invalid ${ param }`, "value", value);
327
- for (let i = 0; i < value.length; i++) {
328
- assertArgument(isHexString(value[i], 32), "invalid ${ param } hash", `value[${ i }]`, value[i]);
329
- }
330
- return value;
331
- }
332
-
333
- function _parseLegacy(data: Uint8Array): TransactionLike {
334
- const fields: any = decodeRlp(data);
335
-
336
- assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 6),
337
- "invalid field count for legacy transaction", "data", data);
338
-
339
- const tx: TransactionLike = {
340
- type: 0,
341
- nonce: handleNumber(fields[0], "nonce"),
342
- gasPrice: handleUint(fields[1], "gasPrice"),
343
- gasLimit: handleUint(fields[2], "gasLimit"),
344
- to: handleAddress(fields[3]),
345
- value: handleUint(fields[4], "value"),
346
- data: hexlify(fields[5]),
347
- chainId: BN_0
348
- };
349
-
350
- // Legacy unsigned transaction
351
- if (fields.length === 6) { return tx; }
352
-
353
- const v = handleUint(fields[6], "v");
354
- const r = handleUint(fields[7], "r");
355
- const s = handleUint(fields[8], "s");
356
-
357
- if (r === BN_0 && s === BN_0) {
358
- // EIP-155 unsigned transaction
359
- tx.chainId = v;
360
-
361
- } else {
362
-
363
- // Compute the EIP-155 chain ID (or 0 for legacy)
364
- let chainId = (v - BN_35) / BN_2;
365
- if (chainId < BN_0) { chainId = BN_0; }
366
- tx.chainId = chainId
367
-
368
- // Signed Legacy Transaction
369
- assertArgument(chainId !== BN_0 || (v === BN_27 || v === BN_28), "non-canonical legacy v", "v", fields[6]);
370
-
371
- tx.signature = Signature.from({
372
- r: zeroPadValue(fields[7], 32),
373
- s: zeroPadValue(fields[8], 32),
374
- v
375
- });
376
-
377
- //tx.hash = keccak256(data);
378
- }
379
-
380
- return tx;
381
- }
382
-
383
- function _serializeLegacy(tx: Transaction, sig: null | Signature): string {
384
- const fields: Array<any> = [
385
- formatNumber(tx.nonce, "nonce"),
386
- formatNumber(tx.gasPrice || 0, "gasPrice"),
387
- formatNumber(tx.gasLimit, "gasLimit"),
388
- (tx.to || "0x"),
389
- formatNumber(tx.value, "value"),
390
- tx.data,
391
- ];
392
-
393
- let chainId = BN_0;
394
- if (tx.chainId != BN_0) {
395
- // A chainId was provided; if non-zero we'll use EIP-155
396
- chainId = getBigInt(tx.chainId, "tx.chainId");
397
-
398
- } else if (tx.signature) {
399
-
400
- }
401
-
402
- // Requesting an unsigned transaction
403
- if (!sig) {
404
- // We have an EIP-155 transaction (chainId was specified and non-zero)
405
- if (chainId !== BN_0) {
406
- fields.push(toBeArray(chainId));
407
- fields.push("0x");
408
- fields.push("0x");
409
- }
410
-
411
- return encodeRlp(fields);
412
- }
413
-
414
- let v = sig.v;
415
-
416
- // Add the signature
417
- fields.push(toBeArray(v));
418
- fields.push(toBeArray(sig.r));
419
- fields.push(toBeArray(sig.s));
420
-
421
- return encodeRlp(fields);
422
- }
423
-
424
- function _parseEipSignature(tx: TransactionLike, fields: Array<string>): void {
425
- const r = fields[1];
426
- const s = fields[2]
427
-
428
- const signature = Signature.from({ r, s });
429
- tx.signature = signature;
430
- }
431
-
432
- function _parseEip1559(data: Uint8Array): TransactionLike {
433
- const fields: any = decodeRlp(getBytes(data).slice(1));
434
-
435
- assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 12),
436
- "invalid field count for transaction type: 2", "data", hexlify(data));
437
-
438
- const tx: TransactionLike = {
439
- type: 2,
440
- chainId: handleUint(fields[0], "chainId"),
441
- nonce: handleNumber(fields[1], "nonce"),
442
- maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
443
- maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
444
- gasPrice: null,
445
- gasLimit: handleUint(fields[4], "gasLimit"),
446
- to: handleAddress(fields[5]),
447
- value: handleUint(fields[6], "value"),
448
- data: hexlify(fields[7]),
449
- accessList: handleAccessList(fields[8], "accessList"),
450
- };
451
-
452
- // Unsigned EIP-1559 Transaction
453
- if (fields.length === 9) { return tx; }
454
-
455
- //tx.hash = keccak256(data);
456
-
457
- _parseEipSignature(tx, fields.slice(9));
458
-
459
- return tx;
460
- }
461
-
462
- function _serializeEip1559(tx: Transaction, sig: null | Signature): string {
463
- const fields: Array<any> = [
464
- formatNumber(tx.chainId, "chainId"),
465
- formatNumber(tx.nonce, "nonce"),
466
- formatNumber(tx.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
467
- formatNumber(tx.maxFeePerGas || 0, "maxFeePerGas"),
468
- formatNumber(tx.gasLimit, "gasLimit"),
469
- (tx.to || "0x"),
470
- formatNumber(tx.value, "value"),
471
- tx.data,
472
- formatAccessList(tx.accessList || [ ])
473
- ];
474
-
475
- if (sig) {
476
- fields.push(toBeArray(sig.r));
477
- fields.push(toBeArray(sig.s));
478
- }
479
-
480
- return concat([ "0x02", encodeRlp(fields)]);
481
- }
482
-
483
- function _parseEip2930(data: Uint8Array): TransactionLike {
484
- const fields: any = decodeRlp(getBytes(data).slice(1));
485
-
486
- assertArgument(Array.isArray(fields) && (fields.length === 8 || fields.length === 11),
487
- "invalid field count for transaction type: 1", "data", hexlify(data));
488
-
489
- const tx: TransactionLike = {
490
- type: 1,
491
- chainId: handleUint(fields[0], "chainId"),
492
- nonce: handleNumber(fields[1], "nonce"),
493
- gasPrice: handleUint(fields[2], "gasPrice"),
494
- gasLimit: handleUint(fields[3], "gasLimit"),
495
- to: handleAddress(fields[4]),
496
- value: handleUint(fields[5], "value"),
497
- data: hexlify(fields[6]),
498
- accessList: handleAccessList(fields[7], "accessList")
499
- };
500
-
501
- // Unsigned EIP-2930 Transaction
502
- if (fields.length === 8) { return tx; }
503
-
504
- //tx.hash = keccak256(data);
505
-
506
- _parseEipSignature(tx, fields.slice(8));
507
-
508
- return tx;
509
- }
510
-
511
- function _serializeEip2930(tx: Transaction, sig: null | Signature): string {
512
- const fields: any = [
513
- formatNumber(tx.chainId, "chainId"),
514
- formatNumber(tx.nonce, "nonce"),
515
- formatNumber(tx.gasPrice || 0, "gasPrice"),
516
- formatNumber(tx.gasLimit, "gasLimit"),
517
- (tx.to || "0x"),
518
- formatNumber(tx.value, "value"),
519
- tx.data,
520
- formatAccessList(tx.accessList || [ ])
521
- ];
522
-
523
- if (sig) {
524
- fields.push(toBeArray(sig.r));
525
- fields.push(toBeArray(sig.s));
526
- }
527
-
528
- return concat([ "0x01", encodeRlp(fields)]);
529
- }
530
-
531
- function _parseEip4844(data: Uint8Array): TransactionLike {
532
- let fields: any = decodeRlp(getBytes(data).slice(1));
533
-
534
- let typeName = "3";
535
-
536
- let blobs: null | Array<Blob> = null;
537
-
538
- // Parse the network format
539
- if (fields.length === 4 && Array.isArray(fields[0])) {
540
- typeName = "3 (network format)";
541
- const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];
542
- assertArgument(Array.isArray(fBlobs), "invalid network format: blobs not an array", "fields[1]", fBlobs);
543
- assertArgument(Array.isArray(fCommits), "invalid network format: commitments not an array", "fields[2]", fCommits);
544
- assertArgument(Array.isArray(fProofs), "invalid network format: proofs not an array", "fields[3]", fProofs);
545
- assertArgument(fBlobs.length === fCommits.length, "invalid network format: blobs/commitments length mismatch", "fields", fields);
546
- assertArgument(fBlobs.length === fProofs.length, "invalid network format: blobs/proofs length mismatch", "fields", fields);
547
-
548
- blobs = [ ];
549
- for (let i = 0; i < fields[1].length; i++) {
550
- blobs.push({
551
- data: fBlobs[i],
552
- commitment: fCommits[i],
553
- proof: fProofs[i],
554
- });
555
- }
556
-
557
- fields = fields[0];
558
- }
559
-
560
- assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14),
561
- `invalid field count for transaction type: ${ typeName }`, "data", hexlify(data));
562
-
563
- const tx: TransactionLike = {
564
- type: 3,
565
- chainId: handleUint(fields[0], "chainId"),
566
- nonce: handleNumber(fields[1], "nonce"),
567
- maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
568
- maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
569
- gasPrice: null,
570
- gasLimit: handleUint(fields[4], "gasLimit"),
571
- to: handleAddress(fields[5]),
572
- value: handleUint(fields[6], "value"),
573
- data: hexlify(fields[7]),
574
- accessList: handleAccessList(fields[8], "accessList"),
575
- maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
576
- blobVersionedHashes: fields[10]
577
- };
578
-
579
- if (blobs) { tx.blobs = blobs; }
580
-
581
- assertArgument(tx.to != null, `invalid address for transaction type: ${ typeName }`, "data", data);
582
-
583
- assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
584
- for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
585
- assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${ i }: must be length 32`, "data", data);
586
- }
587
-
588
- // Unsigned EIP-4844 Transaction
589
- if (fields.length === 11) { return tx; }
590
-
591
- // @TODO: Do we need to do this? This is only called internally
592
- // and used to verify hashes; it might save time to not do this
593
- //tx.hash = keccak256(concat([ "0x03", encodeRlp(fields) ]));
594
-
595
- _parseEipSignature(tx, fields.slice(11));
596
-
597
- return tx;
598
- }
599
-
600
- function _serializeEip4844(tx: Transaction, sig: null | Signature, blobs: null | Array<Blob>): string {
601
- const fields: Array<any> = [
602
- formatNumber(tx.chainId, "chainId"),
603
- formatNumber(tx.nonce, "nonce"),
604
- formatNumber(tx.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
605
- formatNumber(tx.maxFeePerGas || 0, "maxFeePerGas"),
606
- formatNumber(tx.gasLimit, "gasLimit"),
607
- (tx.to || ZeroAddress),
608
- formatNumber(tx.value, "value"),
609
- tx.data,
610
- formatAccessList(tx.accessList || [ ]),
611
- formatNumber(tx.maxFeePerBlobGas || 0, "maxFeePerBlobGas"),
612
- formatHashes(tx.blobVersionedHashes || [ ], "blobVersionedHashes")
613
- ];
614
-
615
- if (sig) {
616
- fields.push(toBeArray(sig.r));
617
- fields.push(toBeArray(sig.s));
618
-
619
- // We have blobs; return the network wrapped format
620
- if (blobs) {
621
- return concat([
622
- "0x03",
623
- encodeRlp([
624
- fields,
625
- blobs.map((b) => b.data),
626
- blobs.map((b) => b.commitment),
627
- blobs.map((b) => b.proof),
628
- ])
629
- ]);
630
- }
631
-
632
- }
633
-
634
- return concat([ "0x03", encodeRlp(fields)]);
635
- }
636
-
637
- function _parseEip7702(data: Uint8Array): TransactionLike {
638
- const fields: any = decodeRlp(getBytes(data).slice(1));
639
-
640
- assertArgument(Array.isArray(fields) && (fields.length === 10 || fields.length === 13),
641
- "invalid field count for transaction type: 4", "data", hexlify(data));
642
-
643
- const tx: TransactionLike = {
644
- type: 4,
645
- chainId: handleUint(fields[0], "chainId"),
646
- nonce: handleNumber(fields[1], "nonce"),
647
- maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
648
- maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
649
- gasPrice: null,
650
- gasLimit: handleUint(fields[4], "gasLimit"),
651
- to: handleAddress(fields[5]),
652
- value: handleUint(fields[6], "value"),
653
- data: hexlify(fields[7]),
654
- accessList: handleAccessList(fields[8], "accessList"),
655
- authorizationList: handleAuthorizationList(fields[9], "authorizationList"),
656
- };
657
-
658
- // Unsigned EIP-7702 Transaction
659
- if (fields.length === 10) { return tx; }
660
-
661
- _parseEipSignature(tx, fields.slice(10));
662
-
663
- return tx;
664
- }
665
-
666
- function _serializeEip7702(tx: Transaction, sig: null | Signature): string {
667
- const fields: Array<any> = [
668
- formatNumber(tx.chainId, "chainId"),
669
- formatNumber(tx.nonce, "nonce"),
670
- formatNumber(tx.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
671
- formatNumber(tx.maxFeePerGas || 0, "maxFeePerGas"),
672
- formatNumber(tx.gasLimit, "gasLimit"),
673
- (tx.to || "0x"),
674
- formatNumber(tx.value, "value"),
675
- tx.data,
676
- formatAccessList(tx.accessList || [ ]),
677
- formatAuthorizationList(tx.authorizationList || [ ])
678
- ];
679
-
680
- if (sig) {
681
- fields.push(toBeArray(sig.r));
682
- fields.push(toBeArray(sig.s));
683
- }
684
-
685
- return concat([ "0x04", encodeRlp(fields)]);
686
- }
687
-
688
- /**
689
- * A **Transaction** describes an operation to be executed on
690
- * Ethereum by an Externally Owned Account (EOA). It includes
691
- * who (the [[to]] address), what (the [[data]]) and how much (the
692
- * [[value]] in ether) the operation should entail.
693
- *
694
- * @example:
695
- * tx = new Transaction()
696
- * //_result:
697
- *
698
- * tx.data = "0x1234";
699
- * //_result:
700
- */
701
- export class Transaction implements TransactionLike<string> {
702
- #type: null | number;
703
- #to: null | string;
704
- #data: string;
705
- #nonce: number;
706
- #gasLimit: bigint;
707
- #gasPrice: null | bigint;
708
- #maxPriorityFeePerGas: null | bigint;
709
- #maxFeePerGas: null | bigint;
710
- #value: bigint;
711
- #chainId: bigint;
712
- #sig: null | Signature;
713
- #accessList: null | AccessList;
714
- #maxFeePerBlobGas: null | bigint;
715
- #blobVersionedHashes: null | Array<string>;
716
- #kzg: null | KzgLibrary;
717
- #blobs: null | Array<Blob>;
718
- #auths: null | Array<Authorization>;
719
-
720
- /**
721
- * The transaction type.
722
- *
723
- * If null, the type will be automatically inferred based on
724
- * explicit properties.
725
- */
726
- get type(): null | number { return this.#type; }
727
- set type(value: null | number | string) {
728
- switch (value) {
729
- case null:
730
- this.#type = null;
731
- break;
732
- case 0: case "legacy":
733
- this.#type = 0;
734
- break;
735
- case 1: case "berlin": case "eip-2930":
736
- this.#type = 1;
737
- break;
738
- case 2: case "london": case "eip-1559":
739
- this.#type = 2;
740
- break;
741
- case 3: case "cancun": case "eip-4844":
742
- this.#type = 3;
743
- break;
744
- case 4: case "pectra": case "eip-7702":
745
- this.#type = 4;
746
- break;
747
- default:
748
- assertArgument(false, "unsupported transaction type", "type", value);
749
- }
750
- }
751
-
752
- /**
753
- * The name of the transaction type.
754
- */
755
- get typeName(): null | string {
756
- switch (this.type) {
757
- case 0: return "legacy";
758
- case 1: return "eip-2930";
759
- case 2: return "eip-1559";
760
- case 3: return "eip-4844";
761
- case 4: return "eip-7702";
762
- }
763
-
764
- return null;
765
- }
766
-
767
- /**
768
- * The ``to`` address for the transaction or ``null`` if the
769
- * transaction is an ``init`` transaction.
770
- */
771
- get to(): null | string {
772
- const value = this.#to;
773
- if (value == null && this.type === 3) { return ZeroAddress; }
774
- return value;
775
- }
776
- set to(value: null | string) {
777
- this.#to = (value == null) ? null: getAddress(value);
778
- }
779
-
780
- /**
781
- * The transaction nonce.
782
- */
783
- get nonce(): number { return this.#nonce; }
784
- set nonce(value: BigNumberish) { this.#nonce = getNumber(value, "value"); }
785
-
786
- /**
787
- * The gas limit.
788
- */
789
- get gasLimit(): bigint { return this.#gasLimit; }
790
- set gasLimit(value: BigNumberish) { this.#gasLimit = getBigInt(value); }
791
-
792
- /**
793
- * The gas price.
794
- *
795
- * On legacy networks this defines the fee that will be paid. On
796
- * EIP-1559 networks, this should be ``null``.
797
- */
798
- get gasPrice(): null | bigint {
799
- const value = this.#gasPrice;
800
- if (value == null && (this.type === 0 || this.type === 1)) { return BN_0; }
801
- return value;
802
- }
803
- set gasPrice(value: null | BigNumberish) {
804
- this.#gasPrice = (value == null) ? null: getBigInt(value, "gasPrice");
805
- }
806
-
807
- /**
808
- * The maximum priority fee per unit of gas to pay. On legacy
809
- * networks this should be ``null``.
810
- */
811
- get maxPriorityFeePerGas(): null | bigint {
812
- const value = this.#maxPriorityFeePerGas;
813
- if (value == null) {
814
- if (this.type === 2 || this.type === 3) { return BN_0; }
815
- return null;
816
- }
817
- return value;
818
- }
819
- set maxPriorityFeePerGas(value: null | BigNumberish) {
820
- this.#maxPriorityFeePerGas = (value == null) ? null: getBigInt(value, "maxPriorityFeePerGas");
821
- }
822
-
823
- /**
824
- * The maximum total fee per unit of gas to pay. On legacy
825
- * networks this should be ``null``.
826
- */
827
- get maxFeePerGas(): null | bigint {
828
- const value = this.#maxFeePerGas;
829
- if (value == null) {
830
- if (this.type === 2 || this.type === 3) { return BN_0; }
831
- return null;
832
- }
833
- return value;
834
- }
835
- set maxFeePerGas(value: null | BigNumberish) {
836
- this.#maxFeePerGas = (value == null) ? null: getBigInt(value, "maxFeePerGas");
837
- }
838
-
839
- /**
840
- * The transaction data. For ``init`` transactions this is the
841
- * deployment code.
842
- */
843
- get data(): string { return this.#data; }
844
- set data(value: BytesLike) { this.#data = hexlify(value); }
845
-
846
- /**
847
- * The amount of ether (in wei) to send in this transactions.
848
- */
849
- get value(): bigint { return this.#value; }
850
- set value(value: BigNumberish) {
851
- this.#value = getBigInt(value, "value");
852
- }
853
-
854
- /**
855
- * The chain ID this transaction is valid on.
856
- */
857
- get chainId(): bigint { return this.#chainId; }
858
- set chainId(value: BigNumberish) { this.#chainId = getBigInt(value); }
859
-
860
- /**
861
- * If signed, the signature for this transaction.
862
- */
863
- get signature(): null | Signature { return this.#sig || null; }
864
- set signature(value: null | SignatureLike) {
865
- this.#sig = (value == null) ? null: Signature.from(value);
866
- }
867
-
868
- /**
869
- * The access list.
870
- *
871
- * An access list permits discounted (but pre-paid) access to
872
- * bytecode and state variable access within contract execution.
873
- */
874
- get accessList(): null | AccessList {
875
- const value = this.#accessList || null;
876
- if (value == null) {
877
- if (this.type === 1 || this.type === 2 || this.type === 3) {
878
- // @TODO: in v7, this should assign the value or become
879
- // a live object itself, otherwise mutation is inconsistent
880
- return [ ];
881
- }
882
- return null;
883
- }
884
- return value;
885
- }
886
- set accessList(value: null | AccessListish) {
887
- this.#accessList = (value == null) ? null: accessListify(value);
888
- }
889
-
890
- get authorizationList(): null | Array<Authorization> {
891
- const value = this.#auths || null;
892
- if (value == null) {
893
- if (this.type === 4) {
894
- // @TODO: in v7, this should become a live object itself,
895
- // otherwise mutation is inconsistent
896
- return [ ];
897
- }
898
- }
899
- return value;
900
- }
901
- set authorizationList(auths: null | Array<AuthorizationLike>) {
902
- this.#auths = (auths == null) ? null: auths.map((a) =>
903
- authorizationify(a));
904
- }
905
-
906
- /**
907
- * The max fee per blob gas for Cancun transactions.
908
- */
909
- get maxFeePerBlobGas(): null | bigint {
910
- const value = this.#maxFeePerBlobGas;
911
- if (value == null && this.type === 3) { return BN_0; }
912
- return value;
913
- }
914
- set maxFeePerBlobGas(value: null | BigNumberish) {
915
- this.#maxFeePerBlobGas = (value == null) ? null: getBigInt(value, "maxFeePerBlobGas");
916
- }
917
-
918
- /**
919
- * The BLOb versioned hashes for Cancun transactions.
920
- */
921
- get blobVersionedHashes(): null | Array<string> {
922
- // @TODO: Mutation is inconsistent; if unset, the returned value
923
- // cannot mutate the object, if set it can
924
- let value = this.#blobVersionedHashes;
925
- if (value == null && this.type === 3) { return [ ]; }
926
- return value;
927
- }
928
- set blobVersionedHashes(value: null | Array<string>) {
929
- if (value != null) {
930
- assertArgument(Array.isArray(value), "blobVersionedHashes must be an Array", "value", value);
931
- value = value.slice();
932
- for (let i = 0; i < value.length; i++) {
933
- assertArgument(isHexString(value[i], 32), "invalid blobVersionedHash", `value[${ i }]`, value[i]);
934
- }
935
- }
936
- this.#blobVersionedHashes = value;
937
- }
938
-
939
- /**
940
- * The BLObs for the Transaction, if any.
941
- *
942
- * If ``blobs`` is non-``null``, then the [[seriailized]]
943
- * will return the network formatted sidecar, otherwise it
944
- * will return the standard [[link-eip-2718]] payload. The
945
- * [[unsignedSerialized]] is unaffected regardless.
946
- *
947
- * When setting ``blobs``, either fully valid [[Blob]] objects
948
- * may be specified (i.e. correctly padded, with correct
949
- * committments and proofs) or a raw [[BytesLike]] may
950
- * be provided.
951
- *
952
- * If raw [[BytesLike]] are provided, the [[kzg]] property **must**
953
- * be already set. The blob will be correctly padded and the
954
- * [[KzgLibrary]] will be used to compute the committment and
955
- * proof for the blob.
956
- *
957
- * A BLOb is a sequence of field elements, each of which must
958
- * be within the BLS field modulo, so some additional processing
959
- * may be required to encode arbitrary data to ensure each 32 byte
960
- * field is within the valid range.
961
- *
962
- * Setting this automatically populates [[blobVersionedHashes]],
963
- * overwriting any existing values. Setting this to ``null``
964
- * does **not** remove the [[blobVersionedHashes]], leaving them
965
- * present.
966
- */
967
- get blobs(): null | Array<Blob> {
968
- if (this.#blobs == null) { return null; }
969
- return this.#blobs.map((b) => Object.assign({ }, b));
970
- }
971
- set blobs(_blobs: null | Array<BlobLike>) {
972
- if (_blobs == null) {
973
- this.#blobs = null;
974
- return;
975
- }
976
-
977
- const blobs: Array<Blob> = [ ];
978
- const versionedHashes: Array<string> = [ ];
979
- for (let i = 0; i < _blobs.length; i++) {
980
- const blob = _blobs[i];
981
-
982
- if (isBytesLike(blob)) {
983
- assert(this.#kzg, "adding a raw blob requires a KZG library", "UNSUPPORTED_OPERATION", {
984
- operation: "set blobs()"
985
- });
986
-
987
- let data = getBytes(blob);
988
- assertArgument(data.length <= BLOB_SIZE, "blob is too large", `blobs[${ i }]`, blob);
989
-
990
- // Pad blob if necessary
991
- if (data.length !== BLOB_SIZE) {
992
- const padded = new Uint8Array(BLOB_SIZE);
993
- padded.set(data);
994
- data = padded;
995
- }
996
-
997
- const commit = this.#kzg.blobToKzgCommitment(data);
998
- const proof = hexlify(this.#kzg.computeBlobKzgProof(data, commit));
999
-
1000
- blobs.push({
1001
- data: hexlify(data),
1002
- commitment: hexlify(commit),
1003
- proof
1004
- });
1005
- versionedHashes.push(getVersionedHash(1, commit));
1006
-
1007
- } else {
1008
- const commit = hexlify(blob.commitment);
1009
- blobs.push({
1010
- data: hexlify(blob.data),
1011
- commitment: commit,
1012
- proof: hexlify(blob.proof)
1013
- });
1014
- versionedHashes.push(getVersionedHash(1, commit));
1015
- }
1016
- }
1017
-
1018
- this.#blobs = blobs;
1019
- this.#blobVersionedHashes = versionedHashes;
1020
- }
1021
-
1022
- get kzg(): null | KzgLibrary { return this.#kzg; }
1023
- set kzg(kzg: null | KzgLibraryLike) {
1024
- if (kzg == null) {
1025
- this.#kzg = null;
1026
- } else {
1027
- this.#kzg = getKzgLibrary(kzg);
1028
- }
1029
- }
1030
-
1031
- /**
1032
- * Creates a new Transaction with default values.
1033
- */
1034
- constructor() {
1035
- this.#type = null;
1036
- this.#to = null;
1037
- this.#nonce = 0;
1038
- this.#gasLimit = BN_0;
1039
- this.#gasPrice = null;
1040
- this.#maxPriorityFeePerGas = null;
1041
- this.#maxFeePerGas = null;
1042
- this.#data = "0x";
1043
- this.#value = BN_0;
1044
- this.#chainId = BN_0;
1045
- this.#sig = null;
1046
- this.#accessList = null;
1047
- this.#maxFeePerBlobGas = null;
1048
- this.#blobVersionedHashes = null;
1049
- this.#kzg = null;
1050
- this.#blobs = null;
1051
- this.#auths = null;
1052
- }
1053
-
1054
- /**
1055
- * The transaction hash, if signed. Otherwise, ``null``.
1056
- */
1057
- get hash(): null | string {
1058
- if (this.signature == null) { return null; }
1059
- return keccak256(this.#getSerialized(true, false));
1060
- }
1061
-
1062
- /**
1063
- * The pre-image hash of this transaction.
1064
- *
1065
- * This is the digest that a [[Signer]] must sign to authorize
1066
- * this transaction.
1067
- */
1068
- get unsignedHash(): string {
1069
- return keccak256(this.unsignedSerialized);
1070
- }
1071
-
1072
- /**
1073
- * The sending address, if signed. Otherwise, ``null``.
1074
- */
1075
- get from(): null | string {
1076
- if (this.signature == null) { return null; }
1077
- return recoverAddress(this.unsignedHash, this.signature);
1078
- }
1079
-
1080
- /**
1081
- * The public key of the sender, if signed. Otherwise, ``null``.
1082
- */
1083
- get fromPublicKey(): null | string {
1084
- if (this.signature == null) { return null; }
1085
- return SigningKey.recoverPublicKey(this.unsignedHash, this.signature);
1086
- }
1087
-
1088
- /**
1089
- * Returns true if signed.
1090
- *
1091
- * This provides a Type Guard that properties requiring a signed
1092
- * transaction are non-null.
1093
- */
1094
- isSigned(): this is (Transaction & { type: number, typeName: string, from: string, signature: Signature }) {
1095
- return this.signature != null;
1096
- }
1097
-
1098
- #getSerialized(signed: boolean, sidecar: boolean): string {
1099
- assert(!signed || this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized"});
1100
-
1101
- const sig = signed ? this.signature: null;
1102
- switch (this.inferType()) {
1103
- case 0:
1104
- return _serializeLegacy(this, sig);
1105
- case 1:
1106
- return _serializeEip2930(this, sig);
1107
- case 2:
1108
- return _serializeEip1559(this, sig);
1109
- case 3:
1110
- return _serializeEip4844(this, sig, sidecar ? this.blobs: null);
1111
- case 4:
1112
- return _serializeEip7702(this, sig);
1113
- }
1114
-
1115
- assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
1116
- }
1117
-
1118
- /**
1119
- * The serialized transaction.
1120
- *
1121
- * This throws if the transaction is unsigned. For the pre-image,
1122
- * use [[unsignedSerialized]].
1123
- */
1124
- get serialized(): string {
1125
- return this.#getSerialized(true, true);
1126
- }
1127
-
1128
- /**
1129
- * The transaction pre-image.
1130
- *
1131
- * The hash of this is the digest which needs to be signed to
1132
- * authorize this transaction.
1133
- */
1134
- get unsignedSerialized(): string {
1135
- return this.#getSerialized(false, false);
1136
- }
1137
-
1138
- /**
1139
- * Return the most "likely" type; currently the highest
1140
- * supported transaction type.
1141
- */
1142
- inferType(): number {
1143
- const types = this.inferTypes();
1144
-
1145
- // Prefer London (EIP-1559) over Cancun (BLOb)
1146
- if (types.indexOf(2) >= 0) { return 2; }
1147
-
1148
- // Return the highest inferred type
1149
- return <number>(types.pop());
1150
- }
1151
-
1152
- /**
1153
- * Validates the explicit properties and returns a list of compatible
1154
- * transaction types.
1155
- */
1156
- inferTypes(): Array<number> {
1157
-
1158
- // Checks that there are no conflicting properties set
1159
- const hasGasPrice = this.gasPrice != null;
1160
- const hasFee = (this.maxFeePerGas != null || this.maxPriorityFeePerGas != null);
1161
- const hasAccessList = (this.accessList != null);
1162
- const hasBlob = (this.#maxFeePerBlobGas != null || this.#blobVersionedHashes);
1163
-
1164
- //if (hasGasPrice && hasFee) {
1165
- // throw new Error("transaction cannot have gasPrice and maxFeePerGas");
1166
- //}
1167
-
1168
- if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {
1169
- assert(this.maxFeePerGas >= this.maxPriorityFeePerGas, "priorityFee cannot be more than maxFee", "BAD_DATA", { value: this });
1170
- }
1171
-
1172
- //if (this.type === 2 && hasGasPrice) {
1173
- // throw new Error("eip-1559 transaction cannot have gasPrice");
1174
- //}
1175
-
1176
- assert(!hasFee || (this.type !== 0 && this.type !== 1), "transaction type cannot have maxFeePerGas or maxPriorityFeePerGas", "BAD_DATA", { value: this });
1177
- assert(this.type !== 0 || !hasAccessList, "legacy transaction cannot have accessList", "BAD_DATA", { value: this })
1178
-
1179
- const types: Array<number> = [ ];
1180
-
1181
- // Explicit type
1182
- if (this.type != null) {
1183
- types.push(this.type);
1184
-
1185
- } else {
1186
- if (this.authorizationList && this.authorizationList.length) {
1187
- types.push(4);
1188
- } else if (hasFee) {
1189
- types.push(2);
1190
- } else if (hasGasPrice) {
1191
- types.push(1);
1192
- if (!hasAccessList) { types.push(0); }
1193
- } else if (hasAccessList) {
1194
- types.push(1);
1195
- types.push(2);
1196
- } else if (hasBlob && this.to) {
1197
- types.push(3);
1198
- } else {
1199
- types.push(0);
1200
- types.push(1);
1201
- types.push(2);
1202
- types.push(3);
1203
- }
1204
- }
1205
-
1206
- types.sort();
1207
-
1208
- return types;
1209
- }
1210
-
1211
- /**
1212
- * Returns true if this transaction is a legacy transaction (i.e.
1213
- * ``type === 0``).
1214
- *
1215
- * This provides a Type Guard that the related properties are
1216
- * non-null.
1217
- */
1218
- isLegacy(): this is (Transaction & { type: 0, gasPrice: bigint }) {
1219
- return (this.type === 0);
1220
- }
1221
-
1222
- /**
1223
- * Returns true if this transaction is berlin hardform transaction (i.e.
1224
- * ``type === 1``).
1225
- *
1226
- * This provides a Type Guard that the related properties are
1227
- * non-null.
1228
- */
1229
- isBerlin(): this is (Transaction & { type: 1, gasPrice: bigint, accessList: AccessList }) {
1230
- return (this.type === 1);
1231
- }
1232
-
1233
- /**
1234
- * Returns true if this transaction is london hardform transaction (i.e.
1235
- * ``type === 2``).
1236
- *
1237
- * This provides a Type Guard that the related properties are
1238
- * non-null.
1239
- */
1240
- isLondon(): this is (Transaction & { type: 2, accessList: AccessList, maxFeePerGas: bigint, maxPriorityFeePerGas: bigint }) {
1241
- return (this.type === 2);
1242
- }
1243
-
1244
- /**
1245
- * Returns true if this transaction is an [[link-eip-4844]] BLOB
1246
- * transaction.
1247
- *
1248
- * This provides a Type Guard that the related properties are
1249
- * non-null.
1250
- */
1251
- isCancun(): this is (Transaction & { type: 3, to: string, accessList: AccessList, maxFeePerGas: bigint, maxPriorityFeePerGas: bigint, maxFeePerBlobGas: bigint, blobVersionedHashes: Array<string> }) {
1252
- return (this.type === 3);
1253
- }
1254
-
1255
- /**
1256
- * Create a copy of this transaciton.
1257
- */
1258
- clone(): Transaction {
1259
- return Transaction.from(this);
1260
- }
1261
-
1262
- /**
1263
- * Return a JSON-friendly object.
1264
- */
1265
- toJSON(): any {
1266
- const s = (v: null | bigint) => {
1267
- if (v == null) { return null; }
1268
- return v.toString();
1269
- };
1270
-
1271
- return {
1272
- type: this.type,
1273
- to: this.to,
1274
- // from: this.from,
1275
- data: this.data,
1276
- nonce: this.nonce,
1277
- gasLimit: s(this.gasLimit),
1278
- gasPrice: s(this.gasPrice),
1279
- maxPriorityFeePerGas: s(this.maxPriorityFeePerGas),
1280
- maxFeePerGas: s(this.maxFeePerGas),
1281
- value: s(this.value),
1282
- chainId: s(this.chainId),
1283
- sig: this.signature ? this.signature.toJSON(): null,
1284
- accessList: this.accessList
1285
- };
1286
- }
1287
-
1288
- /**
1289
- * Create a **Transaction** from a serialized transaction or a
1290
- * Transaction-like object.
1291
- */
1292
- static from(tx?: string | TransactionLike<string>): Transaction {
1293
- if (tx == null) { return new Transaction(); }
1294
-
1295
- if (typeof(tx) === "string") {
1296
- const payload = getBytes(tx);
1297
-
1298
- if (payload[0] >= 0x7f) { // @TODO: > vs >= ??
1299
- return Transaction.from(_parseLegacy(payload));
1300
- }
1301
-
1302
- switch(payload[0]) {
1303
- case 1: return Transaction.from(_parseEip2930(payload));
1304
- case 2: return Transaction.from(_parseEip1559(payload));
1305
- case 3: return Transaction.from(_parseEip4844(payload));
1306
- case 4: return Transaction.from(_parseEip7702(payload));
1307
- }
1308
- assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: "from" });
1309
- }
1310
-
1311
- const result = new Transaction();
1312
- if (tx.type != null) { result.type = tx.type; }
1313
- if (tx.to != null) { result.to = tx.to; }
1314
- if (tx.nonce != null) { result.nonce = tx.nonce; }
1315
- if (tx.gasLimit != null) { result.gasLimit = tx.gasLimit; }
1316
- if (tx.gasPrice != null) { result.gasPrice = tx.gasPrice; }
1317
- if (tx.maxPriorityFeePerGas != null) { result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas; }
1318
- if (tx.maxFeePerGas != null) { result.maxFeePerGas = tx.maxFeePerGas; }
1319
- if (tx.maxFeePerBlobGas != null) { result.maxFeePerBlobGas = tx.maxFeePerBlobGas; }
1320
- if (tx.data != null) { result.data = tx.data; }
1321
- if (tx.value != null) { result.value = tx.value; }
1322
- if (tx.chainId != null) { result.chainId = tx.chainId; }
1323
- if (tx.signature != null) { result.signature = Signature.from(tx.signature); }
1324
- if (tx.accessList != null) { result.accessList = tx.accessList; }
1325
- if (tx.authorizationList != null) {
1326
- result.authorizationList = tx.authorizationList;
1327
- }
1328
-
1329
- // This will get overwritten by blobs, if present
1330
- if (tx.blobVersionedHashes != null) { result.blobVersionedHashes = tx.blobVersionedHashes; }
1331
-
1332
- // Make sure we assign the kzg before assigning blobs, which
1333
- // require the library in the event raw blob data is provided.
1334
- if (tx.kzg != null) { result.kzg = tx.kzg; }
1335
- if (tx.blobs != null) { result.blobs = tx.blobs; }
1336
-
1337
- if (tx.hash != null) {
1338
- assertArgument(result.isSigned(), "unsigned transaction cannot define '.hash'", "tx", tx);
1339
- assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
1340
- }
1341
-
1342
- if (tx.from != null) {
1343
- assertArgument(result.isSigned(), "unsigned transaction cannot define '.from'", "tx", tx);
1344
- assertArgument(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
1345
- }
1346
-
1347
- return result;
1348
- }
1349
- }