quantumcoin 7.0.14 → 8.0.0

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 (414) hide show
  1. package/README-SDK.md +46 -0
  2. package/README.md +1 -1
  3. package/generate-sdk.js +8 -6
  4. package/package.json +22 -4
  5. package/src/abi/interface.d.ts +133 -128
  6. package/src/abi/js-abi-coder.d.ts +8 -8
  7. package/src/constants.d.ts +61 -61
  8. package/src/contract/contract-factory.d.ts +28 -28
  9. package/src/contract/contract.d.ts +121 -113
  10. package/src/contract/index.d.ts +1 -0
  11. package/src/errors/index.d.ts +10 -2
  12. package/src/errors/index.js +1 -1
  13. package/src/generator/index.d.ts +109 -81
  14. package/src/index.d.ts +126 -122
  15. package/src/internal/event-emitter.d.ts +76 -0
  16. package/src/internal/event-emitter.js +144 -0
  17. package/src/internal/hex.d.ts +27 -4
  18. package/src/internal/hex.js +7 -3
  19. package/src/providers/extra-providers.d.ts +141 -139
  20. package/src/providers/extra-providers.js +15 -1
  21. package/src/providers/index.d.ts +18 -17
  22. package/src/providers/json-rpc-provider.d.ts +1 -0
  23. package/src/providers/provider.d.ts +233 -206
  24. package/src/providers/provider.js +41 -1
  25. package/src/utils/encoding.js +16 -4
  26. package/src/utils/fixednumber.d.ts +57 -57
  27. package/src/utils/hashing.d.ts +79 -76
  28. package/src/utils/hashing.js +68 -177
  29. package/src/utils/index.d.ts +1 -1
  30. package/src/utils/rlp.js +1 -1
  31. package/src/wallet/wallet.d.ts +54 -19
  32. package/src/wallet/wallet.js +48 -10
  33. package/.github/workflows/publish-npmjs.yaml +0 -22
  34. package/.gitignore +0 -15
  35. package/examples/AllSolidityTypes.sol +0 -184
  36. package/examples/SimpleIERC20.sol +0 -74
  37. package/examples/events.js +0 -41
  38. package/examples/events.ts +0 -35
  39. package/examples/example-generated-sdk-js/README.md +0 -65
  40. package/examples/example-generated-sdk-js/examples/_test-wallet.js +0 -17
  41. package/examples/example-generated-sdk-js/examples/deploy.js +0 -41
  42. package/examples/example-generated-sdk-js/examples/events.js +0 -36
  43. package/examples/example-generated-sdk-js/examples/read-operations.js +0 -46
  44. package/examples/example-generated-sdk-js/examples/write-operations.js +0 -44
  45. package/examples/example-generated-sdk-js/index.d.ts +0 -1
  46. package/examples/example-generated-sdk-js/index.js +0 -15
  47. package/examples/example-generated-sdk-js/package-lock.json +0 -59
  48. package/examples/example-generated-sdk-js/package.json +0 -22
  49. package/examples/example-generated-sdk-js/src/SimpleERC20.d.ts +0 -19
  50. package/examples/example-generated-sdk-js/src/SimpleERC20.js +0 -353
  51. package/examples/example-generated-sdk-js/src/SimpleERC20__factory.d.ts +0 -10
  52. package/examples/example-generated-sdk-js/src/SimpleERC20__factory.js +0 -29
  53. package/examples/example-generated-sdk-js/src/index.d.ts +0 -4
  54. package/examples/example-generated-sdk-js/src/index.js +0 -5
  55. package/examples/example-generated-sdk-js/src/quantumcoin-shims.d.ts +0 -23
  56. package/examples/example-generated-sdk-js/src/types.d.ts +0 -3
  57. package/examples/example-generated-sdk-js/src/types.js +0 -3
  58. package/examples/example-generated-sdk-js/test/e2e/SimpleERC20.e2e.test.js +0 -78
  59. package/examples/example-generated-sdk-ts/README.md +0 -65
  60. package/examples/example-generated-sdk-ts/examples/_test-wallet.js +0 -17
  61. package/examples/example-generated-sdk-ts/examples/deploy.js +0 -41
  62. package/examples/example-generated-sdk-ts/examples/events.js +0 -36
  63. package/examples/example-generated-sdk-ts/examples/read-operations.js +0 -46
  64. package/examples/example-generated-sdk-ts/examples/write-operations.js +0 -44
  65. package/examples/example-generated-sdk-ts/index.d.ts +0 -1
  66. package/examples/example-generated-sdk-ts/index.js +0 -15
  67. package/examples/example-generated-sdk-ts/package-lock.json +0 -59
  68. package/examples/example-generated-sdk-ts/package.json +0 -23
  69. package/examples/example-generated-sdk-ts/src/SimpleERC20.ts +0 -334
  70. package/examples/example-generated-sdk-ts/src/SimpleERC20__factory.ts +0 -28
  71. package/examples/example-generated-sdk-ts/src/index.ts +0 -4
  72. package/examples/example-generated-sdk-ts/src/quantumcoin-shims.d.ts +0 -23
  73. package/examples/example-generated-sdk-ts/src/types.ts +0 -4
  74. package/examples/example-generated-sdk-ts/test/e2e/SimpleERC20.e2e.test.js +0 -78
  75. package/examples/example-generated-sdk-ts/tsconfig.json +0 -14
  76. package/examples/example-generator-sdk-js.js +0 -100
  77. package/examples/example-generator-sdk-js.ts +0 -77
  78. package/examples/example-generator-sdk-ts.js +0 -100
  79. package/examples/example-generator-sdk-ts.ts +0 -77
  80. package/examples/example.js +0 -67
  81. package/examples/example.ts +0 -56
  82. package/examples/node_modules/.bin/esbuild +0 -16
  83. package/examples/node_modules/.bin/esbuild.cmd +0 -17
  84. package/examples/node_modules/.bin/esbuild.ps1 +0 -28
  85. package/examples/node_modules/.bin/sdkgen +0 -16
  86. package/examples/node_modules/.bin/sdkgen.cmd +0 -17
  87. package/examples/node_modules/.bin/sdkgen.ps1 +0 -28
  88. package/examples/node_modules/.bin/tsx +0 -16
  89. package/examples/node_modules/.bin/tsx.cmd +0 -17
  90. package/examples/node_modules/.bin/tsx.ps1 +0 -28
  91. package/examples/node_modules/.package-lock.json +0 -144
  92. package/examples/node_modules/@esbuild/win32-x64/README.md +0 -3
  93. package/examples/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
  94. package/examples/node_modules/@esbuild/win32-x64/package.json +0 -20
  95. package/examples/node_modules/esbuild/LICENSE.md +0 -21
  96. package/examples/node_modules/esbuild/README.md +0 -3
  97. package/examples/node_modules/esbuild/bin/esbuild +0 -223
  98. package/examples/node_modules/esbuild/install.js +0 -289
  99. package/examples/node_modules/esbuild/lib/main.d.ts +0 -716
  100. package/examples/node_modules/esbuild/lib/main.js +0 -2532
  101. package/examples/node_modules/esbuild/package.json +0 -49
  102. package/examples/node_modules/get-tsconfig/LICENSE +0 -21
  103. package/examples/node_modules/get-tsconfig/README.md +0 -235
  104. package/examples/node_modules/get-tsconfig/dist/index.cjs +0 -7
  105. package/examples/node_modules/get-tsconfig/dist/index.d.cts +0 -2088
  106. package/examples/node_modules/get-tsconfig/dist/index.d.mts +0 -2088
  107. package/examples/node_modules/get-tsconfig/dist/index.mjs +0 -7
  108. package/examples/node_modules/get-tsconfig/package.json +0 -46
  109. package/examples/node_modules/quantum-coin-js-sdk/LICENSE +0 -21
  110. package/examples/node_modules/quantum-coin-js-sdk/LICENSE-wasm_exec.js.txt +0 -30
  111. package/examples/node_modules/quantum-coin-js-sdk/README.md +0 -1675
  112. package/examples/node_modules/quantum-coin-js-sdk/example/README.md +0 -14
  113. package/examples/node_modules/quantum-coin-js-sdk/example/conversion-example.js +0 -19
  114. package/examples/node_modules/quantum-coin-js-sdk/example/example-create-contract.js +0 -396
  115. package/examples/node_modules/quantum-coin-js-sdk/example/example-encode-decode-rlp.js +0 -225
  116. package/examples/node_modules/quantum-coin-js-sdk/example/example-event-pack-unpack.js +0 -391
  117. package/examples/node_modules/quantum-coin-js-sdk/example/example-misc.js +0 -101
  118. package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send-signRawTransaction.js +0 -318
  119. package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send.js +0 -116
  120. package/examples/node_modules/quantum-coin-js-sdk/example/example-send.js +0 -70
  121. package/examples/node_modules/quantum-coin-js-sdk/example/example-token-pack-unpack.js +0 -961
  122. package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet-version4.js +0 -35
  123. package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet.js +0 -43
  124. package/examples/node_modules/quantum-coin-js-sdk/example/example.js +0 -405
  125. package/examples/node_modules/quantum-coin-js-sdk/example/package-lock.json +0 -134
  126. package/examples/node_modules/quantum-coin-js-sdk/example/package.json +0 -15
  127. package/examples/node_modules/quantum-coin-js-sdk/index.d.ts +0 -1031
  128. package/examples/node_modules/quantum-coin-js-sdk/index.js +0 -3144
  129. package/examples/node_modules/quantum-coin-js-sdk/package.json +0 -34
  130. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-32.json +0 -1
  131. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-36.json +0 -1
  132. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-48.json +0 -1
  133. package/examples/node_modules/quantum-coin-js-sdk/tests/generate-verify-vectors.js +0 -91
  134. package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.preinit.test.js +0 -41
  135. package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.test.js +0 -1389
  136. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-keytype5-context-null.test.js +0 -107
  137. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-transaction.test.js +0 -196
  138. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-verify.test.js +0 -311
  139. package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.relay.test.js +0 -131
  140. package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.rpc.test.js +0 -103
  141. package/examples/node_modules/quantum-coin-js-sdk/tests/verify-vectors.json +0 -95035
  142. package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.d.ts +0 -9
  143. package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.js +0 -16
  144. package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.d.ts +0 -0
  145. package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.js +0 -587
  146. package/examples/node_modules/resolve-pkg-maps/LICENSE +0 -21
  147. package/examples/node_modules/resolve-pkg-maps/README.md +0 -216
  148. package/examples/node_modules/resolve-pkg-maps/dist/index.cjs +0 -1
  149. package/examples/node_modules/resolve-pkg-maps/dist/index.d.cts +0 -11
  150. package/examples/node_modules/resolve-pkg-maps/dist/index.d.mts +0 -11
  151. package/examples/node_modules/resolve-pkg-maps/dist/index.mjs +0 -1
  152. package/examples/node_modules/resolve-pkg-maps/package.json +0 -42
  153. package/examples/node_modules/seed-words/.github/workflows/publish-npmjs.yaml +0 -22
  154. package/examples/node_modules/seed-words/BUILD.md +0 -7
  155. package/examples/node_modules/seed-words/LICENSE +0 -121
  156. package/examples/node_modules/seed-words/README.md +0 -67
  157. package/examples/node_modules/seed-words/dist/seedwords.d.ts +0 -39
  158. package/examples/node_modules/seed-words/package.json +0 -27
  159. package/examples/node_modules/seed-words/seedwords.js +0 -315
  160. package/examples/node_modules/seed-words/seedwords.txt +0 -65536
  161. package/examples/node_modules/seed-words/tsconfig.json +0 -21
  162. package/examples/node_modules/tsx/LICENSE +0 -21
  163. package/examples/node_modules/tsx/README.md +0 -32
  164. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +0 -1
  165. package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +0 -35
  166. package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +0 -35
  167. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +0 -1
  168. package/examples/node_modules/tsx/dist/cjs/index.cjs +0 -1
  169. package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
  170. package/examples/node_modules/tsx/dist/cli.cjs +0 -54
  171. package/examples/node_modules/tsx/dist/cli.mjs +0 -55
  172. package/examples/node_modules/tsx/dist/client-BQVF1NaW.mjs +0 -1
  173. package/examples/node_modules/tsx/dist/client-D6NvIMSC.cjs +0 -1
  174. package/examples/node_modules/tsx/dist/esm/api/index.cjs +0 -1
  175. package/examples/node_modules/tsx/dist/esm/api/index.d.cts +0 -35
  176. package/examples/node_modules/tsx/dist/esm/api/index.d.mts +0 -35
  177. package/examples/node_modules/tsx/dist/esm/api/index.mjs +0 -1
  178. package/examples/node_modules/tsx/dist/esm/index.cjs +0 -2
  179. package/examples/node_modules/tsx/dist/esm/index.mjs +0 -2
  180. package/examples/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +0 -1
  181. package/examples/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +0 -1
  182. package/examples/node_modules/tsx/dist/index-7AaEi15b.mjs +0 -14
  183. package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +0 -1
  184. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
  185. package/examples/node_modules/tsx/dist/index-gckBtVBf.cjs +0 -14
  186. package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +0 -3
  187. package/examples/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +0 -3
  188. package/examples/node_modules/tsx/dist/loader.cjs +0 -1
  189. package/examples/node_modules/tsx/dist/loader.mjs +0 -1
  190. package/examples/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +0 -1
  191. package/examples/node_modules/tsx/dist/node-features-roYmp9jK.cjs +0 -1
  192. package/examples/node_modules/tsx/dist/package-CeBgXWuR.mjs +0 -1
  193. package/examples/node_modules/tsx/dist/package-Dxt5kIHw.cjs +0 -1
  194. package/examples/node_modules/tsx/dist/patch-repl.cjs +0 -1
  195. package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
  196. package/examples/node_modules/tsx/dist/preflight.cjs +0 -1
  197. package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
  198. package/examples/node_modules/tsx/dist/register-2sWVXuRQ.cjs +0 -1
  199. package/examples/node_modules/tsx/dist/register-B7jrtLTO.mjs +0 -1
  200. package/examples/node_modules/tsx/dist/register-CFH5oNdT.mjs +0 -4
  201. package/examples/node_modules/tsx/dist/register-D46fvsV_.cjs +0 -4
  202. package/examples/node_modules/tsx/dist/repl.cjs +0 -3
  203. package/examples/node_modules/tsx/dist/repl.mjs +0 -3
  204. package/examples/node_modules/tsx/dist/require-D4F1Lv60.cjs +0 -1
  205. package/examples/node_modules/tsx/dist/require-DQxpCAr4.mjs +0 -1
  206. package/examples/node_modules/tsx/dist/suppress-warnings.cjs +0 -1
  207. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  208. package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
  209. package/examples/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +0 -1
  210. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
  211. package/examples/node_modules/tsx/package.json +0 -68
  212. package/examples/offline-signing.js +0 -77
  213. package/examples/offline-signing.ts +0 -65
  214. package/examples/package-lock.json +0 -596
  215. package/examples/package.json +0 -32
  216. package/examples/read-operations.js +0 -32
  217. package/examples/read-operations.ts +0 -31
  218. package/examples/sdk-generator-erc20.inline.json +0 -251
  219. package/examples/solidity-types.ts +0 -43
  220. package/examples/wallet-offline.js +0 -36
  221. package/examples/wallet-offline.ts +0 -26
  222. package/scripts/copy-declarations.js +0 -31
  223. package/scripts/run-all-one-by-one.js +0 -151
  224. package/test/e2e/all-solidity-types.dynamic.test.js +0 -207
  225. package/test/e2e/all-solidity-types.dynamic.test.ts +0 -191
  226. package/test/e2e/all-solidity-types.fixtures.js +0 -231
  227. package/test/e2e/all-solidity-types.generated-sdks.e2e.test.js +0 -387
  228. package/test/e2e/all-solidity-types.generated-sdks.e2e.test.ts +0 -350
  229. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/README.md +0 -83
  230. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/artifacts/AllSolidityTypes.abi.json +0 -12544
  231. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/artifacts/AllSolidityTypes.bin +0 -1
  232. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/_test-wallet.js +0 -17
  233. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/_test-wallet.ts +0 -10
  234. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/deploy.js +0 -41
  235. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/deploy.ts +0 -41
  236. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/events.js +0 -36
  237. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/events.ts +0 -36
  238. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/offline-signing.js +0 -82
  239. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/offline-signing.ts +0 -80
  240. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/read-operations.js +0 -46
  241. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/read-operations.ts +0 -44
  242. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/write-operations.js +0 -44
  243. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/write-operations.ts +0 -44
  244. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/index.d.ts +0 -1
  245. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/index.js +0 -21
  246. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/package-lock.json +0 -597
  247. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/package.json +0 -25
  248. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes.d.ts +0 -1280
  249. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes.js +0 -14021
  250. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes__factory.d.ts +0 -11
  251. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes__factory.js +0 -31
  252. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/index.d.ts +0 -4
  253. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/index.js +0 -5
  254. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/quantumcoin-shims.d.ts +0 -25
  255. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/types.d.ts +0 -3
  256. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/types.js +0 -3
  257. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/test/e2e/AllSolidityTypes.e2e.test.js +0 -77
  258. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/test/e2e/AllSolidityTypes.extra.test.js +0 -195
  259. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/README.md +0 -83
  260. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/artifacts/AllSolidityTypes.abi.json +0 -12544
  261. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/artifacts/AllSolidityTypes.bin +0 -1
  262. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/_test-wallet.js +0 -17
  263. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/_test-wallet.ts +0 -10
  264. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/deploy.js +0 -41
  265. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/deploy.ts +0 -41
  266. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/events.js +0 -36
  267. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/events.ts +0 -36
  268. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/offline-signing.js +0 -82
  269. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/offline-signing.ts +0 -80
  270. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/read-operations.js +0 -46
  271. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/read-operations.ts +0 -44
  272. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/write-operations.js +0 -44
  273. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/write-operations.ts +0 -44
  274. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/index.d.ts +0 -1
  275. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/index.js +0 -21
  276. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/package-lock.json +0 -597
  277. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/package.json +0 -26
  278. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/AllSolidityTypes.ts +0 -13940
  279. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/AllSolidityTypes__factory.ts +0 -31
  280. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/index.ts +0 -4
  281. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/quantumcoin-shims.d.ts +0 -25
  282. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/types.ts +0 -4
  283. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/test/e2e/AllSolidityTypes.e2e.test.js +0 -77
  284. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/test/e2e/AllSolidityTypes.extra.test.js +0 -195
  285. package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/tsconfig.json +0 -18
  286. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/README.md +0 -74
  287. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/artifacts/SimpleERC20.abi.json +0 -245
  288. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/artifacts/SimpleERC20.bin +0 -1
  289. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/_test-wallet.js +0 -17
  290. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/_test-wallet.ts +0 -10
  291. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/deploy.js +0 -41
  292. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/deploy.ts +0 -41
  293. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/events.js +0 -36
  294. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/events.ts +0 -36
  295. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/offline-signing.js +0 -82
  296. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/offline-signing.ts +0 -80
  297. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/read-operations.js +0 -46
  298. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/read-operations.ts +0 -44
  299. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/write-operations.js +0 -44
  300. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/write-operations.ts +0 -44
  301. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/index.d.ts +0 -1
  302. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/index.js +0 -16
  303. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/package-lock.json +0 -597
  304. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/package.json +0 -25
  305. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20.d.ts +0 -24
  306. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20.js +0 -378
  307. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20__factory.d.ts +0 -10
  308. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20__factory.js +0 -31
  309. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/index.d.ts +0 -4
  310. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/index.js +0 -5
  311. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/quantumcoin-shims.d.ts +0 -25
  312. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/types.d.ts +0 -3
  313. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/types.js +0 -3
  314. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/test/e2e/SimpleERC20.e2e.test.js +0 -90
  315. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/README.md +0 -74
  316. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/artifacts/SimpleERC20.abi.json +0 -245
  317. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/artifacts/SimpleERC20.bin +0 -1
  318. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/_test-wallet.js +0 -17
  319. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/_test-wallet.ts +0 -10
  320. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/deploy.js +0 -41
  321. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/deploy.ts +0 -41
  322. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/events.js +0 -36
  323. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/events.ts +0 -36
  324. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/offline-signing.js +0 -82
  325. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/offline-signing.ts +0 -80
  326. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/read-operations.js +0 -46
  327. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/read-operations.ts +0 -44
  328. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/write-operations.js +0 -44
  329. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/write-operations.ts +0 -44
  330. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/index.d.ts +0 -1
  331. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/index.js +0 -16
  332. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/package-lock.json +0 -597
  333. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/package.json +0 -26
  334. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/SimpleERC20.ts +0 -361
  335. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/SimpleERC20__factory.ts +0 -30
  336. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/index.ts +0 -4
  337. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/quantumcoin-shims.d.ts +0 -25
  338. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/types.ts +0 -4
  339. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/test/e2e/SimpleERC20.e2e.test.js +0 -90
  340. package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/tsconfig.json +0 -18
  341. package/test/e2e/generator-interface.e2e.test.js +0 -165
  342. package/test/e2e/generator-interface.e2e.test.ts +0 -160
  343. package/test/e2e/helpers.js +0 -59
  344. package/test/e2e/signing-context-and-fee.e2e.test.js +0 -141
  345. package/test/e2e/signing-context-and-fee.e2e.test.ts +0 -128
  346. package/test/e2e/simple-erc20.generated-sdks.e2e.test.js +0 -168
  347. package/test/e2e/simple-erc20.generated-sdks.e2e.test.ts +0 -141
  348. package/test/e2e/transactional.test.js +0 -245
  349. package/test/e2e/transactional.test.ts +0 -208
  350. package/test/e2e/typed-generator.e2e.test.js +0 -407
  351. package/test/e2e/typed-generator.e2e.test.ts +0 -337
  352. package/test/fixtures/ConstructorParam.sol +0 -23
  353. package/test/fixtures/MultiContracts.sol +0 -37
  354. package/test/fixtures/SimpleStorage.sol +0 -18
  355. package/test/fixtures/StakingContract.abi.json +0 -1
  356. package/test/integration/ipc-provider.test.js +0 -49
  357. package/test/integration/ipc-provider.test.ts +0 -44
  358. package/test/integration/provider.test.js +0 -88
  359. package/test/integration/provider.test.ts +0 -85
  360. package/test/integration/ws-provider.test.js +0 -41
  361. package/test/integration/ws-provider.test.ts +0 -38
  362. package/test/security/abi-decoder-bounds.test.js +0 -122
  363. package/test/security/contract-overrides.test.js +0 -112
  364. package/test/security/generator-injection.test.js +0 -195
  365. package/test/security/malformed-input.test.js +0 -330
  366. package/test/security/malformed-input.test.ts +0 -35
  367. package/test/security/rpc-numeric-bounds.test.js +0 -81
  368. package/test/security/rpc-trust.test.js +0 -202
  369. package/test/unit/_encrypted-output.txt +0 -6
  370. package/test/unit/_log-encrypted-jsons.js +0 -45
  371. package/test/unit/_write-keystore-fixture.js +0 -16
  372. package/test/unit/abi-interface.test.js +0 -110
  373. package/test/unit/abi-interface.test.ts +0 -109
  374. package/test/unit/address-wallet.test.js +0 -923
  375. package/test/unit/address-wallet.test.ts +0 -877
  376. package/test/unit/browser-provider.test.js +0 -85
  377. package/test/unit/browser-provider.test.ts +0 -79
  378. package/test/unit/contract.test.js +0 -85
  379. package/test/unit/contract.test.ts +0 -83
  380. package/test/unit/encoding-units-rlp.test.js +0 -127
  381. package/test/unit/encoding-units-rlp.test.ts +0 -91
  382. package/test/unit/errors.test.js +0 -77
  383. package/test/unit/errors.test.ts +0 -76
  384. package/test/unit/filter-by-blockhash.test.js +0 -55
  385. package/test/unit/filter-by-blockhash.test.ts +0 -54
  386. package/test/unit/fixednumber.test.js +0 -656
  387. package/test/unit/fixednumber.test.ts +0 -660
  388. package/test/unit/fixtures/encrypted-keystores-48-32-36.js +0 -9
  389. package/test/unit/generate-contract-cli.test.js +0 -42
  390. package/test/unit/generate-contract-cli.test.ts +0 -41
  391. package/test/unit/generate-sdk-artifacts-json.test.js +0 -113
  392. package/test/unit/generate-sdk-artifacts-json.test.ts +0 -110
  393. package/test/unit/generator.test.js +0 -149
  394. package/test/unit/generator.test.ts +0 -148
  395. package/test/unit/hashing.test.js +0 -64
  396. package/test/unit/hashing.test.ts +0 -63
  397. package/test/unit/init.test.js +0 -39
  398. package/test/unit/init.test.ts +0 -38
  399. package/test/unit/interface.test.js +0 -56
  400. package/test/unit/interface.test.ts +0 -54
  401. package/test/unit/internal-hex.test.js +0 -81
  402. package/test/unit/internal-hex.test.ts +0 -80
  403. package/test/unit/populate-transaction.test.js +0 -98
  404. package/test/unit/populate-transaction.test.ts +0 -64
  405. package/test/unit/providers.test.js +0 -252
  406. package/test/unit/providers.test.ts +0 -251
  407. package/test/unit/result.test.js +0 -80
  408. package/test/unit/result.test.ts +0 -79
  409. package/test/unit/solidity-types.test.js +0 -49
  410. package/test/unit/solidity-types.test.ts +0 -39
  411. package/test/unit/utils.test.js +0 -57
  412. package/test/unit/utils.test.ts +0 -56
  413. package/test/verbose-logger.js +0 -74
  414. package/tsconfig.build.json +0 -14
