quantumcoin 6.14.5 → 7.0.1

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 (1281) hide show
  1. package/.github/workflows/publish-npmjs.yaml +22 -0
  2. package/.gitignore +12 -0
  3. package/{LICENSE.md → LICENSE} +21 -21
  4. package/README-SDK.md +700 -0
  5. package/README.md +127 -132
  6. package/config.d.ts +50 -0
  7. package/config.js +115 -0
  8. package/examples/events.js +35 -0
  9. package/examples/example.js +61 -0
  10. package/examples/package-lock.json +1150 -0
  11. package/examples/package.json +17 -0
  12. package/examples/read-operations.js +28 -0
  13. package/examples/wallet-offline.js +29 -0
  14. package/generate-sdk.js +888 -0
  15. package/index.js +12 -0
  16. package/package.json +44 -120
  17. package/src/abi/fragments.d.ts +42 -0
  18. package/src/abi/fragments.js +63 -0
  19. package/src/abi/index.d.ts +13 -0
  20. package/src/abi/index.js +9 -0
  21. package/src/abi/interface.d.ts +114 -0
  22. package/src/abi/interface.js +352 -0
  23. package/src/constants.d.ts +61 -0
  24. package/src/constants.js +94 -0
  25. package/src/contract/contract-factory.d.ts +28 -0
  26. package/src/contract/contract-factory.js +93 -0
  27. package/src/contract/contract.d.ts +105 -0
  28. package/src/contract/contract.js +312 -0
  29. package/src/contract/index.d.ts +9 -0
  30. package/src/contract/index.js +9 -0
  31. package/src/errors/index.d.ts +92 -0
  32. package/src/errors/index.js +188 -0
  33. package/src/generator/index.js +426 -0
  34. package/src/index.d.ts +111 -0
  35. package/src/index.js +41 -0
  36. package/src/internal/hex.d.ts +61 -0
  37. package/src/internal/hex.js +144 -0
  38. package/src/providers/extra-providers.d.ts +128 -0
  39. package/src/providers/extra-providers.js +575 -0
  40. package/src/providers/index.d.ts +16 -0
  41. package/src/providers/index.js +10 -0
  42. package/src/providers/json-rpc-provider.d.ts +12 -0
  43. package/src/providers/json-rpc-provider.js +79 -0
  44. package/src/providers/provider.d.ts +194 -0
  45. package/src/providers/provider.js +359 -0
  46. package/src/utils/address.d.ts +72 -0
  47. package/src/utils/address.js +182 -0
  48. package/src/utils/encoding.d.ts +120 -0
  49. package/src/utils/encoding.js +306 -0
  50. package/src/utils/hashing.d.ts +76 -0
  51. package/src/utils/hashing.js +298 -0
  52. package/src/utils/index.d.ts +55 -0
  53. package/src/utils/index.js +13 -0
  54. package/src/utils/result.d.ts +57 -0
  55. package/src/utils/result.js +128 -0
  56. package/src/utils/rlp.d.ts +12 -0
  57. package/src/utils/rlp.js +200 -0
  58. package/src/utils/units.d.ts +29 -0
  59. package/src/utils/units.js +107 -0
  60. package/src/wallet/index.d.ts +10 -0
  61. package/src/wallet/index.js +8 -0
  62. package/src/wallet/wallet.d.ts +160 -0
  63. package/src/wallet/wallet.js +489 -0
  64. package/test/e2e/helpers.js +47 -0
  65. package/test/e2e/transactional.test.js +191 -0
  66. package/test/e2e/typed-generator.e2e.test.js +402 -0
  67. package/test/fixtures/ConstructorParam.sol +23 -0
  68. package/test/fixtures/MultiContracts.sol +37 -0
  69. package/test/fixtures/SimpleStorage.sol +18 -0
  70. package/test/fixtures/StakingContract.abi.json +1 -0
  71. package/test/integration/ipc-provider.test.js +44 -0
  72. package/test/integration/provider.test.js +72 -0
  73. package/test/integration/ws-provider.test.js +33 -0
  74. package/test/security/malformed-input.test.js +31 -0
  75. package/test/unit/abi-interface.test.js +98 -0
  76. package/test/unit/address-wallet.test.js +257 -0
  77. package/test/unit/browser-provider.test.js +82 -0
  78. package/test/unit/contract.test.js +82 -0
  79. package/test/unit/encoding-units-rlp.test.js +89 -0
  80. package/test/unit/errors.test.js +74 -0
  81. package/test/unit/filter-by-blockhash.test.js +52 -0
  82. package/test/unit/generate-contract-cli.test.js +38 -0
  83. package/test/unit/generate-sdk-artifacts-json.test.js +65 -0
  84. package/test/unit/generator.test.js +98 -0
  85. package/test/unit/hashing.test.js +54 -0
  86. package/test/unit/init.test.js +36 -0
  87. package/test/unit/interface.test.js +53 -0
  88. package/test/unit/internal-hex.test.js +47 -0
  89. package/test/unit/providers.test.js +144 -0
  90. package/test/unit/result.test.js +77 -0
  91. package/test/unit/utils.test.js +54 -0
  92. package/CHANGELOG.md +0 -442
  93. package/FUNDING.json +0 -10
  94. package/SECURITY.md +0 -34
  95. package/dist/README.md +0 -22
  96. package/dist/quantumcoin.js +0 -20940
  97. package/dist/quantumcoin.js.map +0 -1
  98. package/dist/quantumcoin.min.js +0 -1
  99. package/dist/quantumcoin.umd.js +0 -21117
  100. package/dist/quantumcoin.umd.js.map +0 -1
  101. package/dist/quantumcoin.umd.min.js +0 -1
  102. package/dist/wordlists-extra.js +0 -1500
  103. package/dist/wordlists-extra.js.map +0 -1
  104. package/dist/wordlists-extra.min.js +0 -1
  105. package/lib.commonjs/README.md +0 -16
  106. package/lib.commonjs/_version.d.ts +0 -5
  107. package/lib.commonjs/_version.d.ts.map +0 -1
  108. package/lib.commonjs/_version.js +0 -9
  109. package/lib.commonjs/_version.js.map +0 -1
  110. package/lib.commonjs/abi/abi-coder.d.ts +0 -61
  111. package/lib.commonjs/abi/abi-coder.d.ts.map +0 -1
  112. package/lib.commonjs/abi/abi-coder.js +0 -210
  113. package/lib.commonjs/abi/abi-coder.js.map +0 -1
  114. package/lib.commonjs/abi/bytes32.d.ts +0 -15
  115. package/lib.commonjs/abi/bytes32.d.ts.map +0 -1
  116. package/lib.commonjs/abi/bytes32.js +0 -45
  117. package/lib.commonjs/abi/bytes32.js.map +0 -1
  118. package/lib.commonjs/abi/coders/abstract-coder.d.ts +0 -124
  119. package/lib.commonjs/abi/coders/abstract-coder.d.ts.map +0 -1
  120. package/lib.commonjs/abi/coders/abstract-coder.js +0 -472
  121. package/lib.commonjs/abi/coders/abstract-coder.js.map +0 -1
  122. package/lib.commonjs/abi/coders/address.d.ts +0 -13
  123. package/lib.commonjs/abi/coders/address.d.ts.map +0 -1
  124. package/lib.commonjs/abi/coders/address.js +0 -33
  125. package/lib.commonjs/abi/coders/address.js.map +0 -1
  126. package/lib.commonjs/abi/coders/anonymous.d.ts +0 -15
  127. package/lib.commonjs/abi/coders/anonymous.d.ts.map +0 -1
  128. package/lib.commonjs/abi/coders/anonymous.js +0 -27
  129. package/lib.commonjs/abi/coders/anonymous.js.map +0 -1
  130. package/lib.commonjs/abi/coders/array.d.ts +0 -25
  131. package/lib.commonjs/abi/coders/array.d.ts.map +0 -1
  132. package/lib.commonjs/abi/coders/array.js +0 -165
  133. package/lib.commonjs/abi/coders/array.js.map +0 -1
  134. package/lib.commonjs/abi/coders/boolean.d.ts +0 -13
  135. package/lib.commonjs/abi/coders/boolean.d.ts.map +0 -1
  136. package/lib.commonjs/abi/coders/boolean.js +0 -25
  137. package/lib.commonjs/abi/coders/boolean.js.map +0 -1
  138. package/lib.commonjs/abi/coders/bytes.d.ts +0 -19
  139. package/lib.commonjs/abi/coders/bytes.d.ts.map +0 -1
  140. package/lib.commonjs/abi/coders/bytes.js +0 -39
  141. package/lib.commonjs/abi/coders/bytes.js.map +0 -1
  142. package/lib.commonjs/abi/coders/fixed-bytes.d.ts +0 -15
  143. package/lib.commonjs/abi/coders/fixed-bytes.d.ts.map +0 -1
  144. package/lib.commonjs/abi/coders/fixed-bytes.js +0 -32
  145. package/lib.commonjs/abi/coders/fixed-bytes.js.map +0 -1
  146. package/lib.commonjs/abi/coders/null.d.ts +0 -12
  147. package/lib.commonjs/abi/coders/null.d.ts.map +0 -1
  148. package/lib.commonjs/abi/coders/null.js +0 -28
  149. package/lib.commonjs/abi/coders/null.js.map +0 -1
  150. package/lib.commonjs/abi/coders/number.d.ts +0 -16
  151. package/lib.commonjs/abi/coders/number.d.ts.map +0 -1
  152. package/lib.commonjs/abi/coders/number.js +0 -49
  153. package/lib.commonjs/abi/coders/number.js.map +0 -1
  154. package/lib.commonjs/abi/coders/string.d.ts +0 -13
  155. package/lib.commonjs/abi/coders/string.d.ts.map +0 -1
  156. package/lib.commonjs/abi/coders/string.js +0 -25
  157. package/lib.commonjs/abi/coders/string.js.map +0 -1
  158. package/lib.commonjs/abi/coders/tuple.d.ts +0 -16
  159. package/lib.commonjs/abi/coders/tuple.d.ts.map +0 -1
  160. package/lib.commonjs/abi/coders/tuple.js +0 -67
  161. package/lib.commonjs/abi/coders/tuple.js.map +0 -1
  162. package/lib.commonjs/abi/fragments.d.ts +0 -466
  163. package/lib.commonjs/abi/fragments.d.ts.map +0 -1
  164. package/lib.commonjs/abi/fragments.js +0 -1331
  165. package/lib.commonjs/abi/fragments.js.map +0 -1
  166. package/lib.commonjs/abi/index.d.ts +0 -18
  167. package/lib.commonjs/abi/index.d.ts.map +0 -1
  168. package/lib.commonjs/abi/index.js +0 -40
  169. package/lib.commonjs/abi/index.js.map +0 -1
  170. package/lib.commonjs/abi/interface.d.ts +0 -382
  171. package/lib.commonjs/abi/interface.d.ts.map +0 -1
  172. package/lib.commonjs/abi/interface.js +0 -1110
  173. package/lib.commonjs/abi/interface.js.map +0 -1
  174. package/lib.commonjs/abi/typed.d.ts +0 -570
  175. package/lib.commonjs/abi/typed.d.ts.map +0 -1
  176. package/lib.commonjs/abi/typed.js +0 -606
  177. package/lib.commonjs/abi/typed.js.map +0 -1
  178. package/lib.commonjs/address/address.d.ts +0 -36
  179. package/lib.commonjs/address/address.d.ts.map +0 -1
  180. package/lib.commonjs/address/address.js +0 -133
  181. package/lib.commonjs/address/address.js.map +0 -1
  182. package/lib.commonjs/address/checks.d.ts +0 -81
  183. package/lib.commonjs/address/checks.d.ts.map +0 -1
  184. package/lib.commonjs/address/checks.js +0 -120
  185. package/lib.commonjs/address/checks.js.map +0 -1
  186. package/lib.commonjs/address/contract-address.d.ts +0 -48
  187. package/lib.commonjs/address/contract-address.d.ts.map +0 -1
  188. package/lib.commonjs/address/contract-address.js +0 -74
  189. package/lib.commonjs/address/contract-address.js.map +0 -1
  190. package/lib.commonjs/address/index.d.ts +0 -49
  191. package/lib.commonjs/address/index.d.ts.map +0 -1
  192. package/lib.commonjs/address/index.js +0 -28
  193. package/lib.commonjs/address/index.js.map +0 -1
  194. package/lib.commonjs/constants/addresses.d.ts +0 -7
  195. package/lib.commonjs/constants/addresses.d.ts.map +0 -1
  196. package/lib.commonjs/constants/addresses.js +0 -10
  197. package/lib.commonjs/constants/addresses.js.map +0 -1
  198. package/lib.commonjs/constants/hashes.d.ts +0 -7
  199. package/lib.commonjs/constants/hashes.d.ts.map +0 -1
  200. package/lib.commonjs/constants/hashes.js +0 -10
  201. package/lib.commonjs/constants/hashes.js.map +0 -1
  202. package/lib.commonjs/constants/index.d.ts +0 -10
  203. package/lib.commonjs/constants/index.d.ts.map +0 -1
  204. package/lib.commonjs/constants/index.js +0 -22
  205. package/lib.commonjs/constants/index.js.map +0 -1
  206. package/lib.commonjs/constants/numbers.d.ts +0 -31
  207. package/lib.commonjs/constants/numbers.d.ts.map +0 -1
  208. package/lib.commonjs/constants/numbers.js +0 -34
  209. package/lib.commonjs/constants/numbers.js.map +0 -1
  210. package/lib.commonjs/constants/strings.d.ts +0 -13
  211. package/lib.commonjs/constants/strings.d.ts.map +0 -1
  212. package/lib.commonjs/constants/strings.js +0 -17
  213. package/lib.commonjs/constants/strings.js.map +0 -1
  214. package/lib.commonjs/contract/contract.d.ts +0 -168
  215. package/lib.commonjs/contract/contract.d.ts.map +0 -1
  216. package/lib.commonjs/contract/contract.js +0 -960
  217. package/lib.commonjs/contract/contract.js.map +0 -1
  218. package/lib.commonjs/contract/factory.d.ts +0 -62
  219. package/lib.commonjs/contract/factory.d.ts.map +0 -1
  220. package/lib.commonjs/contract/factory.js +0 -116
  221. package/lib.commonjs/contract/factory.js.map +0 -1
  222. package/lib.commonjs/contract/index.d.ts +0 -13
  223. package/lib.commonjs/contract/index.d.ts.map +0 -1
  224. package/lib.commonjs/contract/index.js +0 -24
  225. package/lib.commonjs/contract/index.js.map +0 -1
  226. package/lib.commonjs/contract/types.d.ts +0 -193
  227. package/lib.commonjs/contract/types.d.ts.map +0 -1
  228. package/lib.commonjs/contract/types.js +0 -6
  229. package/lib.commonjs/contract/types.js.map +0 -1
  230. package/lib.commonjs/contract/wrappers.d.ts +0 -143
  231. package/lib.commonjs/contract/wrappers.d.ts.map +0 -1
  232. package/lib.commonjs/contract/wrappers.js +0 -186
  233. package/lib.commonjs/contract/wrappers.js.map +0 -1
  234. package/lib.commonjs/crypto/crypto-browser.d.ts +0 -15
  235. package/lib.commonjs/crypto/crypto-browser.d.ts.map +0 -1
  236. package/lib.commonjs/crypto/crypto-browser.js +0 -55
  237. package/lib.commonjs/crypto/crypto-browser.js.map +0 -1
  238. package/lib.commonjs/crypto/crypto.d.ts +0 -2
  239. package/lib.commonjs/crypto/crypto.d.ts.map +0 -1
  240. package/lib.commonjs/crypto/crypto.js +0 -9
  241. package/lib.commonjs/crypto/crypto.js.map +0 -1
  242. package/lib.commonjs/crypto/hmac.d.ts +0 -25
  243. package/lib.commonjs/crypto/hmac.d.ts.map +0 -1
  244. package/lib.commonjs/crypto/hmac.js +0 -51
  245. package/lib.commonjs/crypto/hmac.js.map +0 -1
  246. package/lib.commonjs/crypto/index.d.ts +0 -25
  247. package/lib.commonjs/crypto/index.d.ts.map +0 -1
  248. package/lib.commonjs/crypto/index.js +0 -49
  249. package/lib.commonjs/crypto/index.js.map +0 -1
  250. package/lib.commonjs/crypto/keccak.d.ts +0 -35
  251. package/lib.commonjs/crypto/keccak.d.ts.map +0 -1
  252. package/lib.commonjs/crypto/keccak.js +0 -52
  253. package/lib.commonjs/crypto/keccak.js.map +0 -1
  254. package/lib.commonjs/crypto/pbkdf2.d.ts +0 -35
  255. package/lib.commonjs/crypto/pbkdf2.d.ts.map +0 -1
  256. package/lib.commonjs/crypto/pbkdf2.js +0 -53
  257. package/lib.commonjs/crypto/pbkdf2.js.map +0 -1
  258. package/lib.commonjs/crypto/random.d.ts +0 -14
  259. package/lib.commonjs/crypto/random.d.ts.map +0 -1
  260. package/lib.commonjs/crypto/random.js +0 -38
  261. package/lib.commonjs/crypto/random.js.map +0 -1
  262. package/lib.commonjs/crypto/ripemd160.d.ts +0 -25
  263. package/lib.commonjs/crypto/ripemd160.d.ts.map +0 -1
  264. package/lib.commonjs/crypto/ripemd160.js +0 -42
  265. package/lib.commonjs/crypto/ripemd160.js.map +0 -1
  266. package/lib.commonjs/crypto/scrypt.d.ts +0 -82
  267. package/lib.commonjs/crypto/scrypt.d.ts.map +0 -1
  268. package/lib.commonjs/crypto/scrypt.js +0 -104
  269. package/lib.commonjs/crypto/scrypt.js.map +0 -1
  270. package/lib.commonjs/crypto/sha2.d.ts +0 -47
  271. package/lib.commonjs/crypto/sha2.d.ts.map +0 -1
  272. package/lib.commonjs/crypto/sha2.js +0 -76
  273. package/lib.commonjs/crypto/sha2.js.map +0 -1
  274. package/lib.commonjs/crypto/signature.d.ts +0 -72
  275. package/lib.commonjs/crypto/signature.d.ts.map +0 -1
  276. package/lib.commonjs/crypto/signature.js +0 -118
  277. package/lib.commonjs/crypto/signature.js.map +0 -1
  278. package/lib.commonjs/crypto/signing-key.d.ts +0 -63
  279. package/lib.commonjs/crypto/signing-key.d.ts.map +0 -1
  280. package/lib.commonjs/crypto/signing-key.js +0 -105
  281. package/lib.commonjs/crypto/signing-key.js.map +0 -1
  282. package/lib.commonjs/hash/authorization.d.ts +0 -18
  283. package/lib.commonjs/hash/authorization.d.ts.map +0 -1
  284. package/lib.commonjs/hash/authorization.js +0 -30
  285. package/lib.commonjs/hash/authorization.js.map +0 -1
  286. package/lib.commonjs/hash/id.d.ts +0 -13
  287. package/lib.commonjs/hash/id.d.ts.map +0 -1
  288. package/lib.commonjs/hash/id.js +0 -21
  289. package/lib.commonjs/hash/id.js.map +0 -1
  290. package/lib.commonjs/hash/index.d.ts +0 -15
  291. package/lib.commonjs/hash/index.d.ts.map +0 -1
  292. package/lib.commonjs/hash/index.js +0 -30
  293. package/lib.commonjs/hash/index.js.map +0 -1
  294. package/lib.commonjs/hash/message.d.ts +0 -36
  295. package/lib.commonjs/hash/message.d.ts.map +0 -1
  296. package/lib.commonjs/hash/message.js +0 -56
  297. package/lib.commonjs/hash/message.js.map +0 -1
  298. package/lib.commonjs/hash/namehash.d.ts +0 -20
  299. package/lib.commonjs/hash/namehash.d.ts.map +0 -1
  300. package/lib.commonjs/hash/namehash.js +0 -91
  301. package/lib.commonjs/hash/namehash.js.map +0 -1
  302. package/lib.commonjs/hash/solidity.d.ts +0 -31
  303. package/lib.commonjs/hash/solidity.d.ts.map +0 -1
  304. package/lib.commonjs/hash/solidity.js +0 -109
  305. package/lib.commonjs/hash/solidity.js.map +0 -1
  306. package/lib.commonjs/hash/typed-data.d.ts +0 -150
  307. package/lib.commonjs/hash/typed-data.d.ts.map +0 -1
  308. package/lib.commonjs/hash/typed-data.js +0 -524
  309. package/lib.commonjs/hash/typed-data.js.map +0 -1
  310. package/lib.commonjs/index.d.ts +0 -11
  311. package/lib.commonjs/index.d.ts.map +0 -1
  312. package/lib.commonjs/index.js +0 -15
  313. package/lib.commonjs/index.js.map +0 -1
  314. package/lib.commonjs/package.json +0 -12
  315. package/lib.commonjs/providers/abstract-provider.d.ts +0 -451
  316. package/lib.commonjs/providers/abstract-provider.d.ts.map +0 -1
  317. package/lib.commonjs/providers/abstract-provider.js +0 -1409
  318. package/lib.commonjs/providers/abstract-provider.js.map +0 -1
  319. package/lib.commonjs/providers/abstract-signer.d.ts +0 -69
  320. package/lib.commonjs/providers/abstract-signer.d.ts.map +0 -1
  321. package/lib.commonjs/providers/abstract-signer.js +0 -249
  322. package/lib.commonjs/providers/abstract-signer.js.map +0 -1
  323. package/lib.commonjs/providers/community.d.ts +0 -29
  324. package/lib.commonjs/providers/community.d.ts.map +0 -1
  325. package/lib.commonjs/providers/community.js +0 -40
  326. package/lib.commonjs/providers/community.js.map +0 -1
  327. package/lib.commonjs/providers/contracts.d.ts +0 -36
  328. package/lib.commonjs/providers/contracts.d.ts.map +0 -1
  329. package/lib.commonjs/providers/contracts.js +0 -3
  330. package/lib.commonjs/providers/contracts.js.map +0 -1
  331. package/lib.commonjs/providers/default-provider.d.ts +0 -41
  332. package/lib.commonjs/providers/default-provider.d.ts.map +0 -1
  333. package/lib.commonjs/providers/default-provider.js +0 -92
  334. package/lib.commonjs/providers/default-provider.js.map +0 -1
  335. package/lib.commonjs/providers/ens-resolver.d.ts +0 -147
  336. package/lib.commonjs/providers/ens-resolver.d.ts.map +0 -1
  337. package/lib.commonjs/providers/ens-resolver.js +0 -502
  338. package/lib.commonjs/providers/ens-resolver.js.map +0 -1
  339. package/lib.commonjs/providers/format.d.ts +0 -15
  340. package/lib.commonjs/providers/format.d.ts.map +0 -1
  341. package/lib.commonjs/providers/format.js +0 -298
  342. package/lib.commonjs/providers/format.js.map +0 -1
  343. package/lib.commonjs/providers/formatting.d.ts +0 -318
  344. package/lib.commonjs/providers/formatting.d.ts.map +0 -1
  345. package/lib.commonjs/providers/formatting.js +0 -10
  346. package/lib.commonjs/providers/formatting.js.map +0 -1
  347. package/lib.commonjs/providers/index.d.ts +0 -41
  348. package/lib.commonjs/providers/index.d.ts.map +0 -1
  349. package/lib.commonjs/providers/index.js +0 -64
  350. package/lib.commonjs/providers/index.js.map +0 -1
  351. package/lib.commonjs/providers/network.d.ts +0 -99
  352. package/lib.commonjs/providers/network.d.ts.map +0 -1
  353. package/lib.commonjs/providers/network.js +0 -269
  354. package/lib.commonjs/providers/network.js.map +0 -1
  355. package/lib.commonjs/providers/pagination.d.ts +0 -6
  356. package/lib.commonjs/providers/pagination.d.ts.map +0 -1
  357. package/lib.commonjs/providers/pagination.js +0 -3
  358. package/lib.commonjs/providers/pagination.js.map +0 -1
  359. package/lib.commonjs/providers/plugin-fallback.d.ts +0 -13
  360. package/lib.commonjs/providers/plugin-fallback.d.ts.map +0 -1
  361. package/lib.commonjs/providers/plugin-fallback.js +0 -31
  362. package/lib.commonjs/providers/plugin-fallback.js.map +0 -1
  363. package/lib.commonjs/providers/plugins-network.d.ts +0 -170
  364. package/lib.commonjs/providers/plugins-network.d.ts.map +0 -1
  365. package/lib.commonjs/providers/plugins-network.js +0 -216
  366. package/lib.commonjs/providers/plugins-network.js.map +0 -1
  367. package/lib.commonjs/providers/provider-browser.d.ts +0 -108
  368. package/lib.commonjs/providers/provider-browser.d.ts.map +0 -1
  369. package/lib.commonjs/providers/provider-browser.js +0 -204
  370. package/lib.commonjs/providers/provider-browser.js.map +0 -1
  371. package/lib.commonjs/providers/provider-fallback.d.ts +0 -115
  372. package/lib.commonjs/providers/provider-fallback.d.ts.map +0 -1
  373. package/lib.commonjs/providers/provider-fallback.js +0 -624
  374. package/lib.commonjs/providers/provider-fallback.js.map +0 -1
  375. package/lib.commonjs/providers/provider-ipcsocket-browser.d.ts +0 -3
  376. package/lib.commonjs/providers/provider-ipcsocket-browser.d.ts.map +0 -1
  377. package/lib.commonjs/providers/provider-ipcsocket-browser.js +0 -6
  378. package/lib.commonjs/providers/provider-ipcsocket-browser.js.map +0 -1
  379. package/lib.commonjs/providers/provider-ipcsocket.d.ts +0 -21
  380. package/lib.commonjs/providers/provider-ipcsocket.d.ts.map +0 -1
  381. package/lib.commonjs/providers/provider-ipcsocket.js +0 -72
  382. package/lib.commonjs/providers/provider-ipcsocket.js.map +0 -1
  383. package/lib.commonjs/providers/provider-jsonrpc.d.ts +0 -360
  384. package/lib.commonjs/providers/provider-jsonrpc.d.ts.map +0 -1
  385. package/lib.commonjs/providers/provider-jsonrpc.js +0 -979
  386. package/lib.commonjs/providers/provider-jsonrpc.js.map +0 -1
  387. package/lib.commonjs/providers/provider-socket.d.ts +0 -113
  388. package/lib.commonjs/providers/provider-socket.d.ts.map +0 -1
  389. package/lib.commonjs/providers/provider-socket.js +0 -309
  390. package/lib.commonjs/providers/provider-socket.js.map +0 -1
  391. package/lib.commonjs/providers/provider-websocket.d.ts +0 -37
  392. package/lib.commonjs/providers/provider-websocket.d.ts.map +0 -1
  393. package/lib.commonjs/providers/provider-websocket.js +0 -80
  394. package/lib.commonjs/providers/provider-websocket.js.map +0 -1
  395. package/lib.commonjs/providers/provider.d.ts +0 -1223
  396. package/lib.commonjs/providers/provider.d.ts.map +0 -1
  397. package/lib.commonjs/providers/provider.js +0 -1321
  398. package/lib.commonjs/providers/provider.js.map +0 -1
  399. package/lib.commonjs/providers/signer-noncemanager.d.ts +0 -38
  400. package/lib.commonjs/providers/signer-noncemanager.d.ts.map +0 -1
  401. package/lib.commonjs/providers/signer-noncemanager.js +0 -78
  402. package/lib.commonjs/providers/signer-noncemanager.js.map +0 -1
  403. package/lib.commonjs/providers/signer.d.ts +0 -131
  404. package/lib.commonjs/providers/signer.d.ts.map +0 -1
  405. package/lib.commonjs/providers/signer.js +0 -3
  406. package/lib.commonjs/providers/signer.js.map +0 -1
  407. package/lib.commonjs/providers/subscriber-connection.d.ts +0 -25
  408. package/lib.commonjs/providers/subscriber-connection.d.ts.map +0 -1
  409. package/lib.commonjs/providers/subscriber-connection.js +0 -56
  410. package/lib.commonjs/providers/subscriber-connection.js.map +0 -1
  411. package/lib.commonjs/providers/subscriber-filterid.d.ts +0 -64
  412. package/lib.commonjs/providers/subscriber-filterid.d.ts.map +0 -1
  413. package/lib.commonjs/providers/subscriber-filterid.js +0 -180
  414. package/lib.commonjs/providers/subscriber-filterid.js.map +0 -1
  415. package/lib.commonjs/providers/subscriber-polling.d.ts +0 -100
  416. package/lib.commonjs/providers/subscriber-polling.d.ts.map +0 -1
  417. package/lib.commonjs/providers/subscriber-polling.js +0 -303
  418. package/lib.commonjs/providers/subscriber-polling.js.map +0 -1
  419. package/lib.commonjs/providers/ws-browser.d.ts +0 -3
  420. package/lib.commonjs/providers/ws-browser.d.ts.map +0 -1
  421. package/lib.commonjs/providers/ws-browser.js +0 -19
  422. package/lib.commonjs/providers/ws-browser.js.map +0 -1
  423. package/lib.commonjs/providers/ws.d.ts +0 -2
  424. package/lib.commonjs/providers/ws.d.ts.map +0 -1
  425. package/lib.commonjs/providers/ws.js +0 -6
  426. package/lib.commonjs/providers/ws.js.map +0 -1
  427. package/lib.commonjs/quantumcoin.d.ts +0 -24
  428. package/lib.commonjs/quantumcoin.d.ts.map +0 -1
  429. package/lib.commonjs/quantumcoin.js +0 -199
  430. package/lib.commonjs/quantumcoin.js.map +0 -1
  431. package/lib.commonjs/transaction/accesslist.d.ts +0 -6
  432. package/lib.commonjs/transaction/accesslist.d.ts.map +0 -1
  433. package/lib.commonjs/transaction/accesslist.js +0 -41
  434. package/lib.commonjs/transaction/accesslist.js.map +0 -1
  435. package/lib.commonjs/transaction/address.d.ts +0 -15
  436. package/lib.commonjs/transaction/address.d.ts.map +0 -1
  437. package/lib.commonjs/transaction/address.js +0 -39
  438. package/lib.commonjs/transaction/address.js.map +0 -1
  439. package/lib.commonjs/transaction/authorization.d.ts +0 -3
  440. package/lib.commonjs/transaction/authorization.d.ts.map +0 -1
  441. package/lib.commonjs/transaction/authorization.js +0 -16
  442. package/lib.commonjs/transaction/authorization.js.map +0 -1
  443. package/lib.commonjs/transaction/index.d.ts +0 -40
  444. package/lib.commonjs/transaction/index.d.ts.map +0 -1
  445. package/lib.commonjs/transaction/index.js +0 -19
  446. package/lib.commonjs/transaction/index.js.map +0 -1
  447. package/lib.commonjs/transaction/transaction.d.ts +0 -400
  448. package/lib.commonjs/transaction/transaction.d.ts.map +0 -1
  449. package/lib.commonjs/transaction/transaction.js +0 -1115
  450. package/lib.commonjs/transaction/transaction.js.map +0 -1
  451. package/lib.commonjs/utils/base58.d.ts +0 -23
  452. package/lib.commonjs/utils/base58.d.ts.map +0 -1
  453. package/lib.commonjs/utils/base58.js +0 -68
  454. package/lib.commonjs/utils/base58.js.map +0 -1
  455. package/lib.commonjs/utils/base64-browser.d.ts +0 -4
  456. package/lib.commonjs/utils/base64-browser.d.ts.map +0 -1
  457. package/lib.commonjs/utils/base64-browser.js +0 -24
  458. package/lib.commonjs/utils/base64-browser.js.map +0 -1
  459. package/lib.commonjs/utils/base64.d.ts +0 -40
  460. package/lib.commonjs/utils/base64.d.ts.map +0 -1
  461. package/lib.commonjs/utils/base64.js +0 -58
  462. package/lib.commonjs/utils/base64.js.map +0 -1
  463. package/lib.commonjs/utils/data.d.ts +0 -93
  464. package/lib.commonjs/utils/data.d.ts.map +0 -1
  465. package/lib.commonjs/utils/data.js +0 -184
  466. package/lib.commonjs/utils/data.js.map +0 -1
  467. package/lib.commonjs/utils/errors.d.ts +0 -512
  468. package/lib.commonjs/utils/errors.d.ts.map +0 -1
  469. package/lib.commonjs/utils/errors.js +0 -235
  470. package/lib.commonjs/utils/errors.js.map +0 -1
  471. package/lib.commonjs/utils/events.d.ts +0 -77
  472. package/lib.commonjs/utils/events.d.ts.map +0 -1
  473. package/lib.commonjs/utils/events.js +0 -46
  474. package/lib.commonjs/utils/events.js.map +0 -1
  475. package/lib.commonjs/utils/fetch.d.ts +0 -363
  476. package/lib.commonjs/utils/fetch.d.ts.map +0 -1
  477. package/lib.commonjs/utils/fetch.js +0 -858
  478. package/lib.commonjs/utils/fetch.js.map +0 -1
  479. package/lib.commonjs/utils/fixednumber.d.ts +0 -252
  480. package/lib.commonjs/utils/fixednumber.d.ts.map +0 -1
  481. package/lib.commonjs/utils/fixednumber.js +0 -530
  482. package/lib.commonjs/utils/fixednumber.js.map +0 -1
  483. package/lib.commonjs/utils/geturl-browser.d.ts +0 -4
  484. package/lib.commonjs/utils/geturl-browser.d.ts.map +0 -1
  485. package/lib.commonjs/utils/geturl-browser.js +0 -67
  486. package/lib.commonjs/utils/geturl-browser.js.map +0 -1
  487. package/lib.commonjs/utils/geturl.d.ts +0 -10
  488. package/lib.commonjs/utils/geturl.d.ts.map +0 -1
  489. package/lib.commonjs/utils/geturl.js +0 -120
  490. package/lib.commonjs/utils/geturl.js.map +0 -1
  491. package/lib.commonjs/utils/index.d.ts +0 -30
  492. package/lib.commonjs/utils/index.d.ts.map +0 -1
  493. package/lib.commonjs/utils/index.js +0 -78
  494. package/lib.commonjs/utils/index.js.map +0 -1
  495. package/lib.commonjs/utils/maths.d.ts +0 -66
  496. package/lib.commonjs/utils/maths.d.ts.map +0 -1
  497. package/lib.commonjs/utils/maths.js +0 -229
  498. package/lib.commonjs/utils/maths.js.map +0 -1
  499. package/lib.commonjs/utils/properties.d.ts +0 -23
  500. package/lib.commonjs/utils/properties.d.ts.map +0 -1
  501. package/lib.commonjs/utils/properties.js +0 -59
  502. package/lib.commonjs/utils/properties.js.map +0 -1
  503. package/lib.commonjs/utils/rlp-decode.d.ts +0 -6
  504. package/lib.commonjs/utils/rlp-decode.d.ts.map +0 -1
  505. package/lib.commonjs/utils/rlp-decode.js +0 -83
  506. package/lib.commonjs/utils/rlp-decode.js.map +0 -1
  507. package/lib.commonjs/utils/rlp-encode.d.ts +0 -6
  508. package/lib.commonjs/utils/rlp-encode.d.ts.map +0 -1
  509. package/lib.commonjs/utils/rlp-encode.js +0 -53
  510. package/lib.commonjs/utils/rlp-encode.js.map +0 -1
  511. package/lib.commonjs/utils/rlp.d.ts +0 -17
  512. package/lib.commonjs/utils/rlp.d.ts.map +0 -1
  513. package/lib.commonjs/utils/rlp.js +0 -14
  514. package/lib.commonjs/utils/rlp.js.map +0 -1
  515. package/lib.commonjs/utils/units.d.ts +0 -24
  516. package/lib.commonjs/utils/units.d.ts.map +0 -1
  517. package/lib.commonjs/utils/units.js +0 -90
  518. package/lib.commonjs/utils/units.js.map +0 -1
  519. package/lib.commonjs/utils/utf8.d.ts +0 -96
  520. package/lib.commonjs/utils/utf8.d.ts.map +0 -1
  521. package/lib.commonjs/utils/utf8.js +0 -227
  522. package/lib.commonjs/utils/utf8.js.map +0 -1
  523. package/lib.commonjs/utils/uuid.d.ts +0 -8
  524. package/lib.commonjs/utils/uuid.d.ts.map +0 -1
  525. package/lib.commonjs/utils/uuid.js +0 -34
  526. package/lib.commonjs/utils/uuid.js.map +0 -1
  527. package/lib.commonjs/wallet/base-wallet.d.ts +0 -57
  528. package/lib.commonjs/wallet/base-wallet.d.ts.map +0 -1
  529. package/lib.commonjs/wallet/base-wallet.js +0 -127
  530. package/lib.commonjs/wallet/base-wallet.js.map +0 -1
  531. package/lib.commonjs/wallet/index.d.ts +0 -23
  532. package/lib.commonjs/wallet/index.d.ts.map +0 -1
  533. package/lib.commonjs/wallet/index.js +0 -30
  534. package/lib.commonjs/wallet/index.js.map +0 -1
  535. package/lib.commonjs/wallet/json-keystore.d.ts +0 -40
  536. package/lib.commonjs/wallet/json-keystore.d.ts.map +0 -1
  537. package/lib.commonjs/wallet/json-keystore.js +0 -90
  538. package/lib.commonjs/wallet/json-keystore.js.map +0 -1
  539. package/lib.commonjs/wallet/utils.d.ts +0 -8
  540. package/lib.commonjs/wallet/utils.d.ts.map +0 -1
  541. package/lib.commonjs/wallet/utils.js +0 -149
  542. package/lib.commonjs/wallet/utils.js.map +0 -1
  543. package/lib.commonjs/wallet/wallet.d.ts +0 -62
  544. package/lib.commonjs/wallet/wallet.d.ts.map +0 -1
  545. package/lib.commonjs/wallet/wallet.js +0 -109
  546. package/lib.commonjs/wallet/wallet.js.map +0 -1
  547. package/lib.commonjs/wordlists/bit-reader.d.ts +0 -5
  548. package/lib.commonjs/wordlists/bit-reader.d.ts.map +0 -1
  549. package/lib.commonjs/wordlists/bit-reader.js +0 -36
  550. package/lib.commonjs/wordlists/bit-reader.js.map +0 -1
  551. package/lib.commonjs/wordlists/decode-owl.d.ts +0 -9
  552. package/lib.commonjs/wordlists/decode-owl.d.ts.map +0 -1
  553. package/lib.commonjs/wordlists/decode-owl.js +0 -60
  554. package/lib.commonjs/wordlists/decode-owl.js.map +0 -1
  555. package/lib.commonjs/wordlists/decode-owla.d.ts +0 -5
  556. package/lib.commonjs/wordlists/decode-owla.d.ts.map +0 -1
  557. package/lib.commonjs/wordlists/decode-owla.js +0 -32
  558. package/lib.commonjs/wordlists/decode-owla.js.map +0 -1
  559. package/lib.commonjs/wordlists/generation/encode-latin.d.ts +0 -25
  560. package/lib.commonjs/wordlists/generation/encode-latin.d.ts.map +0 -1
  561. package/lib.commonjs/wordlists/generation/encode-latin.js +0 -351
  562. package/lib.commonjs/wordlists/generation/encode-latin.js.map +0 -1
  563. package/lib.commonjs/wordlists/index.d.ts +0 -25
  564. package/lib.commonjs/wordlists/index.d.ts.map +0 -1
  565. package/lib.commonjs/wordlists/index.js +0 -33
  566. package/lib.commonjs/wordlists/index.js.map +0 -1
  567. package/lib.commonjs/wordlists/lang-cz.d.ts +0 -23
  568. package/lib.commonjs/wordlists/lang-cz.d.ts.map +0 -1
  569. package/lib.commonjs/wordlists/lang-cz.js +0 -35
  570. package/lib.commonjs/wordlists/lang-cz.js.map +0 -1
  571. package/lib.commonjs/wordlists/lang-en.d.ts +0 -23
  572. package/lib.commonjs/wordlists/lang-en.d.ts.map +0 -1
  573. package/lib.commonjs/wordlists/lang-en.js +0 -35
  574. package/lib.commonjs/wordlists/lang-en.js.map +0 -1
  575. package/lib.commonjs/wordlists/lang-es.d.ts +0 -23
  576. package/lib.commonjs/wordlists/lang-es.d.ts.map +0 -1
  577. package/lib.commonjs/wordlists/lang-es.js +0 -36
  578. package/lib.commonjs/wordlists/lang-es.js.map +0 -1
  579. package/lib.commonjs/wordlists/lang-fr.d.ts +0 -23
  580. package/lib.commonjs/wordlists/lang-fr.d.ts.map +0 -1
  581. package/lib.commonjs/wordlists/lang-fr.js +0 -36
  582. package/lib.commonjs/wordlists/lang-fr.js.map +0 -1
  583. package/lib.commonjs/wordlists/lang-it.d.ts +0 -23
  584. package/lib.commonjs/wordlists/lang-it.d.ts.map +0 -1
  585. package/lib.commonjs/wordlists/lang-it.js +0 -35
  586. package/lib.commonjs/wordlists/lang-it.js.map +0 -1
  587. package/lib.commonjs/wordlists/lang-ja.d.ts +0 -27
  588. package/lib.commonjs/wordlists/lang-ja.d.ts.map +0 -1
  589. package/lib.commonjs/wordlists/lang-ja.js +0 -158
  590. package/lib.commonjs/wordlists/lang-ja.js.map +0 -1
  591. package/lib.commonjs/wordlists/lang-ko.d.ts +0 -25
  592. package/lib.commonjs/wordlists/lang-ko.d.ts.map +0 -1
  593. package/lib.commonjs/wordlists/lang-ko.js +0 -93
  594. package/lib.commonjs/wordlists/lang-ko.js.map +0 -1
  595. package/lib.commonjs/wordlists/lang-pt.d.ts +0 -23
  596. package/lib.commonjs/wordlists/lang-pt.d.ts.map +0 -1
  597. package/lib.commonjs/wordlists/lang-pt.js +0 -35
  598. package/lib.commonjs/wordlists/lang-pt.js.map +0 -1
  599. package/lib.commonjs/wordlists/lang-zh.d.ts +0 -32
  600. package/lib.commonjs/wordlists/lang-zh.d.ts.map +0 -1
  601. package/lib.commonjs/wordlists/lang-zh.js +0 -96
  602. package/lib.commonjs/wordlists/lang-zh.js.map +0 -1
  603. package/lib.commonjs/wordlists/wordlist-owl.d.ts +0 -32
  604. package/lib.commonjs/wordlists/wordlist-owl.d.ts.map +0 -1
  605. package/lib.commonjs/wordlists/wordlist-owl.js +0 -70
  606. package/lib.commonjs/wordlists/wordlist-owl.js.map +0 -1
  607. package/lib.commonjs/wordlists/wordlist-owla.d.ts +0 -30
  608. package/lib.commonjs/wordlists/wordlist-owla.d.ts.map +0 -1
  609. package/lib.commonjs/wordlists/wordlist-owla.js +0 -40
  610. package/lib.commonjs/wordlists/wordlist-owla.js.map +0 -1
  611. package/lib.commonjs/wordlists/wordlist.d.ts +0 -47
  612. package/lib.commonjs/wordlists/wordlist.d.ts.map +0 -1
  613. package/lib.commonjs/wordlists/wordlist.js +0 -46
  614. package/lib.commonjs/wordlists/wordlist.js.map +0 -1
  615. package/lib.commonjs/wordlists/wordlists-browser.d.ts +0 -3
  616. package/lib.commonjs/wordlists/wordlists-browser.d.ts.map +0 -1
  617. package/lib.commonjs/wordlists/wordlists-browser.js +0 -8
  618. package/lib.commonjs/wordlists/wordlists-browser.js.map +0 -1
  619. package/lib.commonjs/wordlists/wordlists-extra.d.ts +0 -9
  620. package/lib.commonjs/wordlists/wordlists-extra.d.ts.map +0 -1
  621. package/lib.commonjs/wordlists/wordlists-extra.js +0 -20
  622. package/lib.commonjs/wordlists/wordlists-extra.js.map +0 -1
  623. package/lib.commonjs/wordlists/wordlists.d.ts +0 -16
  624. package/lib.commonjs/wordlists/wordlists.d.ts.map +0 -1
  625. package/lib.commonjs/wordlists/wordlists.js +0 -38
  626. package/lib.commonjs/wordlists/wordlists.js.map +0 -1
  627. package/lib.esm/README.md +0 -16
  628. package/lib.esm/_version.d.ts +0 -5
  629. package/lib.esm/_version.d.ts.map +0 -1
  630. package/lib.esm/_version.js +0 -6
  631. package/lib.esm/_version.js.map +0 -1
  632. package/lib.esm/abi/abi-coder.d.ts +0 -61
  633. package/lib.esm/abi/abi-coder.d.ts.map +0 -1
  634. package/lib.esm/abi/abi-coder.js +0 -206
  635. package/lib.esm/abi/abi-coder.js.map +0 -1
  636. package/lib.esm/abi/bytes32.d.ts +0 -15
  637. package/lib.esm/abi/bytes32.d.ts.map +0 -1
  638. package/lib.esm/abi/bytes32.js +0 -40
  639. package/lib.esm/abi/bytes32.js.map +0 -1
  640. package/lib.esm/abi/coders/abstract-coder.d.ts +0 -124
  641. package/lib.esm/abi/coders/abstract-coder.d.ts.map +0 -1
  642. package/lib.esm/abi/coders/abstract-coder.js +0 -466
  643. package/lib.esm/abi/coders/abstract-coder.js.map +0 -1
  644. package/lib.esm/abi/coders/address.d.ts +0 -13
  645. package/lib.esm/abi/coders/address.d.ts.map +0 -1
  646. package/lib.esm/abi/coders/address.js +0 -29
  647. package/lib.esm/abi/coders/address.js.map +0 -1
  648. package/lib.esm/abi/coders/anonymous.d.ts +0 -15
  649. package/lib.esm/abi/coders/anonymous.d.ts.map +0 -1
  650. package/lib.esm/abi/coders/anonymous.js +0 -23
  651. package/lib.esm/abi/coders/anonymous.js.map +0 -1
  652. package/lib.esm/abi/coders/array.d.ts +0 -25
  653. package/lib.esm/abi/coders/array.d.ts.map +0 -1
  654. package/lib.esm/abi/coders/array.js +0 -159
  655. package/lib.esm/abi/coders/array.js.map +0 -1
  656. package/lib.esm/abi/coders/boolean.d.ts +0 -13
  657. package/lib.esm/abi/coders/boolean.d.ts.map +0 -1
  658. package/lib.esm/abi/coders/boolean.js +0 -21
  659. package/lib.esm/abi/coders/boolean.js.map +0 -1
  660. package/lib.esm/abi/coders/bytes.d.ts +0 -19
  661. package/lib.esm/abi/coders/bytes.d.ts.map +0 -1
  662. package/lib.esm/abi/coders/bytes.js +0 -34
  663. package/lib.esm/abi/coders/bytes.js.map +0 -1
  664. package/lib.esm/abi/coders/fixed-bytes.d.ts +0 -15
  665. package/lib.esm/abi/coders/fixed-bytes.d.ts.map +0 -1
  666. package/lib.esm/abi/coders/fixed-bytes.js +0 -28
  667. package/lib.esm/abi/coders/fixed-bytes.js.map +0 -1
  668. package/lib.esm/abi/coders/null.d.ts +0 -12
  669. package/lib.esm/abi/coders/null.d.ts.map +0 -1
  670. package/lib.esm/abi/coders/null.js +0 -24
  671. package/lib.esm/abi/coders/null.js.map +0 -1
  672. package/lib.esm/abi/coders/number.d.ts +0 -16
  673. package/lib.esm/abi/coders/number.d.ts.map +0 -1
  674. package/lib.esm/abi/coders/number.js +0 -45
  675. package/lib.esm/abi/coders/number.js.map +0 -1
  676. package/lib.esm/abi/coders/string.d.ts +0 -13
  677. package/lib.esm/abi/coders/string.d.ts.map +0 -1
  678. package/lib.esm/abi/coders/string.js +0 -21
  679. package/lib.esm/abi/coders/string.js.map +0 -1
  680. package/lib.esm/abi/coders/tuple.d.ts +0 -16
  681. package/lib.esm/abi/coders/tuple.d.ts.map +0 -1
  682. package/lib.esm/abi/coders/tuple.js +0 -63
  683. package/lib.esm/abi/coders/tuple.js.map +0 -1
  684. package/lib.esm/abi/fragments.d.ts +0 -466
  685. package/lib.esm/abi/fragments.d.ts.map +0 -1
  686. package/lib.esm/abi/fragments.js +0 -1319
  687. package/lib.esm/abi/fragments.js.map +0 -1
  688. package/lib.esm/abi/index.d.ts +0 -18
  689. package/lib.esm/abi/index.d.ts.map +0 -1
  690. package/lib.esm/abi/index.js +0 -17
  691. package/lib.esm/abi/index.js.map +0 -1
  692. package/lib.esm/abi/interface.d.ts +0 -382
  693. package/lib.esm/abi/interface.d.ts.map +0 -1
  694. package/lib.esm/abi/interface.js +0 -1101
  695. package/lib.esm/abi/interface.js.map +0 -1
  696. package/lib.esm/abi/typed.d.ts +0 -570
  697. package/lib.esm/abi/typed.d.ts.map +0 -1
  698. package/lib.esm/abi/typed.js +0 -602
  699. package/lib.esm/abi/typed.js.map +0 -1
  700. package/lib.esm/address/address.d.ts +0 -36
  701. package/lib.esm/address/address.d.ts.map +0 -1
  702. package/lib.esm/address/address.js +0 -129
  703. package/lib.esm/address/address.js.map +0 -1
  704. package/lib.esm/address/checks.d.ts +0 -81
  705. package/lib.esm/address/checks.d.ts.map +0 -1
  706. package/lib.esm/address/checks.js +0 -114
  707. package/lib.esm/address/checks.js.map +0 -1
  708. package/lib.esm/address/contract-address.d.ts +0 -48
  709. package/lib.esm/address/contract-address.d.ts.map +0 -1
  710. package/lib.esm/address/contract-address.js +0 -69
  711. package/lib.esm/address/contract-address.js.map +0 -1
  712. package/lib.esm/address/index.d.ts +0 -49
  713. package/lib.esm/address/index.d.ts.map +0 -1
  714. package/lib.esm/address/index.js +0 -19
  715. package/lib.esm/address/index.js.map +0 -1
  716. package/lib.esm/constants/addresses.d.ts +0 -7
  717. package/lib.esm/constants/addresses.d.ts.map +0 -1
  718. package/lib.esm/constants/addresses.js +0 -7
  719. package/lib.esm/constants/addresses.js.map +0 -1
  720. package/lib.esm/constants/hashes.d.ts +0 -7
  721. package/lib.esm/constants/hashes.d.ts.map +0 -1
  722. package/lib.esm/constants/hashes.js +0 -7
  723. package/lib.esm/constants/hashes.js.map +0 -1
  724. package/lib.esm/constants/index.d.ts +0 -10
  725. package/lib.esm/constants/index.d.ts.map +0 -1
  726. package/lib.esm/constants/index.js +0 -10
  727. package/lib.esm/constants/index.js.map +0 -1
  728. package/lib.esm/constants/numbers.d.ts +0 -31
  729. package/lib.esm/constants/numbers.d.ts.map +0 -1
  730. package/lib.esm/constants/numbers.js +0 -31
  731. package/lib.esm/constants/numbers.js.map +0 -1
  732. package/lib.esm/constants/strings.d.ts +0 -13
  733. package/lib.esm/constants/strings.d.ts.map +0 -1
  734. package/lib.esm/constants/strings.js +0 -14
  735. package/lib.esm/constants/strings.js.map +0 -1
  736. package/lib.esm/contract/contract.d.ts +0 -168
  737. package/lib.esm/contract/contract.d.ts.map +0 -1
  738. package/lib.esm/contract/contract.js +0 -953
  739. package/lib.esm/contract/contract.js.map +0 -1
  740. package/lib.esm/contract/factory.d.ts +0 -62
  741. package/lib.esm/contract/factory.d.ts.map +0 -1
  742. package/lib.esm/contract/factory.js +0 -112
  743. package/lib.esm/contract/factory.js.map +0 -1
  744. package/lib.esm/contract/index.d.ts +0 -13
  745. package/lib.esm/contract/index.d.ts.map +0 -1
  746. package/lib.esm/contract/index.js +0 -12
  747. package/lib.esm/contract/index.js.map +0 -1
  748. package/lib.esm/contract/types.d.ts +0 -193
  749. package/lib.esm/contract/types.d.ts.map +0 -1
  750. package/lib.esm/contract/types.js +0 -5
  751. package/lib.esm/contract/types.js.map +0 -1
  752. package/lib.esm/contract/wrappers.d.ts +0 -143
  753. package/lib.esm/contract/wrappers.d.ts.map +0 -1
  754. package/lib.esm/contract/wrappers.js +0 -177
  755. package/lib.esm/contract/wrappers.js.map +0 -1
  756. package/lib.esm/crypto/crypto-browser.d.ts +0 -15
  757. package/lib.esm/crypto/crypto-browser.d.ts.map +0 -1
  758. package/lib.esm/crypto/crypto-browser.js +0 -48
  759. package/lib.esm/crypto/crypto-browser.js.map +0 -1
  760. package/lib.esm/crypto/crypto.d.ts +0 -2
  761. package/lib.esm/crypto/crypto.d.ts.map +0 -1
  762. package/lib.esm/crypto/crypto.js +0 -2
  763. package/lib.esm/crypto/crypto.js.map +0 -1
  764. package/lib.esm/crypto/hmac.d.ts +0 -25
  765. package/lib.esm/crypto/hmac.d.ts.map +0 -1
  766. package/lib.esm/crypto/hmac.js +0 -47
  767. package/lib.esm/crypto/hmac.js.map +0 -1
  768. package/lib.esm/crypto/index.d.ts +0 -25
  769. package/lib.esm/crypto/index.d.ts.map +0 -1
  770. package/lib.esm/crypto/index.js +0 -36
  771. package/lib.esm/crypto/index.js.map +0 -1
  772. package/lib.esm/crypto/keccak.d.ts +0 -35
  773. package/lib.esm/crypto/keccak.d.ts.map +0 -1
  774. package/lib.esm/crypto/keccak.js +0 -48
  775. package/lib.esm/crypto/keccak.js.map +0 -1
  776. package/lib.esm/crypto/pbkdf2.d.ts +0 -35
  777. package/lib.esm/crypto/pbkdf2.d.ts.map +0 -1
  778. package/lib.esm/crypto/pbkdf2.js +0 -49
  779. package/lib.esm/crypto/pbkdf2.js.map +0 -1
  780. package/lib.esm/crypto/random.d.ts +0 -14
  781. package/lib.esm/crypto/random.d.ts.map +0 -1
  782. package/lib.esm/crypto/random.js +0 -34
  783. package/lib.esm/crypto/random.js.map +0 -1
  784. package/lib.esm/crypto/ripemd160.d.ts +0 -25
  785. package/lib.esm/crypto/ripemd160.d.ts.map +0 -1
  786. package/lib.esm/crypto/ripemd160.js +0 -38
  787. package/lib.esm/crypto/ripemd160.js.map +0 -1
  788. package/lib.esm/crypto/scrypt.d.ts +0 -82
  789. package/lib.esm/crypto/scrypt.d.ts.map +0 -1
  790. package/lib.esm/crypto/scrypt.js +0 -99
  791. package/lib.esm/crypto/scrypt.js.map +0 -1
  792. package/lib.esm/crypto/sha2.d.ts +0 -47
  793. package/lib.esm/crypto/sha2.d.ts.map +0 -1
  794. package/lib.esm/crypto/sha2.js +0 -71
  795. package/lib.esm/crypto/sha2.js.map +0 -1
  796. package/lib.esm/crypto/signature.d.ts +0 -72
  797. package/lib.esm/crypto/signature.d.ts.map +0 -1
  798. package/lib.esm/crypto/signature.js +0 -114
  799. package/lib.esm/crypto/signature.js.map +0 -1
  800. package/lib.esm/crypto/signing-key.d.ts +0 -63
  801. package/lib.esm/crypto/signing-key.d.ts.map +0 -1
  802. package/lib.esm/crypto/signing-key.js +0 -101
  803. package/lib.esm/crypto/signing-key.js.map +0 -1
  804. package/lib.esm/hash/authorization.d.ts +0 -18
  805. package/lib.esm/hash/authorization.d.ts.map +0 -1
  806. package/lib.esm/hash/authorization.js +0 -25
  807. package/lib.esm/hash/authorization.js.map +0 -1
  808. package/lib.esm/hash/id.d.ts +0 -13
  809. package/lib.esm/hash/id.d.ts.map +0 -1
  810. package/lib.esm/hash/id.js +0 -17
  811. package/lib.esm/hash/id.js.map +0 -1
  812. package/lib.esm/hash/index.d.ts +0 -15
  813. package/lib.esm/hash/index.d.ts.map +0 -1
  814. package/lib.esm/hash/index.js +0 -13
  815. package/lib.esm/hash/index.js.map +0 -1
  816. package/lib.esm/hash/message.d.ts +0 -36
  817. package/lib.esm/hash/message.d.ts.map +0 -1
  818. package/lib.esm/hash/message.js +0 -51
  819. package/lib.esm/hash/message.js.map +0 -1
  820. package/lib.esm/hash/namehash.d.ts +0 -20
  821. package/lib.esm/hash/namehash.d.ts.map +0 -1
  822. package/lib.esm/hash/namehash.js +0 -84
  823. package/lib.esm/hash/namehash.js.map +0 -1
  824. package/lib.esm/hash/solidity.d.ts +0 -31
  825. package/lib.esm/hash/solidity.d.ts.map +0 -1
  826. package/lib.esm/hash/solidity.js +0 -103
  827. package/lib.esm/hash/solidity.js.map +0 -1
  828. package/lib.esm/hash/typed-data.d.ts +0 -150
  829. package/lib.esm/hash/typed-data.d.ts.map +0 -1
  830. package/lib.esm/hash/typed-data.js +0 -519
  831. package/lib.esm/hash/typed-data.js.map +0 -1
  832. package/lib.esm/index.d.ts +0 -11
  833. package/lib.esm/index.d.ts.map +0 -1
  834. package/lib.esm/index.js +0 -11
  835. package/lib.esm/index.js.map +0 -1
  836. package/lib.esm/package.json +0 -12
  837. package/lib.esm/providers/abstract-provider.d.ts +0 -451
  838. package/lib.esm/providers/abstract-provider.d.ts.map +0 -1
  839. package/lib.esm/providers/abstract-provider.js +0 -1404
  840. package/lib.esm/providers/abstract-provider.js.map +0 -1
  841. package/lib.esm/providers/abstract-signer.d.ts +0 -69
  842. package/lib.esm/providers/abstract-signer.d.ts.map +0 -1
  843. package/lib.esm/providers/abstract-signer.js +0 -244
  844. package/lib.esm/providers/abstract-signer.js.map +0 -1
  845. package/lib.esm/providers/community.d.ts +0 -29
  846. package/lib.esm/providers/community.d.ts.map +0 -1
  847. package/lib.esm/providers/community.js +0 -36
  848. package/lib.esm/providers/community.js.map +0 -1
  849. package/lib.esm/providers/contracts.d.ts +0 -36
  850. package/lib.esm/providers/contracts.d.ts.map +0 -1
  851. package/lib.esm/providers/contracts.js +0 -2
  852. package/lib.esm/providers/contracts.js.map +0 -1
  853. package/lib.esm/providers/default-provider.d.ts +0 -41
  854. package/lib.esm/providers/default-provider.d.ts.map +0 -1
  855. package/lib.esm/providers/default-provider.js +0 -88
  856. package/lib.esm/providers/default-provider.js.map +0 -1
  857. package/lib.esm/providers/ens-resolver.d.ts +0 -147
  858. package/lib.esm/providers/ens-resolver.d.ts.map +0 -1
  859. package/lib.esm/providers/ens-resolver.js +0 -496
  860. package/lib.esm/providers/ens-resolver.js.map +0 -1
  861. package/lib.esm/providers/format.d.ts +0 -15
  862. package/lib.esm/providers/format.d.ts.map +0 -1
  863. package/lib.esm/providers/format.js +0 -283
  864. package/lib.esm/providers/format.js.map +0 -1
  865. package/lib.esm/providers/formatting.d.ts +0 -318
  866. package/lib.esm/providers/formatting.d.ts.map +0 -1
  867. package/lib.esm/providers/formatting.js +0 -9
  868. package/lib.esm/providers/formatting.js.map +0 -1
  869. package/lib.esm/providers/index.d.ts +0 -41
  870. package/lib.esm/providers/index.d.ts.map +0 -1
  871. package/lib.esm/providers/index.js +0 -31
  872. package/lib.esm/providers/index.js.map +0 -1
  873. package/lib.esm/providers/network.d.ts +0 -99
  874. package/lib.esm/providers/network.d.ts.map +0 -1
  875. package/lib.esm/providers/network.js +0 -265
  876. package/lib.esm/providers/network.js.map +0 -1
  877. package/lib.esm/providers/pagination.d.ts +0 -6
  878. package/lib.esm/providers/pagination.d.ts.map +0 -1
  879. package/lib.esm/providers/pagination.js +0 -2
  880. package/lib.esm/providers/pagination.js.map +0 -1
  881. package/lib.esm/providers/plugin-fallback.d.ts +0 -13
  882. package/lib.esm/providers/plugin-fallback.d.ts.map +0 -1
  883. package/lib.esm/providers/plugin-fallback.js +0 -26
  884. package/lib.esm/providers/plugin-fallback.js.map +0 -1
  885. package/lib.esm/providers/plugins-network.d.ts +0 -170
  886. package/lib.esm/providers/plugins-network.d.ts.map +0 -1
  887. package/lib.esm/providers/plugins-network.js +0 -208
  888. package/lib.esm/providers/plugins-network.js.map +0 -1
  889. package/lib.esm/providers/provider-browser.d.ts +0 -108
  890. package/lib.esm/providers/provider-browser.d.ts.map +0 -1
  891. package/lib.esm/providers/provider-browser.js +0 -200
  892. package/lib.esm/providers/provider-browser.js.map +0 -1
  893. package/lib.esm/providers/provider-fallback.d.ts +0 -115
  894. package/lib.esm/providers/provider-fallback.d.ts.map +0 -1
  895. package/lib.esm/providers/provider-fallback.js +0 -620
  896. package/lib.esm/providers/provider-fallback.js.map +0 -1
  897. package/lib.esm/providers/provider-ipcsocket-browser.d.ts +0 -3
  898. package/lib.esm/providers/provider-ipcsocket-browser.d.ts.map +0 -1
  899. package/lib.esm/providers/provider-ipcsocket-browser.js +0 -3
  900. package/lib.esm/providers/provider-ipcsocket-browser.js.map +0 -1
  901. package/lib.esm/providers/provider-ipcsocket.d.ts +0 -21
  902. package/lib.esm/providers/provider-ipcsocket.d.ts.map +0 -1
  903. package/lib.esm/providers/provider-ipcsocket.js +0 -68
  904. package/lib.esm/providers/provider-ipcsocket.js.map +0 -1
  905. package/lib.esm/providers/provider-jsonrpc.d.ts +0 -360
  906. package/lib.esm/providers/provider-jsonrpc.d.ts.map +0 -1
  907. package/lib.esm/providers/provider-jsonrpc.js +0 -972
  908. package/lib.esm/providers/provider-jsonrpc.js.map +0 -1
  909. package/lib.esm/providers/provider-socket.d.ts +0 -113
  910. package/lib.esm/providers/provider-socket.d.ts.map +0 -1
  911. package/lib.esm/providers/provider-socket.js +0 -301
  912. package/lib.esm/providers/provider-socket.js.map +0 -1
  913. package/lib.esm/providers/provider-websocket.d.ts +0 -37
  914. package/lib.esm/providers/provider-websocket.d.ts.map +0 -1
  915. package/lib.esm/providers/provider-websocket.js +0 -76
  916. package/lib.esm/providers/provider-websocket.js.map +0 -1
  917. package/lib.esm/providers/provider.d.ts +0 -1223
  918. package/lib.esm/providers/provider.d.ts.map +0 -1
  919. package/lib.esm/providers/provider.js +0 -1312
  920. package/lib.esm/providers/provider.js.map +0 -1
  921. package/lib.esm/providers/signer-noncemanager.d.ts +0 -38
  922. package/lib.esm/providers/signer-noncemanager.d.ts.map +0 -1
  923. package/lib.esm/providers/signer-noncemanager.js +0 -74
  924. package/lib.esm/providers/signer-noncemanager.js.map +0 -1
  925. package/lib.esm/providers/signer.d.ts +0 -131
  926. package/lib.esm/providers/signer.d.ts.map +0 -1
  927. package/lib.esm/providers/signer.js +0 -2
  928. package/lib.esm/providers/signer.js.map +0 -1
  929. package/lib.esm/providers/subscriber-connection.d.ts +0 -25
  930. package/lib.esm/providers/subscriber-connection.d.ts.map +0 -1
  931. package/lib.esm/providers/subscriber-connection.js +0 -52
  932. package/lib.esm/providers/subscriber-connection.js.map +0 -1
  933. package/lib.esm/providers/subscriber-filterid.d.ts +0 -64
  934. package/lib.esm/providers/subscriber-filterid.d.ts.map +0 -1
  935. package/lib.esm/providers/subscriber-filterid.js +0 -174
  936. package/lib.esm/providers/subscriber-filterid.js.map +0 -1
  937. package/lib.esm/providers/subscriber-polling.d.ts +0 -100
  938. package/lib.esm/providers/subscriber-polling.d.ts.map +0 -1
  939. package/lib.esm/providers/subscriber-polling.js +0 -293
  940. package/lib.esm/providers/subscriber-polling.js.map +0 -1
  941. package/lib.esm/providers/ws-browser.d.ts +0 -3
  942. package/lib.esm/providers/ws-browser.d.ts.map +0 -1
  943. package/lib.esm/providers/ws-browser.js +0 -16
  944. package/lib.esm/providers/ws-browser.js.map +0 -1
  945. package/lib.esm/providers/ws.d.ts +0 -2
  946. package/lib.esm/providers/ws.d.ts.map +0 -1
  947. package/lib.esm/providers/ws.js +0 -2
  948. package/lib.esm/providers/ws.js.map +0 -1
  949. package/lib.esm/quantumcoin.d.ts +0 -24
  950. package/lib.esm/quantumcoin.d.ts.map +0 -1
  951. package/lib.esm/quantumcoin.js +0 -22
  952. package/lib.esm/quantumcoin.js.map +0 -1
  953. package/lib.esm/transaction/accesslist.d.ts +0 -6
  954. package/lib.esm/transaction/accesslist.d.ts.map +0 -1
  955. package/lib.esm/transaction/accesslist.js +0 -37
  956. package/lib.esm/transaction/accesslist.js.map +0 -1
  957. package/lib.esm/transaction/address.d.ts +0 -15
  958. package/lib.esm/transaction/address.d.ts.map +0 -1
  959. package/lib.esm/transaction/address.js +0 -34
  960. package/lib.esm/transaction/address.js.map +0 -1
  961. package/lib.esm/transaction/authorization.d.ts +0 -3
  962. package/lib.esm/transaction/authorization.d.ts.map +0 -1
  963. package/lib.esm/transaction/authorization.js +0 -12
  964. package/lib.esm/transaction/authorization.js.map +0 -1
  965. package/lib.esm/transaction/index.d.ts +0 -40
  966. package/lib.esm/transaction/index.d.ts.map +0 -1
  967. package/lib.esm/transaction/index.js +0 -11
  968. package/lib.esm/transaction/index.js.map +0 -1
  969. package/lib.esm/transaction/transaction.d.ts +0 -400
  970. package/lib.esm/transaction/transaction.d.ts.map +0 -1
  971. package/lib.esm/transaction/transaction.js +0 -1111
  972. package/lib.esm/transaction/transaction.js.map +0 -1
  973. package/lib.esm/utils/base58.d.ts +0 -23
  974. package/lib.esm/utils/base58.d.ts.map +0 -1
  975. package/lib.esm/utils/base58.js +0 -63
  976. package/lib.esm/utils/base58.js.map +0 -1
  977. package/lib.esm/utils/base64-browser.d.ts +0 -4
  978. package/lib.esm/utils/base64-browser.d.ts.map +0 -1
  979. package/lib.esm/utils/base64-browser.js +0 -19
  980. package/lib.esm/utils/base64-browser.js.map +0 -1
  981. package/lib.esm/utils/base64.d.ts +0 -40
  982. package/lib.esm/utils/base64.d.ts.map +0 -1
  983. package/lib.esm/utils/base64.js +0 -53
  984. package/lib.esm/utils/base64.js.map +0 -1
  985. package/lib.esm/utils/data.d.ts +0 -93
  986. package/lib.esm/utils/data.d.ts.map +0 -1
  987. package/lib.esm/utils/data.js +0 -170
  988. package/lib.esm/utils/data.js.map +0 -1
  989. package/lib.esm/utils/errors.d.ts +0 -512
  990. package/lib.esm/utils/errors.d.ts.map +0 -1
  991. package/lib.esm/utils/errors.js +0 -224
  992. package/lib.esm/utils/errors.js.map +0 -1
  993. package/lib.esm/utils/events.d.ts +0 -77
  994. package/lib.esm/utils/events.d.ts.map +0 -1
  995. package/lib.esm/utils/events.js +0 -42
  996. package/lib.esm/utils/events.js.map +0 -1
  997. package/lib.esm/utils/fetch.d.ts +0 -363
  998. package/lib.esm/utils/fetch.d.ts.map +0 -1
  999. package/lib.esm/utils/fetch.js +0 -852
  1000. package/lib.esm/utils/fetch.js.map +0 -1
  1001. package/lib.esm/utils/fixednumber.d.ts +0 -252
  1002. package/lib.esm/utils/fixednumber.d.ts.map +0 -1
  1003. package/lib.esm/utils/fixednumber.js +0 -526
  1004. package/lib.esm/utils/fixednumber.js.map +0 -1
  1005. package/lib.esm/utils/geturl-browser.d.ts +0 -4
  1006. package/lib.esm/utils/geturl-browser.d.ts.map +0 -1
  1007. package/lib.esm/utils/geturl-browser.js +0 -62
  1008. package/lib.esm/utils/geturl-browser.js.map +0 -1
  1009. package/lib.esm/utils/geturl.d.ts +0 -10
  1010. package/lib.esm/utils/geturl.d.ts.map +0 -1
  1011. package/lib.esm/utils/geturl.js +0 -114
  1012. package/lib.esm/utils/geturl.js.map +0 -1
  1013. package/lib.esm/utils/index.d.ts +0 -30
  1014. package/lib.esm/utils/index.d.ts.map +0 -1
  1015. package/lib.esm/utils/index.js +0 -22
  1016. package/lib.esm/utils/index.js.map +0 -1
  1017. package/lib.esm/utils/maths.d.ts +0 -66
  1018. package/lib.esm/utils/maths.d.ts.map +0 -1
  1019. package/lib.esm/utils/maths.js +0 -215
  1020. package/lib.esm/utils/maths.js.map +0 -1
  1021. package/lib.esm/utils/properties.d.ts +0 -23
  1022. package/lib.esm/utils/properties.d.ts.map +0 -1
  1023. package/lib.esm/utils/properties.js +0 -54
  1024. package/lib.esm/utils/properties.js.map +0 -1
  1025. package/lib.esm/utils/rlp-decode.d.ts +0 -6
  1026. package/lib.esm/utils/rlp-decode.d.ts.map +0 -1
  1027. package/lib.esm/utils/rlp-decode.js +0 -79
  1028. package/lib.esm/utils/rlp-decode.js.map +0 -1
  1029. package/lib.esm/utils/rlp-encode.d.ts +0 -6
  1030. package/lib.esm/utils/rlp-encode.d.ts.map +0 -1
  1031. package/lib.esm/utils/rlp-encode.js +0 -49
  1032. package/lib.esm/utils/rlp-encode.js.map +0 -1
  1033. package/lib.esm/utils/rlp.d.ts +0 -17
  1034. package/lib.esm/utils/rlp.d.ts.map +0 -1
  1035. package/lib.esm/utils/rlp.js +0 -9
  1036. package/lib.esm/utils/rlp.js.map +0 -1
  1037. package/lib.esm/utils/units.d.ts +0 -24
  1038. package/lib.esm/utils/units.d.ts.map +0 -1
  1039. package/lib.esm/utils/units.js +0 -83
  1040. package/lib.esm/utils/units.js.map +0 -1
  1041. package/lib.esm/utils/utf8.d.ts +0 -96
  1042. package/lib.esm/utils/utf8.d.ts.map +0 -1
  1043. package/lib.esm/utils/utf8.js +0 -221
  1044. package/lib.esm/utils/utf8.js.map +0 -1
  1045. package/lib.esm/utils/uuid.d.ts +0 -8
  1046. package/lib.esm/utils/uuid.d.ts.map +0 -1
  1047. package/lib.esm/utils/uuid.js +0 -30
  1048. package/lib.esm/utils/uuid.js.map +0 -1
  1049. package/lib.esm/wallet/base-wallet.d.ts +0 -57
  1050. package/lib.esm/wallet/base-wallet.d.ts.map +0 -1
  1051. package/lib.esm/wallet/base-wallet.js +0 -123
  1052. package/lib.esm/wallet/base-wallet.js.map +0 -1
  1053. package/lib.esm/wallet/index.d.ts +0 -23
  1054. package/lib.esm/wallet/index.d.ts.map +0 -1
  1055. package/lib.esm/wallet/index.js +0 -22
  1056. package/lib.esm/wallet/index.js.map +0 -1
  1057. package/lib.esm/wallet/json-keystore.d.ts +0 -40
  1058. package/lib.esm/wallet/json-keystore.d.ts.map +0 -1
  1059. package/lib.esm/wallet/json-keystore.js +0 -84
  1060. package/lib.esm/wallet/json-keystore.js.map +0 -1
  1061. package/lib.esm/wallet/utils.d.ts +0 -8
  1062. package/lib.esm/wallet/utils.d.ts.map +0 -1
  1063. package/lib.esm/wallet/utils.js +0 -142
  1064. package/lib.esm/wallet/utils.js.map +0 -1
  1065. package/lib.esm/wallet/wallet.d.ts +0 -62
  1066. package/lib.esm/wallet/wallet.d.ts.map +0 -1
  1067. package/lib.esm/wallet/wallet.js +0 -105
  1068. package/lib.esm/wallet/wallet.js.map +0 -1
  1069. package/lib.esm/wordlists/bit-reader.d.ts +0 -5
  1070. package/lib.esm/wordlists/bit-reader.d.ts.map +0 -1
  1071. package/lib.esm/wordlists/bit-reader.js +0 -32
  1072. package/lib.esm/wordlists/bit-reader.js.map +0 -1
  1073. package/lib.esm/wordlists/decode-owl.d.ts +0 -9
  1074. package/lib.esm/wordlists/decode-owl.d.ts.map +0 -1
  1075. package/lib.esm/wordlists/decode-owl.js +0 -55
  1076. package/lib.esm/wordlists/decode-owl.js.map +0 -1
  1077. package/lib.esm/wordlists/decode-owla.d.ts +0 -5
  1078. package/lib.esm/wordlists/decode-owla.d.ts.map +0 -1
  1079. package/lib.esm/wordlists/decode-owla.js +0 -28
  1080. package/lib.esm/wordlists/decode-owla.js.map +0 -1
  1081. package/lib.esm/wordlists/generation/encode-latin.d.ts +0 -25
  1082. package/lib.esm/wordlists/generation/encode-latin.d.ts.map +0 -1
  1083. package/lib.esm/wordlists/generation/encode-latin.js +0 -344
  1084. package/lib.esm/wordlists/generation/encode-latin.js.map +0 -1
  1085. package/lib.esm/wordlists/index.d.ts +0 -25
  1086. package/lib.esm/wordlists/index.d.ts.map +0 -1
  1087. package/lib.esm/wordlists/index.js +0 -25
  1088. package/lib.esm/wordlists/index.js.map +0 -1
  1089. package/lib.esm/wordlists/lang-cz.d.ts +0 -23
  1090. package/lib.esm/wordlists/lang-cz.d.ts.map +0 -1
  1091. package/lib.esm/wordlists/lang-cz.js +0 -31
  1092. package/lib.esm/wordlists/lang-cz.js.map +0 -1
  1093. package/lib.esm/wordlists/lang-en.d.ts +0 -23
  1094. package/lib.esm/wordlists/lang-en.d.ts.map +0 -1
  1095. package/lib.esm/wordlists/lang-en.js +0 -31
  1096. package/lib.esm/wordlists/lang-en.js.map +0 -1
  1097. package/lib.esm/wordlists/lang-es.d.ts +0 -23
  1098. package/lib.esm/wordlists/lang-es.d.ts.map +0 -1
  1099. package/lib.esm/wordlists/lang-es.js +0 -32
  1100. package/lib.esm/wordlists/lang-es.js.map +0 -1
  1101. package/lib.esm/wordlists/lang-fr.d.ts +0 -23
  1102. package/lib.esm/wordlists/lang-fr.d.ts.map +0 -1
  1103. package/lib.esm/wordlists/lang-fr.js +0 -32
  1104. package/lib.esm/wordlists/lang-fr.js.map +0 -1
  1105. package/lib.esm/wordlists/lang-it.d.ts +0 -23
  1106. package/lib.esm/wordlists/lang-it.d.ts.map +0 -1
  1107. package/lib.esm/wordlists/lang-it.js +0 -31
  1108. package/lib.esm/wordlists/lang-it.js.map +0 -1
  1109. package/lib.esm/wordlists/lang-ja.d.ts +0 -27
  1110. package/lib.esm/wordlists/lang-ja.d.ts.map +0 -1
  1111. package/lib.esm/wordlists/lang-ja.js +0 -154
  1112. package/lib.esm/wordlists/lang-ja.js.map +0 -1
  1113. package/lib.esm/wordlists/lang-ko.d.ts +0 -25
  1114. package/lib.esm/wordlists/lang-ko.d.ts.map +0 -1
  1115. package/lib.esm/wordlists/lang-ko.js +0 -89
  1116. package/lib.esm/wordlists/lang-ko.js.map +0 -1
  1117. package/lib.esm/wordlists/lang-pt.d.ts +0 -23
  1118. package/lib.esm/wordlists/lang-pt.d.ts.map +0 -1
  1119. package/lib.esm/wordlists/lang-pt.js +0 -31
  1120. package/lib.esm/wordlists/lang-pt.js.map +0 -1
  1121. package/lib.esm/wordlists/lang-zh.d.ts +0 -32
  1122. package/lib.esm/wordlists/lang-zh.d.ts.map +0 -1
  1123. package/lib.esm/wordlists/lang-zh.js +0 -92
  1124. package/lib.esm/wordlists/lang-zh.js.map +0 -1
  1125. package/lib.esm/wordlists/wordlist-owl.d.ts +0 -32
  1126. package/lib.esm/wordlists/wordlist-owl.d.ts.map +0 -1
  1127. package/lib.esm/wordlists/wordlist-owl.js +0 -66
  1128. package/lib.esm/wordlists/wordlist-owl.js.map +0 -1
  1129. package/lib.esm/wordlists/wordlist-owla.d.ts +0 -30
  1130. package/lib.esm/wordlists/wordlist-owla.d.ts.map +0 -1
  1131. package/lib.esm/wordlists/wordlist-owla.js +0 -36
  1132. package/lib.esm/wordlists/wordlist-owla.js.map +0 -1
  1133. package/lib.esm/wordlists/wordlist.d.ts +0 -47
  1134. package/lib.esm/wordlists/wordlist.d.ts.map +0 -1
  1135. package/lib.esm/wordlists/wordlist.js +0 -42
  1136. package/lib.esm/wordlists/wordlist.js.map +0 -1
  1137. package/lib.esm/wordlists/wordlists-browser.d.ts +0 -3
  1138. package/lib.esm/wordlists/wordlists-browser.d.ts.map +0 -1
  1139. package/lib.esm/wordlists/wordlists-browser.js +0 -5
  1140. package/lib.esm/wordlists/wordlists-browser.js.map +0 -1
  1141. package/lib.esm/wordlists/wordlists-extra.d.ts +0 -9
  1142. package/lib.esm/wordlists/wordlists-extra.d.ts.map +0 -1
  1143. package/lib.esm/wordlists/wordlists-extra.js +0 -9
  1144. package/lib.esm/wordlists/wordlists-extra.js.map +0 -1
  1145. package/lib.esm/wordlists/wordlists.d.ts +0 -16
  1146. package/lib.esm/wordlists/wordlists.d.ts.map +0 -1
  1147. package/lib.esm/wordlists/wordlists.js +0 -35
  1148. package/lib.esm/wordlists/wordlists.js.map +0 -1
  1149. package/rollup.config.mjs +0 -50
  1150. package/src.ts/_version.ts +0 -6
  1151. package/src.ts/abi/abi-coder.ts +0 -237
  1152. package/src.ts/abi/bytes32.ts +0 -45
  1153. package/src.ts/abi/coders/abstract-coder.ts +0 -541
  1154. package/src.ts/abi/coders/address.ts +0 -36
  1155. package/src.ts/abi/coders/anonymous.ts +0 -29
  1156. package/src.ts/abi/coders/array.ts +0 -199
  1157. package/src.ts/abi/coders/boolean.ts +0 -27
  1158. package/src.ts/abi/coders/bytes.ts +0 -43
  1159. package/src.ts/abi/coders/fixed-bytes.ts +0 -37
  1160. package/src.ts/abi/coders/null.ts +0 -28
  1161. package/src.ts/abi/coders/number.ts +0 -63
  1162. package/src.ts/abi/coders/string.ts +0 -29
  1163. package/src.ts/abi/coders/tuple.ts +0 -69
  1164. package/src.ts/abi/fragments.ts +0 -1617
  1165. package/src.ts/abi/index.ts +0 -41
  1166. package/src.ts/abi/interface.ts +0 -1271
  1167. package/src.ts/abi/typed.ts +0 -796
  1168. package/src.ts/address/address.ts +0 -148
  1169. package/src.ts/address/checks.ts +0 -123
  1170. package/src.ts/address/contract-address.ts +0 -80
  1171. package/src.ts/address/index.ts +0 -57
  1172. package/src.ts/constants/addresses.ts +0 -8
  1173. package/src.ts/constants/hashes.ts +0 -7
  1174. package/src.ts/constants/index.ts +0 -16
  1175. package/src.ts/constants/numbers.ts +0 -35
  1176. package/src.ts/constants/strings.ts +0 -16
  1177. package/src.ts/contract/contract.ts +0 -1120
  1178. package/src.ts/contract/factory.ts +0 -143
  1179. package/src.ts/contract/index.ts +0 -31
  1180. package/src.ts/contract/types.ts +0 -236
  1181. package/src.ts/contract/wrappers.ts +0 -225
  1182. package/src.ts/crypto/crypto-browser.ts +0 -64
  1183. package/src.ts/crypto/crypto.ts +0 -4
  1184. package/src.ts/crypto/hmac.ts +0 -51
  1185. package/src.ts/crypto/index.ts +0 -59
  1186. package/src.ts/crypto/keccak.ts +0 -54
  1187. package/src.ts/crypto/pbkdf2.ts +0 -55
  1188. package/src.ts/crypto/random.ts +0 -36
  1189. package/src.ts/crypto/ripemd160.ts +0 -43
  1190. package/src.ts/crypto/scrypt.ts +0 -114
  1191. package/src.ts/crypto/sha2.ts +0 -78
  1192. package/src.ts/crypto/signature.ts +0 -145
  1193. package/src.ts/crypto/signing-key.ts +0 -126
  1194. package/src.ts/hash/authorization.ts +0 -38
  1195. package/src.ts/hash/id.ts +0 -17
  1196. package/src.ts/hash/index.ts +0 -18
  1197. package/src.ts/hash/message.ts +0 -51
  1198. package/src.ts/hash/namehash.ts +0 -101
  1199. package/src.ts/hash/solidity.ts +0 -117
  1200. package/src.ts/hash/typed-data.ts +0 -658
  1201. package/src.ts/index.ts +0 -12
  1202. package/src.ts/providers/abstract-provider.ts +0 -1761
  1203. package/src.ts/providers/abstract-signer.ts +0 -314
  1204. package/src.ts/providers/community.ts +0 -49
  1205. package/src.ts/providers/contracts.ts +0 -42
  1206. package/src.ts/providers/default-provider.ts +0 -96
  1207. package/src.ts/providers/ens-resolver.ts +0 -606
  1208. package/src.ts/providers/format.ts +0 -320
  1209. package/src.ts/providers/formatting.ts +0 -418
  1210. package/src.ts/providers/index.ts +0 -125
  1211. package/src.ts/providers/network.ts +0 -327
  1212. package/src.ts/providers/pagination.ts +0 -8
  1213. package/src.ts/providers/plugin-fallback.ts +0 -35
  1214. package/src.ts/providers/plugins-network.ts +0 -281
  1215. package/src.ts/providers/provider-browser.ts +0 -334
  1216. package/src.ts/providers/provider-fallback.ts +0 -801
  1217. package/src.ts/providers/provider-ipcsocket-browser.ts +0 -3
  1218. package/src.ts/providers/provider-ipcsocket.ts +0 -81
  1219. package/src.ts/providers/provider-jsonrpc.ts +0 -1334
  1220. package/src.ts/providers/provider-socket.ts +0 -352
  1221. package/src.ts/providers/provider-websocket.ts +0 -103
  1222. package/src.ts/providers/provider.ts +0 -2136
  1223. package/src.ts/providers/signer-noncemanager.ts +0 -98
  1224. package/src.ts/providers/signer.ts +0 -166
  1225. package/src.ts/providers/subscriber-connection.ts +0 -74
  1226. package/src.ts/providers/subscriber-filterid.ts +0 -199
  1227. package/src.ts/providers/subscriber-polling.ts +0 -321
  1228. package/src.ts/providers/ws-browser.ts +0 -11
  1229. package/src.ts/providers/ws.ts +0 -3
  1230. package/src.ts/quantumcoin.ts +0 -219
  1231. package/src.ts/thirdparty.d.ts +0 -16
  1232. package/src.ts/transaction/accesslist.ts +0 -43
  1233. package/src.ts/transaction/address.ts +0 -35
  1234. package/src.ts/transaction/authorization.ts +0 -14
  1235. package/src.ts/transaction/index.ts +0 -51
  1236. package/src.ts/transaction/transaction.ts +0 -1349
  1237. package/src.ts/utils/base58.ts +0 -73
  1238. package/src.ts/utils/base64-browser.ts +0 -25
  1239. package/src.ts/utils/base64.ts +0 -56
  1240. package/src.ts/utils/data.ts +0 -199
  1241. package/src.ts/utils/errors.ts +0 -793
  1242. package/src.ts/utils/events.ts +0 -105
  1243. package/src.ts/utils/fetch.ts +0 -970
  1244. package/src.ts/utils/fixednumber.ts +0 -643
  1245. package/src.ts/utils/geturl-browser.ts +0 -81
  1246. package/src.ts/utils/geturl.ts +0 -134
  1247. package/src.ts/utils/index.ts +0 -95
  1248. package/src.ts/utils/maths.ts +0 -240
  1249. package/src.ts/utils/properties.ts +0 -60
  1250. package/src.ts/utils/rlp-decode.ts +0 -104
  1251. package/src.ts/utils/rlp-encode.ts +0 -64
  1252. package/src.ts/utils/rlp.ts +0 -20
  1253. package/src.ts/utils/test.txt +0 -0
  1254. package/src.ts/utils/units.ts +0 -91
  1255. package/src.ts/utils/utf8.ts +0 -325
  1256. package/src.ts/utils/uuid.ts +0 -36
  1257. package/src.ts/wallet/base-wallet.ts +0 -160
  1258. package/src.ts/wallet/index.ts +0 -32
  1259. package/src.ts/wallet/json-keystore.ts +0 -108
  1260. package/src.ts/wallet/utils.ts +0 -147
  1261. package/src.ts/wallet/wallet.ts +0 -138
  1262. package/src.ts/wordlists/bit-reader.ts +0 -35
  1263. package/src.ts/wordlists/decode-owl.ts +0 -58
  1264. package/src.ts/wordlists/decode-owla.ts +0 -33
  1265. package/src.ts/wordlists/generation/encode-latin.ts +0 -370
  1266. package/src.ts/wordlists/index.ts +0 -26
  1267. package/src.ts/wordlists/lang-cz.ts +0 -33
  1268. package/src.ts/wordlists/lang-en.ts +0 -33
  1269. package/src.ts/wordlists/lang-es.ts +0 -35
  1270. package/src.ts/wordlists/lang-fr.ts +0 -34
  1271. package/src.ts/wordlists/lang-it.ts +0 -33
  1272. package/src.ts/wordlists/lang-ja.ts +0 -181
  1273. package/src.ts/wordlists/lang-ko.ts +0 -104
  1274. package/src.ts/wordlists/lang-pt.ts +0 -34
  1275. package/src.ts/wordlists/lang-zh.ts +0 -112
  1276. package/src.ts/wordlists/wordlist-owl.ts +0 -77
  1277. package/src.ts/wordlists/wordlist-owla.ts +0 -41
  1278. package/src.ts/wordlists/wordlist.ts +0 -59
  1279. package/src.ts/wordlists/wordlists-browser.ts +0 -8
  1280. package/src.ts/wordlists/wordlists-extra.ts +0 -9
  1281. 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
- }