package/README-SDK.md CHANGED
@@ -12,6 +12,7 @@ This document is the **complete, detailed SDK reference** for QuantumCoin.js (et
12
12
  - [Install](#install)
13
13
  - [Initialization (required)](#initialization-required)
14
14
  - [Key differences vs ethers/Ethereum](#key-differences-vs-ethersethereum)
15
+ - [Platform support (Node.js and browser)](#platform-support-nodejs-and-browser)
15
16
  - [Configuration (`quantumcoin/config`)](#configuration-quantumcoinconfig)
16
17
  - [`Config`](#config)
17
18
  - [`Initialize(config)`](#initializeconfig)
@@ -100,6 +101,43 @@ await Initialize(new Config(123123, "https://public.rpc.quantumcoinapi.com"));
100
101
  - **Signing and ABI encoding/decoding** are delegated to `quantum-coin-js-sdk` (WASM)
101
102
  - **Initialize must be called** once at startup for wallet/address/ABI helpers
102
103
 
104
+ ### Platform support (Node.js and browser)
105
+
106
+ QuantumCoin.js is **platform agnostic** and runs in both Node.js (20+) and modern
107
+ browsers. It does **not** depend on Node's built-in `crypto` module: all
108
+ cryptographic primitives (`keccak256`, `sha256`, `sha512`, `ripemd160`,
109
+ `computeHmac`, `pbkdf2`, `scrypt`/`scryptSync`) are provided by
110
+ `quantum-coin-js-sdk` (WebAssembly), and `randomBytes` uses the standard Web
111
+ Crypto API (`globalThis.crypto`).
112
+
113
+ Because the crypto primitives come from `quantum-coin-js-sdk`, **the hashing and
114
+ KDF helpers require `Initialize()` to have completed** before use. Calling them
115
+ beforehand throws a `NOT_INITIALIZED` error:
116
+
117
+ ```js
118
+ const qc = require("quantumcoin");
119
+ const { Initialize } = require("quantumcoin/config");
120
+
121
+ await Initialize(null);
122
+ qc.keccak256(qc.toUtf8Bytes("hello")); // ok after Initialize()
123
+ ```
124
+
125
+ Notes for browser usage:
126
+
127
+ - Bundle your app with a browser bundler (esbuild, webpack, Vite, Rollup, etc.).
128
+ `quantum-coin-js-sdk` ships its WASM embedded, so no extra asset fetching or
129
+ `wasm_exec.js` wiring is required — just `require`/`import` the SDK and call
130
+ `Initialize()`.
131
+ - The `IpcSocketProvider` (Unix domain socket / named pipe transport) is
132
+ **Node-only**; it lazily loads `node:net` and throws `NOT_IMPLEMENTED` in the
133
+ browser. `JsonRpcProvider` (via `fetch`), `WebSocketProvider` (via
134
+ `globalThis.WebSocket`) and `BrowserProvider` (EIP-1193) all work in browsers.
135
+ The package's `browser` field maps `node:net` to `false` so bundlers can drop
136
+ the IPC code path.
137
+
138
+ The browser surface is validated by an automated headless-browser suite
139
+ (`npm run test:browser`, Playwright + esbuild).
140
+
103
141
  ## Configuration (`quantumcoin/config`)
104
142
 
105
143
  ### `Config`
@@ -184,6 +222,7 @@ Base provider implementation. Subclasses implement `_perform`.
184
222
  - `getTransactionCount(address: string, blockTag?: string | null): Promise<number>`
185
223
  - `call(tx: TransactionRequest, blockTag?: string | null): Promise<string>`
186
224
  - `estimateGas(tx: TransactionRequest): Promise<bigint>`
225
+ - `getFeeData(walletOrKeyType: Wallet | number, fullSign?: boolean | null): Promise<FeeData>` — returns fee data for a wallet (its key type is read via `getKeyType()`) or for a key type number (`3` or `5`) passed directly. `fullSign` applies only to key type `3` (full signing costs more gas) and is ignored for key type `5`. `FeeData` currently exposes a single field `gasPrice: bigint`, the price **per unit of gas** in wei (so the total transaction fee is `gasPrice * gasLimit`). Only DynamicFeeTx (dynamic-fee) transactions are supported; the EIP-1559 fields `maxFeePerGas` / `maxPriorityFeePerGas` are **not supported yet** (QuantumCoin has no base-fee / priority-tip model) and are absent from `FeeData`. Like ethers, this is a provider method; later releases may issue a network call (hence the `Promise`).
187
226
  - `getCode(address: string, blockTag?: string | null): Promise<string>`
188
227
  - `getStorageAt(address: string, position: bigint, blockTag?: string | null): Promise<string>`
189
228
  - `getLogs(filter: Filter | FilterByBlockHash): Promise<Log[]>`
@@ -403,6 +442,7 @@ User-facing wallet class.
403
442
  - `connect(provider: AbstractProvider): Wallet`
404
443
  - `getPhrase(): string[] | null` — returns the seed phrase (list of words) when the wallet has a seed, else `null`. Works for `createRandom`, `fromPhrase`, `fromSeed`, and `fromEncryptedJsonSync` on a version-5 keystore. Returns `null` for `fromKeys` and for v3/v4 keystores.
405
444
  - `getSigningContext(fullSign?: boolean | null): number` — returns the recommended signing context for this wallet (based on public key type). Setting `fullSign` to `true` may incur additional gas cost.
445
+ - `getKeyType(): number` — returns the wallet's key type, derived from its public key length: `3` (HYBRIDEDMLDSASLHDSA) or `5` (HYBRIDEDMLDSASLHDSA5). The key type drives gas-price selection in `getFeeData`. Throws for an unsupported public key size.
406
446
 
407
447
  **Seed & phrase applicability**
408
448
 
@@ -645,6 +685,12 @@ const asOutput: Uint256 = 123n;
645
685
  - `scrypt(password: BytesLike, salt: BytesLike, N: number, r: number, p: number, dkLen: number): Promise<string>`
646
686
  - `scryptSync(password: BytesLike, salt: BytesLike, N: number, r: number, p: number, dkLen: number): string`
647
687
 
688
+ > These helpers are backed by `quantum-coin-js-sdk` (WASM) and therefore require
689
+ > `Initialize()` to have completed first; otherwise they throw a
690
+ > `NOT_INITIALIZED` error. `computeHmac` and `pbkdf2` support the `"sha256"`
691
+ > (default) and `"sha512"` algorithms. `randomBytes` uses the Web Crypto API and
692
+ > works without initialization.
693
+
648
694
  ### Units
649
695
 
650
696
  - `formatUnits(value: BigNumberish, decimals?: number): string`
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## QuantumCoin.js
6
6
 
7
- QuantumCoin.js is an **ethers.js v6-compatible** SDK surface for the QuantumCoin blockchain.
7
+ QuantumCoin.js is a SDK for the QuantumCoin blockchain that maintains close compatibility with **ethers.js v6**.
8
8
 
9
9
  Key differences vs Ethereum/ethers:
10
10
 
package/generate-sdk.js CHANGED
@@ -1744,11 +1744,13 @@ function _createPackageScaffold({ outDir, pkgName, pkgDesc, pkgAuthor, pkgLicens
1744
1744
  const outLang = _normalizeLang(lang);
1745
1745
  const isTs = outLang === "ts";
1746
1746
 
1747
- const rootPkg = _readRootPackageJson();
1748
- const rootDeps = _rewriteFileDepsToAbsolute(rootPkg.dependencies || {}, __dirname);
1749
-
1750
- // Ensure the generated package depends on this repo's quantumcoin via absolute file path.
1751
- rootDeps.quantumcoin = `file:${__dirname.replace(/\\\\/g, "/")}`;
1747
+ // The generated SDK only imports from "quantumcoin" (and "quantumcoin/config").
1748
+ // quantum-coin-js-sdk and seed-words are pulled in transitively via quantumcoin,
1749
+ // so we intentionally do NOT copy them as direct dependencies here — the
1750
+ // generated package.json lists only the minimum it actually needs.
1751
+ const dependencies = {
1752
+ quantumcoin: `file:${__dirname.replace(/\\\\/g, "/")}`,
1753
+ };
1752
1754
 
1753
1755
  const pkgJson = {
1754
1756
  name: pkgName,
@@ -1774,7 +1776,7 @@ function _createPackageScaffold({ outDir, pkgName, pkgDesc, pkgAuthor, pkgLicens
1774
1776
  "test:e2e": "node --test --test-concurrency=1 \"test/e2e/**/*.test.js\"",
1775
1777
  }),
1776
1778
  },
1777
- dependencies: rootDeps,
1779
+ dependencies,
1778
1780
  devDependencies: {},
1779
1781
  };
1780
1782
 
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "quantumcoin",
3
- "version": "7.0.14",
3
+ "version": "8.0.0",
4
4
  "description": "QuantumCoin.js - a post quantum cryptography SDK for QuantumCoin",
5
5
  "main": "index.js",
6
6
  "types": "src/index.d.ts",
7
+ "browser": {
8
+ "node:net": false
9
+ },
7
10
  "typesVersions": {
8
11
  "*": {
9
12
  "types": [
@@ -43,6 +46,8 @@
43
46
  "test:ts:integration": "npx tsx --test \"test/integration/**/*.test.ts\"",
44
47
  "test:ts:security": "npx tsx --test \"test/security/**/*.test.ts\"",
45
48
  "test:ts:e2e": "npx tsx --test --test-concurrency=1 \"test/e2e/*.test.ts\" \"test/e2e/*.e2e.test.ts\" \"test/e2e/*.dynamic.test.ts\"",
49
+ "test:browser:build": "node test/browser/build.js",
50
+ "test:browser": "npm run test:browser:build && npx playwright test",
46
51
  "example": "node examples/example.js",
47
52
  "example:ts": "npx tsx examples/example.ts",
48
53
  "example:provider": "node examples/example.js",
@@ -67,7 +72,15 @@
67
72
  "url": "git+https://github.com/quantumcoinproject/quantumcoin.js.git"
68
73
  },
69
74
  "files": [
70
- "**"
75
+ "index.js",
76
+ "config.js",
77
+ "config.d.ts",
78
+ "generate-sdk.js",
79
+ "src/**/*.js",
80
+ "src/**/*.d.ts",
81
+ "README.md",
82
+ "README-SDK.md",
83
+ "LICENSE"
71
84
  ],
72
85
  "keywords": [
73
86
  "cryptography",
@@ -86,10 +99,15 @@
86
99
  "sdkgen": "./generate-sdk.js"
87
100
  },
88
101
  "devDependencies": {
102
+ "@playwright/test": "^1.61.1",
103
+ "esbuild": "^0.28.1",
89
104
  "tsx": "^4.19.0"
90
105
  },
91
106
  "dependencies": {
92
- "seed-words": "^1.0.2",
93
- "quantum-coin-js-sdk": "1.0.36"
107
+ "quantum-coin-js-sdk": "2.1.1",
108
+ "seed-words": "^1.1.1"
109
+ },
110
+ "allowScripts": {
111
+ "esbuild@0.28.1": true
94
112
  }
95
113
  }
@@ -1,128 +1,133 @@
1
- export class Interface {
2
- /**
3
- * @param {any[]|Interface} abi
4
- */
5
- constructor(abi: any[] | Interface);
6
- abi: any;
7
- _abiJson: string;
8
- _qcsdkAbi: any[];
9
- _qcsdkAbiJson: string;
10
- /**
11
- * Returns JSON format of ABI.
12
- * @returns {string}
13
- */
14
- formatJson(): string;
15
- /**
16
- * Internal: normalized ABI JSON for qcsdk.
17
- * @returns {string}
18
- */
19
- _qcsdkFormatJson(): string;
20
- /**
21
- * Internal: normalize argument values for qcsdk based on original ABI params.
22
- * @param {Array<any>} params
23
- * @param {Array<any>} values
24
- * @returns {Array<any>}
25
- */
26
- _qcsdkNormalizeValues(params: Array<any>, values: Array<any>): Array<any>;
27
- /**
28
- * Basic formatter (ethers supports multiple formats).
29
- * @param {string=} format
30
- * @returns {string}
31
- */
32
- format(format?: string | undefined): string;
33
- /**
34
- * Get a function fragment by name (first match).
35
- * @param {string} nameOrSignature
36
- * @returns {FunctionFragment}
37
- */
38
- getFunction(nameOrSignature: string): FunctionFragment;
39
- /**
40
- * Get an event fragment by name (first match).
41
- * @param {string} nameOrSignature
42
- * @returns {EventFragment}
43
- */
44
- getEvent(nameOrSignature: string): EventFragment;
45
- /**
46
- * Get an error fragment by name (first match).
47
- * @param {string} nameOrSignature
48
- * @returns {ErrorFragment}
49
- */
50
- getError(nameOrSignature: string): ErrorFragment;
51
- /**
52
- * Returns the constructor fragment if present.
53
- * @returns {ConstructorFragment|null}
54
- */
55
- getConstructor(): ConstructorFragment | null;
56
- /**
57
- * Encode function data using quantum-coin-js-sdk.
58
- * @param {FunctionFragment|string} functionFragment
59
- * @param {any[]} values
60
- * @returns {string}
61
- */
62
- encodeFunctionData(functionFragment: FunctionFragment | string, values: any[]): string;
63
- /**
64
- * Decode function result using quantum-coin-js-sdk.
65
- * @param {FunctionFragment|string} functionFragment
66
- * @param {string} data
67
- * @returns {any}
68
- */
69
- decodeFunctionResult(functionFragment: FunctionFragment | string, data: string): any;
70
- /**
71
- * Encode an event log from values.
72
- * @param {EventFragment|any} eventFragment
73
- * @param {any[]} values
74
- * @returns {{ topics: string[], data: string }}
75
- */
76
- encodeEventLog(eventFragment: EventFragment | any, values: any[]): {
77
- topics: string[];
78
- data: string;
79
- };
80
- /**
81
- * Decode an event log.
82
- * @param {EventFragment|any} eventFragment
83
- * @param {string[]} topics
84
- * @param {string} data
85
- * @returns {any}
86
- */
87
- decodeEventLog(eventFragment: EventFragment | any, topics: string[], data: string): any;
88
- parseTransaction(): void;
89
- parseLog(...args: any[]): {
90
- fragment: EventFragment;
91
- name: any;
92
- signature: any;
93
- topic: string;
94
- args: Result;
95
- };
96
- parseError(): void;
97
- getSighash(): void;
98
- getEventTopic(): void;
99
- getFallback(): any;
100
- getReceive(): any;
101
- }
102
- export class AbiCoder {
103
- /**
104
- * Encode values by types into ABI data.
105
- * @param {(string|any)[]} types
106
- * @param {any[]} values
107
- * @returns {string}
108
- */
109
- encode(types: (string | any)[], values: any[]): string;
110
- /**
111
- * Decode ABI data by output types.
112
- * @param {(string|any)[]} types
113
- * @param {string} data
114
- * @returns {any}
115
- */
116
- decode(types: (string | any)[], data: string): any;
117
- /**
118
- * Return a default value for types.
119
- * @param {(string|any)[]} types
120
- * @returns {any}
121
- */
122
- getDefaultValue(types: (string | any)[]): any;
123
- }
124
- import { FunctionFragment } from "./fragments";
125
- import { EventFragment } from "./fragments";
126
- import { ErrorFragment } from "./fragments";
127
- import { ConstructorFragment } from "./fragments";
128
- import { Result } from "../utils/result";
1
+ export class Interface {
2
+ /**
3
+ * @param {any[]|Interface} abi
4
+ */
5
+ constructor(abi: any[] | Interface);
6
+ abi: any;
7
+ _abiJson: string;
8
+ _qcsdkAbi: any[];
9
+ _qcsdkAbiJson: string;
10
+ /**
11
+ * Returns JSON format of ABI.
12
+ * @returns {string}
13
+ */
14
+ formatJson(): string;
15
+ /**
16
+ * Internal: normalized ABI JSON for qcsdk.
17
+ * @returns {string}
18
+ */
19
+ _qcsdkFormatJson(): string;
20
+ /**
21
+ * Internal: normalize argument values for qcsdk based on original ABI params.
22
+ * @param {Array<any>} params
23
+ * @param {Array<any>} values
24
+ * @returns {Array<any>}
25
+ */
26
+ _qcsdkNormalizeValues(params: Array<any>, values: Array<any>): Array<any>;
27
+ /**
28
+ * Basic formatter (ethers supports multiple formats).
29
+ * @param {string=} format
30
+ * @returns {string}
31
+ */
32
+ format(format?: string | undefined): string;
33
+ /**
34
+ * Get a function fragment by name (first match).
35
+ * @param {string} nameOrSignature
36
+ * @returns {FunctionFragment}
37
+ */
38
+ getFunction(nameOrSignature: string): FunctionFragment;
39
+ /**
40
+ * Get an event fragment by name (first match).
41
+ * @param {string} nameOrSignature
42
+ * @returns {EventFragment}
43
+ */
44
+ getEvent(nameOrSignature: string): EventFragment;
45
+ /**
46
+ * Get an error fragment by name (first match).
47
+ * @param {string} nameOrSignature
48
+ * @returns {ErrorFragment}
49
+ */
50
+ getError(nameOrSignature: string): ErrorFragment;
51
+ /**
52
+ * Returns the constructor fragment if present.
53
+ * @returns {ConstructorFragment|null}
54
+ */
55
+ getConstructor(): ConstructorFragment | null;
56
+ /**
57
+ * Encode function data using quantum-coin-js-sdk.
58
+ * @param {FunctionFragment|string} functionFragment
59
+ * @param {any[]} values
60
+ * @returns {string}
61
+ */
62
+ encodeFunctionData(functionFragment: FunctionFragment | string, values: any[]): string;
63
+ /**
64
+ * Decode function result using quantum-coin-js-sdk.
65
+ * @param {FunctionFragment|string} functionFragment
66
+ * @param {string} data
67
+ * @returns {any}
68
+ */
69
+ decodeFunctionResult(functionFragment: FunctionFragment | string, data: string): any;
70
+ /**
71
+ * Encode an event log from values.
72
+ * @param {EventFragment|any} eventFragment
73
+ * @param {any[]} values
74
+ * @returns {{ topics: string[], data: string }}
75
+ */
76
+ encodeEventLog(eventFragment: EventFragment | any, values: any[]): {
77
+ topics: string[];
78
+ data: string;
79
+ };
80
+ /**
81
+ * Decode an event log.
82
+ * @param {EventFragment|any} eventFragment
83
+ * @param {string[]} topics
84
+ * @param {string} data
85
+ * @returns {any}
86
+ */
87
+ decodeEventLog(eventFragment: EventFragment | any, topics: string[], data: string): any;
88
+ parseTransaction(): void;
89
+ parseLog(...args: any[]): {
90
+ fragment: EventFragment;
91
+ name: any;
92
+ signature: any;
93
+ topic: string;
94
+ args: Result;
95
+ };
96
+ parseError(): void;
97
+ getSighash(): void;
98
+ /**
99
+ * Compute the topic0 (event signature hash) for an event.
100
+ * @param {string|EventFragment|any} nameOrFragment
101
+ * @returns {string} normalized 0x-prefixed topic hash
102
+ */
103
+ getEventTopic(nameOrFragment: string | EventFragment | any): string;
104
+ getFallback(): null;
105
+ getReceive(): null;
106
+ }
107
+ export class AbiCoder {
108
+ /**
109
+ * Encode values by types into ABI data.
110
+ * @param {(string|any)[]} types
111
+ * @param {any[]} values
112
+ * @returns {string}
113
+ */
114
+ encode(types: (string | any)[], values: any[]): string;
115
+ /**
116
+ * Decode ABI data by output types.
117
+ * @param {(string|any)[]} types
118
+ * @param {string} data
119
+ * @returns {any}
120
+ */
121
+ decode(types: (string | any)[], data: string): any;
122
+ /**
123
+ * Return a default value for types.
124
+ * @param {(string|any)[]} types
125
+ * @returns {any}
126
+ */
127
+ getDefaultValue(types: (string | any)[]): any;
128
+ }
129
+ import { FunctionFragment } from "./fragments";
130
+ import { EventFragment } from "./fragments";
131
+ import { ErrorFragment } from "./fragments";
132
+ import { ConstructorFragment } from "./fragments";
133
+ import { Result } from "../utils/result";
@@ -1,8 +1,8 @@
1
- export function hasTuple(params: any): boolean;
2
- export function hasNestedArrays(params: any): boolean;
3
- export function needsJsAbi(params: any): boolean;
4
- export function canonicalType(param: any): any;
5
- export function functionSelectorHex(name: any, inputs: any): string;
6
- export function encodeFunctionData(name: any, inputs: any, values: any): string;
7
- export function encodeTupleLike(params: any, values: any): Uint8Array<any>;
8
- export function decodeFunctionResult(outputs: any, dataHex: any): any[];
1
+ export function hasTuple(params: any): boolean;
2
+ export function hasNestedArrays(params: any): boolean;
3
+ export function needsJsAbi(params: any): boolean;
4
+ export function canonicalType(param: any): any;
5
+ export function functionSelectorHex(name: any, inputs: any): string;
6
+ export function encodeFunctionData(name: any, inputs: any, values: any): string;
7
+ export function encodeTupleLike(params: any, values: any, depth: any): Uint8Array<any>;
8
+ export function decodeFunctionResult(outputs: any, dataHex: any): any[];
@@ -1,61 +1,61 @@
1
- /**
2
- * The current version of the QuantumCoin.js library.
3
- * @type {string}
4
- */
5
- export const version: string;
6
- /**
7
- * The zero address (32 bytes).
8
- * @type {string}
9
- */
10
- export const ZeroAddress: string;
11
- /**
12
- * The zero hash (32 bytes).
13
- * @type {string}
14
- */
15
- export const ZeroHash: string;
16
- /**
17
- * The maximum value for a uint256.
18
- * @type {bigint}
19
- */
20
- export const MaxUint256: bigint;
21
- /**
22
- * The maximum value for a uint160.
23
- * @type {bigint}
24
- */
25
- export const MaxUint160: bigint;
26
- /**
27
- * The minimum value for an int256.
28
- * @type {bigint}
29
- */
30
- export const MinInt256: bigint;
31
- /**
32
- * The maximum value for an int256.
33
- * @type {bigint}
34
- */
35
- export const MaxInt256: bigint;
36
- /**
37
- * Error code for numeric faults.
38
- * @type {string}
39
- */
40
- export const NumericFault: string;
41
- /**
42
- * Error code for numeric faults (alias).
43
- * @type {string}
44
- */
45
- export const NumericFaultCode: string;
46
- /**
47
- * Wei per coin (1e18).
48
- * @type {bigint}
49
- */
50
- export const WeiPerEther: bigint;
51
- /**
52
- * Currency symbol (compat with ethers.js v6).
53
- * @type {string}
54
- */
55
- export const EtherSymbol: string;
56
- /**
57
- * BigNumber constant (exported as `N` in ethers.js v6).
58
- * In QuantumCoin.js, this is a bigint constant.
59
- * @type {bigint}
60
- */
61
- export const N: bigint;
1
+ /**
2
+ * The current version of the QuantumCoin.js library.
3
+ * @type {string}
4
+ */
5
+ export const version: string;
6
+ /**
7
+ * The zero address (32 bytes).
8
+ * @type {string}
9
+ */
10
+ export const ZeroAddress: string;
11
+ /**
12
+ * The zero hash (32 bytes).
13
+ * @type {string}
14
+ */
15
+ export const ZeroHash: string;
16
+ /**
17
+ * The maximum value for a uint256.
18
+ * @type {bigint}
19
+ */
20
+ export const MaxUint256: bigint;
21
+ /**
22
+ * The maximum value for a uint160.
23
+ * @type {bigint}
24
+ */
25
+ export const MaxUint160: bigint;
26
+ /**
27
+ * The minimum value for an int256.
28
+ * @type {bigint}
29
+ */
30
+ export const MinInt256: bigint;
31
+ /**
32
+ * The maximum value for an int256.
33
+ * @type {bigint}
34
+ */
35
+ export const MaxInt256: bigint;
36
+ /**
37
+ * Error code for numeric faults.
38
+ * @type {string}
39
+ */
40
+ export const NumericFault: string;
41
+ /**
42
+ * Error code for numeric faults (alias).
43
+ * @type {string}
44
+ */
45
+ export const NumericFaultCode: string;
46
+ /**
47
+ * Wei per coin (1e18).
48
+ * @type {bigint}
49
+ */
50
+ export const WeiPerEther: bigint;
51
+ /**
52
+ * Currency symbol (compat with ethers.js v6).
53
+ * @type {string}
54
+ */
55
+ export const EtherSymbol: string;
56
+ /**
57
+ * BigNumber constant (exported as `N` in ethers.js v6).
58
+ * In QuantumCoin.js, this is a bigint constant.
59
+ * @type {bigint}
60
+ */
61
+ export const N: bigint;
@@ -1,28 +1,28 @@
1
- export class ContractFactory {
2
- /**
3
- * @param {any[]|Interface} abi
4
- * @param {string} bytecode
5
- * @param {any} signer
6
- */
7
- constructor(abi: any[] | Interface, bytecode: string, signer: any);
8
- abi: any;
9
- interface: Interface;
10
- bytecode: string;
11
- signer: any;
12
- /**
13
- * Compute deploy transaction request.
14
- * @param {...any} args
15
- * @returns {import("../providers/provider").TransactionRequest}
16
- */
17
- getDeployTransaction(...args: any[]): import("../providers/provider").TransactionRequest;
18
- /**
19
- * Deploy contract.
20
- * @param {...any} args
21
- * @returns {Promise<Contract>}
22
- */
23
- deploy(...args: any[]): Promise<Contract>;
24
- attach(address: any): Contract;
25
- connect(signer: any): ContractFactory;
26
- }
27
- import { Interface } from "../abi/interface";
28
- import { Contract } from "./contract";
1
+ export class ContractFactory {
2
+ /**
3
+ * @param {any[]|Interface} abi
4
+ * @param {string} bytecode
5
+ * @param {any} signer
6
+ */
7
+ constructor(abi: any[] | Interface, bytecode: string, signer: any);
8
+ abi: any;
9
+ interface: Interface;
10
+ bytecode: string;
11
+ signer: any;
12
+ /**
13
+ * Compute deploy transaction request.
14
+ * @param {...any} args
15
+ * @returns {import("../providers/provider").TransactionRequest}
16
+ */
17
+ getDeployTransaction(...args: any[]): import("../providers/provider").TransactionRequest;
18
+ /**
19
+ * Deploy contract.
20
+ * @param {...any} args
21
+ * @returns {Promise<Contract>}
22
+ */
23
+ deploy(...args: any[]): Promise<Contract>;
24
+ attach(address: any): Contract;
25
+ connect(signer: any): ContractFactory;
26
+ }
27
+ import { Interface } from "../abi/interface";
28
+ import { Contract } from "./contract";