quantumcoin 7.0.10 → 7.0.12

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 (171) hide show
  1. package/README-SDK.md +16 -5
  2. package/README.md +14 -3
  3. package/config.js +10 -2
  4. package/examples/example.js +0 -5
  5. package/examples/example.ts +0 -5
  6. package/examples/node_modules/.bin/esbuild +16 -0
  7. package/examples/node_modules/.bin/esbuild.cmd +17 -0
  8. package/examples/node_modules/.bin/esbuild.ps1 +28 -0
  9. package/examples/node_modules/.bin/sdkgen +16 -0
  10. package/examples/node_modules/.bin/sdkgen.cmd +17 -0
  11. package/examples/node_modules/.bin/sdkgen.ps1 +28 -0
  12. package/examples/node_modules/.bin/tsx +16 -0
  13. package/examples/node_modules/.bin/tsx.cmd +17 -0
  14. package/examples/node_modules/.bin/tsx.ps1 +28 -0
  15. package/examples/node_modules/.package-lock.json +144 -0
  16. package/examples/node_modules/@esbuild/win32-x64/README.md +3 -0
  17. package/examples/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
  18. package/examples/node_modules/@esbuild/win32-x64/package.json +20 -0
  19. package/examples/node_modules/esbuild/LICENSE.md +21 -0
  20. package/examples/node_modules/esbuild/README.md +3 -0
  21. package/examples/node_modules/esbuild/bin/esbuild +223 -0
  22. package/examples/node_modules/esbuild/install.js +289 -0
  23. package/examples/node_modules/esbuild/lib/main.d.ts +716 -0
  24. package/examples/node_modules/esbuild/lib/main.js +2532 -0
  25. package/examples/node_modules/esbuild/package.json +49 -0
  26. package/examples/node_modules/get-tsconfig/LICENSE +21 -0
  27. package/examples/node_modules/get-tsconfig/README.md +235 -0
  28. package/examples/node_modules/get-tsconfig/dist/index.cjs +7 -0
  29. package/examples/node_modules/get-tsconfig/dist/index.d.cts +2088 -0
  30. package/examples/node_modules/get-tsconfig/dist/index.d.mts +2088 -0
  31. package/examples/node_modules/get-tsconfig/dist/index.mjs +7 -0
  32. package/examples/node_modules/get-tsconfig/package.json +46 -0
  33. package/examples/node_modules/quantum-coin-js-sdk/LICENSE +21 -0
  34. package/examples/node_modules/quantum-coin-js-sdk/LICENSE-wasm_exec.js.txt +30 -0
  35. package/examples/node_modules/quantum-coin-js-sdk/README.md +1675 -0
  36. package/examples/node_modules/quantum-coin-js-sdk/example/README.md +14 -0
  37. package/examples/node_modules/quantum-coin-js-sdk/example/conversion-example.js +19 -0
  38. package/examples/node_modules/quantum-coin-js-sdk/example/example-create-contract.js +396 -0
  39. package/examples/node_modules/quantum-coin-js-sdk/example/example-encode-decode-rlp.js +225 -0
  40. package/examples/node_modules/quantum-coin-js-sdk/example/example-event-pack-unpack.js +391 -0
  41. package/examples/node_modules/quantum-coin-js-sdk/example/example-misc.js +101 -0
  42. package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send-signRawTransaction.js +318 -0
  43. package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send.js +116 -0
  44. package/examples/node_modules/quantum-coin-js-sdk/example/example-send.js +70 -0
  45. package/examples/node_modules/quantum-coin-js-sdk/example/example-token-pack-unpack.js +961 -0
  46. package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet-version4.js +35 -0
  47. package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet.js +43 -0
  48. package/examples/node_modules/quantum-coin-js-sdk/example/example.js +405 -0
  49. package/examples/node_modules/quantum-coin-js-sdk/example/package-lock.json +134 -0
  50. package/examples/node_modules/quantum-coin-js-sdk/example/package.json +15 -0
  51. package/examples/node_modules/quantum-coin-js-sdk/index.d.ts +1031 -0
  52. package/examples/node_modules/quantum-coin-js-sdk/index.js +3144 -0
  53. package/examples/node_modules/quantum-coin-js-sdk/package.json +34 -0
  54. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-32.json +1 -0
  55. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-36.json +1 -0
  56. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-48.json +1 -0
  57. package/examples/node_modules/quantum-coin-js-sdk/tests/generate-verify-vectors.js +91 -0
  58. package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.preinit.test.js +41 -0
  59. package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.test.js +1389 -0
  60. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-keytype5-context-null.test.js +107 -0
  61. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-transaction.test.js +196 -0
  62. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-verify.test.js +311 -0
  63. package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.relay.test.js +131 -0
  64. package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.rpc.test.js +103 -0
  65. package/examples/node_modules/quantum-coin-js-sdk/tests/verify-vectors.json +95035 -0
  66. package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.d.ts +9 -0
  67. package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.js +16 -0
  68. package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.d.ts +0 -0
  69. package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.js +587 -0
  70. package/examples/node_modules/resolve-pkg-maps/LICENSE +21 -0
  71. package/examples/node_modules/resolve-pkg-maps/README.md +216 -0
  72. package/examples/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
  73. package/examples/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
  74. package/examples/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
  75. package/examples/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
  76. package/examples/node_modules/resolve-pkg-maps/package.json +42 -0
  77. package/examples/node_modules/seed-words/.github/workflows/publish-npmjs.yaml +22 -0
  78. package/examples/node_modules/seed-words/BUILD.md +7 -0
  79. package/examples/node_modules/seed-words/LICENSE +121 -0
  80. package/examples/node_modules/seed-words/README.md +67 -0
  81. package/examples/node_modules/seed-words/dist/seedwords.d.ts +39 -0
  82. package/examples/node_modules/seed-words/package.json +27 -0
  83. package/examples/node_modules/seed-words/seedwords.js +315 -0
  84. package/examples/node_modules/seed-words/seedwords.txt +65536 -0
  85. package/examples/node_modules/seed-words/tsconfig.json +21 -0
  86. package/examples/node_modules/tsx/LICENSE +21 -0
  87. package/examples/node_modules/tsx/README.md +32 -0
  88. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -0
  89. package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
  90. package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
  91. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
  92. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -0
  93. package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -0
  94. package/examples/node_modules/tsx/dist/cli.cjs +54 -0
  95. package/examples/node_modules/tsx/dist/cli.mjs +55 -0
  96. package/examples/node_modules/tsx/dist/client-BQVF1NaW.mjs +1 -0
  97. package/examples/node_modules/tsx/dist/client-D6NvIMSC.cjs +1 -0
  98. package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -0
  99. package/examples/node_modules/tsx/dist/esm/api/index.d.cts +35 -0
  100. package/examples/node_modules/tsx/dist/esm/api/index.d.mts +35 -0
  101. package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -0
  102. package/examples/node_modules/tsx/dist/esm/index.cjs +2 -0
  103. package/examples/node_modules/tsx/dist/esm/index.mjs +2 -0
  104. package/examples/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +1 -0
  105. package/examples/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +1 -0
  106. package/examples/node_modules/tsx/dist/index-7AaEi15b.mjs +14 -0
  107. package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +1 -0
  108. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
  109. package/examples/node_modules/tsx/dist/index-gckBtVBf.cjs +14 -0
  110. package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
  111. package/examples/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +3 -0
  112. package/examples/node_modules/tsx/dist/loader.cjs +1 -0
  113. package/examples/node_modules/tsx/dist/loader.mjs +1 -0
  114. package/examples/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +1 -0
  115. package/examples/node_modules/tsx/dist/node-features-roYmp9jK.cjs +1 -0
  116. package/examples/node_modules/tsx/dist/package-CeBgXWuR.mjs +1 -0
  117. package/examples/node_modules/tsx/dist/package-Dxt5kIHw.cjs +1 -0
  118. package/examples/node_modules/tsx/dist/patch-repl.cjs +1 -0
  119. package/examples/node_modules/tsx/dist/patch-repl.mjs +1 -0
  120. package/examples/node_modules/tsx/dist/preflight.cjs +1 -0
  121. package/examples/node_modules/tsx/dist/preflight.mjs +1 -0
  122. package/examples/node_modules/tsx/dist/register-2sWVXuRQ.cjs +1 -0
  123. package/examples/node_modules/tsx/dist/register-B7jrtLTO.mjs +1 -0
  124. package/examples/node_modules/tsx/dist/register-CFH5oNdT.mjs +4 -0
  125. package/examples/node_modules/tsx/dist/register-D46fvsV_.cjs +4 -0
  126. package/examples/node_modules/tsx/dist/repl.cjs +3 -0
  127. package/examples/node_modules/tsx/dist/repl.mjs +3 -0
  128. package/examples/node_modules/tsx/dist/require-D4F1Lv60.cjs +1 -0
  129. package/examples/node_modules/tsx/dist/require-DQxpCAr4.mjs +1 -0
  130. package/examples/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
  131. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
  132. package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +1 -0
  133. package/examples/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +1 -0
  134. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
  135. package/examples/node_modules/tsx/package.json +68 -0
  136. package/examples/offline-signing.js +0 -2
  137. package/examples/offline-signing.ts +0 -1
  138. package/examples/package-lock.json +422 -73
  139. package/examples/package.json +1 -1
  140. package/examples/wallet-offline.js +1 -9
  141. package/examples/wallet-offline.ts +1 -9
  142. package/generate-sdk.js +5 -7
  143. package/package.json +2 -2
  144. package/src/abi/interface.js +13 -7
  145. package/src/abi/js-abi-coder.js +23 -18
  146. package/src/constants.d.ts +0 -5
  147. package/src/constants.js +0 -7
  148. package/src/contract/contract-factory.js +9 -3
  149. package/src/contract/contract.js +9 -3
  150. package/src/errors/index.js +12 -0
  151. package/src/index.d.ts +0 -3
  152. package/src/providers/extra-providers.js +20 -6
  153. package/src/providers/json-rpc-provider.js +15 -5
  154. package/src/providers/provider.d.ts +0 -2
  155. package/src/providers/provider.js +1 -3
  156. package/src/utils/address.d.ts +0 -14
  157. package/src/utils/address.js +12 -49
  158. package/src/utils/hashing.d.ts +0 -6
  159. package/src/utils/hashing.js +8 -23
  160. package/src/utils/index.d.ts +0 -3
  161. package/src/utils/rlp.js +7 -4
  162. package/src/wallet/wallet.d.ts +7 -13
  163. package/src/wallet/wallet.js +136 -97
  164. package/test/security/malformed-input.test.js +295 -1
  165. package/test/unit/address-wallet.test.js +329 -129
  166. package/test/unit/address-wallet.test.ts +328 -128
  167. package/test/unit/hashing.test.js +0 -11
  168. package/test/unit/hashing.test.ts +0 -11
  169. package/test/unit/providers.test.js +3 -1
  170. package/test/unit/providers.test.ts +3 -1
  171. package/SPEC.md +0 -3845
@@ -0,0 +1,1675 @@
1
+ <a name="module_quantum-coin-js-sdk"></a>
2
+
3
+ ## quantum-coin-js-sdk
4
+ Quantum Coin JS SDK provides low level functionality to interact with the Quantum Coin Blockchain.
5
+ [Example Project](https://github.com/quantumcoinproject/quantum-coin-js-sdk/tree/main/example)
6
+
7
+ **Example**
8
+ ```js
9
+ Requires Node.js version v20.18.1 or higher
10
+
11
+ Installation:
12
+ npm install quantum-coin-js-sdk --save
13
+
14
+ //Adding reference:
15
+ var qcsdk = require('quantum-coin-js-sdk');
16
+
17
+ //Example initialization with defaults for mainnet
18
+ //Initialize the SDK first before invoking any other function
19
+ qcsdk.initialize(null).then((initResult) => {
20
+
21
+ }
22
+
23
+ //Example initialization with specific values
24
+ //Initialize the SDK first before invoking any other function
25
+ var clientConfigVal = new qcsdk.Config("https://sdk.readrelay.quantumcoinapi.com", "https://sdk.writerelay.quantumcoinapi.com", 123123, "", ""); //Initialization with Mainnet Config (Block Explorer: https://QuantumScan.com)
26
+ qcsdk.initialize(clientConfigVal).then((initResult) => {
27
+
28
+ }
29
+ Example Project: https://github.com/quantumcoinproject/quantum-coin-js-sdk/tree/main/example
30
+ ```
31
+
32
+ * [quantum-coin-js-sdk](#module_quantum-coin-js-sdk)
33
+ * [~Config](#module_quantum-coin-js-sdk..Config)
34
+ * [new Config(readUrl, writeUrl, chainId, readApiKey, writeApiKey)](#new_module_quantum-coin-js-sdk..Config_new)
35
+ * [.readUrl](#module_quantum-coin-js-sdk..Config+readUrl) : <code>string</code>
36
+ * [.writeUrl](#module_quantum-coin-js-sdk..Config+writeUrl) : <code>string</code>
37
+ * [.chainId](#module_quantum-coin-js-sdk..Config+chainId) : <code>number</code>
38
+ * [.readApiKey](#module_quantum-coin-js-sdk..Config+readApiKey) : <code>string</code>
39
+ * [.writeApiKey](#module_quantum-coin-js-sdk..Config+writeApiKey) : <code>string</code>
40
+ * [~Wallet](#module_quantum-coin-js-sdk..Wallet)
41
+ * [new Wallet(address, privateKey, publicKey, [preExpansionSeed])](#new_module_quantum-coin-js-sdk..Wallet_new)
42
+ * [.address](#module_quantum-coin-js-sdk..Wallet+address) : <code>string</code>
43
+ * [.privateKey](#module_quantum-coin-js-sdk..Wallet+privateKey) : <code>Array.&lt;number&gt;</code>
44
+ * [.publicKey](#module_quantum-coin-js-sdk..Wallet+publicKey) : <code>Array.&lt;number&gt;</code>
45
+ * [.preExpansionSeed](#module_quantum-coin-js-sdk..Wallet+preExpansionSeed) : <code>Uint8Array</code> \| <code>Array.&lt;number&gt;</code> \| <code>null</code>
46
+ * [~BlockDetails](#module_quantum-coin-js-sdk..BlockDetails)
47
+ * [.blockNumber](#module_quantum-coin-js-sdk..BlockDetails+blockNumber) : <code>number</code>
48
+ * [~LatestBlockDetailsResult](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
49
+ * [.resultCode](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+resultCode) : <code>number</code>
50
+ * [.blockDetails](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+blockDetails) : <code>BlockDetails</code>
51
+ * [.response](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+response) : <code>Object</code>
52
+ * [.requestId](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+requestId) : <code>string</code>
53
+ * [.err](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+err) : <code>Error</code>
54
+ * [~AccountDetails](#module_quantum-coin-js-sdk..AccountDetails)
55
+ * [.address](#module_quantum-coin-js-sdk..AccountDetails+address) : <code>string</code>
56
+ * [.balance](#module_quantum-coin-js-sdk..AccountDetails+balance) : <code>string</code>
57
+ * [.nonce](#module_quantum-coin-js-sdk..AccountDetails+nonce) : <code>number</code>
58
+ * [.blockNumber](#module_quantum-coin-js-sdk..AccountDetails+blockNumber) : <code>number</code>
59
+ * [~AccountDetailsResult](#module_quantum-coin-js-sdk..AccountDetailsResult)
60
+ * [.resultCode](#module_quantum-coin-js-sdk..AccountDetailsResult+resultCode) : <code>number</code>
61
+ * [.accountDetails](#module_quantum-coin-js-sdk..AccountDetailsResult+accountDetails) : <code>AccountDetails</code>
62
+ * [.response](#module_quantum-coin-js-sdk..AccountDetailsResult+response) : <code>Object</code>
63
+ * [.requestId](#module_quantum-coin-js-sdk..AccountDetailsResult+requestId) : <code>string</code>
64
+ * [.err](#module_quantum-coin-js-sdk..AccountDetailsResult+err) : <code>Error</code>
65
+ * [~SignResult](#module_quantum-coin-js-sdk..SignResult)
66
+ * [.resultCode](#module_quantum-coin-js-sdk..SignResult+resultCode) : <code>number</code>
67
+ * [.txnHash](#module_quantum-coin-js-sdk..SignResult+txnHash) : <code>string</code>
68
+ * [.txnData](#module_quantum-coin-js-sdk..SignResult+txnData) : <code>string</code>
69
+ * [~SendResult](#module_quantum-coin-js-sdk..SendResult)
70
+ * [.resultCode](#module_quantum-coin-js-sdk..SendResult+resultCode) : <code>number</code>
71
+ * [.txnHash](#module_quantum-coin-js-sdk..SendResult+txnHash) : <code>string</code>
72
+ * [.response](#module_quantum-coin-js-sdk..SendResult+response) : <code>Object</code>
73
+ * [.requestId](#module_quantum-coin-js-sdk..SendResult+requestId) : <code>string</code>
74
+ * [.err](#module_quantum-coin-js-sdk..SendResult+err) : <code>Error</code>
75
+ * [~TransactionReceipt](#module_quantum-coin-js-sdk..TransactionReceipt)
76
+ * [.cumulativeGasUsed](#module_quantum-coin-js-sdk..TransactionReceipt+cumulativeGasUsed) : <code>string</code>
77
+ * [.effectiveGasPrice](#module_quantum-coin-js-sdk..TransactionReceipt+effectiveGasPrice) : <code>string</code>
78
+ * [.gasUsed](#module_quantum-coin-js-sdk..TransactionReceipt+gasUsed) : <code>string</code>
79
+ * [.status](#module_quantum-coin-js-sdk..TransactionReceipt+status) : <code>string</code>
80
+ * [.hash](#module_quantum-coin-js-sdk..TransactionReceipt+hash) : <code>string</code>
81
+ * [.type](#module_quantum-coin-js-sdk..TransactionReceipt+type) : <code>string</code>
82
+ * [~TransactionDetails](#module_quantum-coin-js-sdk..TransactionDetails)
83
+ * [.blockHash](#module_quantum-coin-js-sdk..TransactionDetails+blockHash) : <code>string</code>
84
+ * [.blockNumber](#module_quantum-coin-js-sdk..TransactionDetails+blockNumber) : <code>number</code>
85
+ * [.from](#module_quantum-coin-js-sdk..TransactionDetails+from) : <code>string</code>
86
+ * [.gas](#module_quantum-coin-js-sdk..TransactionDetails+gas) : <code>string</code>
87
+ * [.gasPrice](#module_quantum-coin-js-sdk..TransactionDetails+gasPrice) : <code>string</code>
88
+ * [.hash](#module_quantum-coin-js-sdk..TransactionDetails+hash) : <code>string</code>
89
+ * [.input](#module_quantum-coin-js-sdk..TransactionDetails+input) : <code>string</code>
90
+ * [.nonce](#module_quantum-coin-js-sdk..TransactionDetails+nonce) : <code>number</code>
91
+ * [.to](#module_quantum-coin-js-sdk..TransactionDetails+to) : <code>string</code>
92
+ * [.value](#module_quantum-coin-js-sdk..TransactionDetails+value) : <code>string</code>
93
+ * [.receipt](#module_quantum-coin-js-sdk..TransactionDetails+receipt) : <code>TransactionReceipt</code>
94
+ * [~TransactionDetailsResult](#module_quantum-coin-js-sdk..TransactionDetailsResult)
95
+ * [.resultCode](#module_quantum-coin-js-sdk..TransactionDetailsResult+resultCode) : <code>number</code>
96
+ * [.transactionDetails](#module_quantum-coin-js-sdk..TransactionDetailsResult+transactionDetails) : <code>TransactionDetails</code>
97
+ * [.response](#module_quantum-coin-js-sdk..TransactionDetailsResult+response) : <code>Object</code>
98
+ * [.requestId](#module_quantum-coin-js-sdk..TransactionDetailsResult+requestId) : <code>string</code>
99
+ * [.err](#module_quantum-coin-js-sdk..TransactionDetailsResult+err) : <code>Error</code>
100
+ * [~AccountTransactionCompact](#module_quantum-coin-js-sdk..AccountTransactionCompact)
101
+ * [.blockNumber](#module_quantum-coin-js-sdk..AccountTransactionCompact+blockNumber) : <code>number</code>
102
+ * [.from](#module_quantum-coin-js-sdk..AccountTransactionCompact+from) : <code>string</code>
103
+ * [.hash](#module_quantum-coin-js-sdk..AccountTransactionCompact+hash) : <code>string</code>
104
+ * [.to](#module_quantum-coin-js-sdk..AccountTransactionCompact+to) : <code>string</code>
105
+ * [.value](#module_quantum-coin-js-sdk..AccountTransactionCompact+value) : <code>string</code>
106
+ * [.status](#module_quantum-coin-js-sdk..AccountTransactionCompact+status) : <code>string</code>
107
+ * [~ListAccountTransactionsResponse](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse)
108
+ * [.pageCount](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse+pageCount) : <code>number</code>
109
+ * [.items](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse+items) : <code>AccountTransactionCompact</code> \| <code>Array</code>
110
+ * [~AccountTransactionsResult](#module_quantum-coin-js-sdk..AccountTransactionsResult)
111
+ * [.resultCode](#module_quantum-coin-js-sdk..AccountTransactionsResult+resultCode) : <code>number</code>
112
+ * [.listAccountTransactionsResponse](#module_quantum-coin-js-sdk..AccountTransactionsResult+listAccountTransactionsResponse) : <code>ListAccountTransactionsResponse</code>
113
+ * [.response](#module_quantum-coin-js-sdk..AccountTransactionsResult+response) : <code>Object</code>
114
+ * [.requestId](#module_quantum-coin-js-sdk..AccountTransactionsResult+requestId) : <code>string</code>
115
+ * [.err](#module_quantum-coin-js-sdk..AccountTransactionsResult+err) : <code>Error</code>
116
+ * [~TransactionSigningRequest](#module_quantum-coin-js-sdk..TransactionSigningRequest)
117
+ * [new TransactionSigningRequest(wallet, toAddress, valueInWei, nonce, data, gasLimit, remarks, chainId, signingContext)](#new_module_quantum-coin-js-sdk..TransactionSigningRequest_new)
118
+ * [.wallet](#module_quantum-coin-js-sdk..TransactionSigningRequest+wallet) : <code>Wallet</code>
119
+ * [.toAddress](#module_quantum-coin-js-sdk..TransactionSigningRequest+toAddress) : <code>string</code> \| <code>null</code>
120
+ * [.valueInWei](#module_quantum-coin-js-sdk..TransactionSigningRequest+valueInWei) : <code>string</code> \| <code>BigInt</code> \| <code>null</code>
121
+ * [.nonce](#module_quantum-coin-js-sdk..TransactionSigningRequest+nonce) : <code>number</code>
122
+ * [.data](#module_quantum-coin-js-sdk..TransactionSigningRequest+data) : <code>string</code> \| <code>null</code>
123
+ * [.gasLimit](#module_quantum-coin-js-sdk..TransactionSigningRequest+gasLimit) : <code>number</code>
124
+ * [.remarks](#module_quantum-coin-js-sdk..TransactionSigningRequest+remarks) : <code>string</code> \| <code>null</code>
125
+ * [.chainId](#module_quantum-coin-js-sdk..TransactionSigningRequest+chainId) : <code>number</code> \| <code>null</code>
126
+ * [.signingContext](#module_quantum-coin-js-sdk..TransactionSigningRequest+signingContext) : <code>number</code> \| <code>null</code>
127
+ * [~PackUnpackResult](#module_quantum-coin-js-sdk..PackUnpackResult)
128
+ * [new PackUnpackResult(error, result)](#new_module_quantum-coin-js-sdk..PackUnpackResult_new)
129
+ * [.error](#module_quantum-coin-js-sdk..PackUnpackResult+error) : <code>string</code>
130
+ * [.result](#module_quantum-coin-js-sdk..PackUnpackResult+result) : <code>string</code>
131
+ * [~EventLogEncodeResult](#module_quantum-coin-js-sdk..EventLogEncodeResult)
132
+ * [new EventLogEncodeResult(error, result)](#new_module_quantum-coin-js-sdk..EventLogEncodeResult_new)
133
+ * [.error](#module_quantum-coin-js-sdk..EventLogEncodeResult+error) : <code>string</code>
134
+ * [.result](#module_quantum-coin-js-sdk..EventLogEncodeResult+result) : <code>Object</code> \| <code>null</code>
135
+ * [~EventLogEncodeResult](#module_quantum-coin-js-sdk..EventLogEncodeResult)
136
+ * [new EventLogEncodeResult(error, result)](#new_module_quantum-coin-js-sdk..EventLogEncodeResult_new)
137
+ * [.error](#module_quantum-coin-js-sdk..EventLogEncodeResult+error) : <code>string</code>
138
+ * [.result](#module_quantum-coin-js-sdk..EventLogEncodeResult+result) : <code>Object</code> \| <code>null</code>
139
+ * [~circl](#module_quantum-coin-js-sdk..circl)
140
+ * [~initialize(clientConfig)](#module_quantum-coin-js-sdk..initialize) ⇒ <code>Promise.&lt;boolean&gt;</code>
141
+ * [~isAddressValid(address)](#module_quantum-coin-js-sdk..isAddressValid) ⇒ <code>boolean</code>
142
+ * [~getKeyTypeFromPrivateKey(privateKey)](#module_quantum-coin-js-sdk..getKeyTypeFromPrivateKey) ⇒ <code>number</code> \| <code>null</code>
143
+ * [~getKeyTypeFromPublicKey(publicKey)](#module_quantum-coin-js-sdk..getKeyTypeFromPublicKey) ⇒ <code>number</code> \| <code>null</code>
144
+ * [~toUint8Array(key)](#module_quantum-coin-js-sdk..toUint8Array) ⇒ <code>Uint8Array</code>
145
+ * [~newWallet(keyType)](#module_quantum-coin-js-sdk..newWallet) ⇒ <code>Wallet</code> \| <code>number</code>
146
+ * [~newWalletSeedWords(keyType)](#module_quantum-coin-js-sdk..newWalletSeedWords) ⇒ <code>Array.&lt;string&gt;</code> \| <code>number</code> \| <code>null</code>
147
+ * [~openWalletFromSeed(seedArray)](#module_quantum-coin-js-sdk..openWalletFromSeed) ⇒ <code>Wallet</code> \| <code>number</code> \| <code>null</code>
148
+ * [~openWalletFromSeedWords(seedWordList)](#module_quantum-coin-js-sdk..openWalletFromSeedWords) ⇒ <code>Wallet</code> \| <code>number</code> \| <code>null</code>
149
+ * [~deserializeEncryptedWallet(walletJsonString, passphrase)](#module_quantum-coin-js-sdk..deserializeEncryptedWallet) ⇒ <code>Wallet</code>
150
+ * [~serializeEncryptedWallet(wallet, passphrase)](#module_quantum-coin-js-sdk..serializeEncryptedWallet) ⇒ <code>string</code>
151
+ * [~serializeSeedAsEncryptedWallet(seedArray, passphrase)](#module_quantum-coin-js-sdk..serializeSeedAsEncryptedWallet) ⇒ <code>string</code> \| <code>number</code> \| <code>null</code>
152
+ * [~verifyWallet(wallet)](#module_quantum-coin-js-sdk..verifyWallet) ⇒ <code>boolean</code>
153
+ * [~serializeWallet(wallet)](#module_quantum-coin-js-sdk..serializeWallet) ⇒ <code>string</code>
154
+ * [~deserializeWallet(walletJson)](#module_quantum-coin-js-sdk..deserializeWallet) ⇒ <code>Wallet</code> \| <code>null</code>
155
+ * [~postTransaction(txnData)](#module_quantum-coin-js-sdk..postTransaction) ⇒ <code>Promise.&lt;SendResult&gt;</code>
156
+ * [~getLatestBlockDetails()](#module_quantum-coin-js-sdk..getLatestBlockDetails) ⇒ <code>Promise.&lt;LatestBlockDetailsResult&gt;</code>
157
+ * [~getAccountDetails(address)](#module_quantum-coin-js-sdk..getAccountDetails) ⇒ <code>Promise.&lt;AccountDetailsResult&gt;</code>
158
+ * [~getTransactionDetails(txnHash)](#module_quantum-coin-js-sdk..getTransactionDetails) ⇒ <code>Promise.&lt;TransactionDetailsResult&gt;</code>
159
+ * [~listAccountTransactions(address, pageNumber)](#module_quantum-coin-js-sdk..listAccountTransactions) ⇒ <code>Promise.&lt;AccountTransactionsResult&gt;</code>
160
+ * ~~[~signSendCoinTransaction(wallet, toAddress, coins, nonce)](#module_quantum-coin-js-sdk..signSendCoinTransaction) ⇒ <code>Promise.&lt;SignResult&gt;</code>~~
161
+ * ~~[~signTransaction(wallet, toAddress, coins, nonce, data)](#module_quantum-coin-js-sdk..signTransaction) ⇒ <code>Promise.&lt;SignResult&gt;</code>~~
162
+ * [~hexStringToUint8Array(hex)](#module_quantum-coin-js-sdk..hexStringToUint8Array) ⇒ <code>Uint8Array</code>
163
+ * [~signRawTransaction(transactionSigningRequest)](#module_quantum-coin-js-sdk..signRawTransaction) ⇒ <code>SignResult</code>
164
+ * [~sign(privateKey, message, [signingContext])](#module_quantum-coin-js-sdk..sign) ⇒ <code>Object</code>
165
+ * [~verify(publicKey, signature, message)](#module_quantum-coin-js-sdk..verify) ⇒ <code>Object</code>
166
+ * ~~[~sendCoins(wallet, toAddress, coins, nonce)](#module_quantum-coin-js-sdk..sendCoins) ⇒ <code>Promise.&lt;SendResult&gt;</code>~~
167
+ * [~publicKeyFromSignature(digest, signature)](#module_quantum-coin-js-sdk..publicKeyFromSignature) ⇒ <code>string</code>
168
+ * [~publicKeyFromPrivateKey(privateKey)](#module_quantum-coin-js-sdk..publicKeyFromPrivateKey) ⇒ <code>string</code>
169
+ * [~addressFromPublicKey(publicKey)](#module_quantum-coin-js-sdk..addressFromPublicKey) ⇒ <code>string</code>
170
+ * [~combinePublicKeySignature(publicKey, signature)](#module_quantum-coin-js-sdk..combinePublicKeySignature) ⇒ <code>string</code>
171
+ * [~packMethodData(abiJSON, methodName, ...args)](#module_quantum-coin-js-sdk..packMethodData) ⇒ <code>PackUnpackResult</code>
172
+ * [~unpackMethodData(abiJSON, methodName, hexData)](#module_quantum-coin-js-sdk..unpackMethodData) ⇒ <code>PackUnpackResult</code>
173
+ * [~packCreateContractData(abiJSON, bytecode, ...args)](#module_quantum-coin-js-sdk..packCreateContractData) ⇒ <code>PackUnpackResult</code>
174
+ * [~encodeEventLog(abiJSON, eventName, ...args)](#module_quantum-coin-js-sdk..encodeEventLog) ⇒ <code>EventLogEncodeResult</code>
175
+ * [~decodeEventLog(abiJSON, eventName, topics, data)](#module_quantum-coin-js-sdk..decodeEventLog) ⇒ <code>PackUnpackResult</code>
176
+ * [~encodeRlp(value)](#module_quantum-coin-js-sdk..encodeRlp) ⇒ <code>PackUnpackResult</code>
177
+ * [~decodeRlp(data)](#module_quantum-coin-js-sdk..decodeRlp) ⇒ <code>PackUnpackResult</code>
178
+ * [~createAddress(address, nonce)](#module_quantum-coin-js-sdk..createAddress) ⇒ <code>string</code> \| <code>null</code>
179
+ * [~createAddress2(address, salt, initHash)](#module_quantum-coin-js-sdk..createAddress2) ⇒ <code>string</code> \| <code>null</code>
180
+
181
+ <a name="module_quantum-coin-js-sdk..Config"></a>
182
+
183
+ ### quantum-coin-js-sdk~Config
184
+ This is the configuration class required to initialize and interact with Quantum Coin blockchain
185
+
186
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
187
+ **Access**: public
188
+
189
+ * [~Config](#module_quantum-coin-js-sdk..Config)
190
+ * [new Config(readUrl, writeUrl, chainId, readApiKey, writeApiKey)](#new_module_quantum-coin-js-sdk..Config_new)
191
+ * [.readUrl](#module_quantum-coin-js-sdk..Config+readUrl) : <code>string</code>
192
+ * [.writeUrl](#module_quantum-coin-js-sdk..Config+writeUrl) : <code>string</code>
193
+ * [.chainId](#module_quantum-coin-js-sdk..Config+chainId) : <code>number</code>
194
+ * [.readApiKey](#module_quantum-coin-js-sdk..Config+readApiKey) : <code>string</code>
195
+ * [.writeApiKey](#module_quantum-coin-js-sdk..Config+writeApiKey) : <code>string</code>
196
+
197
+ <a name="new_module_quantum-coin-js-sdk..Config_new"></a>
198
+
199
+ #### new Config(readUrl, writeUrl, chainId, readApiKey, writeApiKey)
200
+ Creates a config class
201
+
202
+
203
+ | Param | Type | Description |
204
+ | --- | --- | --- |
205
+ | readUrl | <code>string</code> | The Read API URL pointing to a read relay. See https://github.com/quantumcoinproject/quantum-coin-go/tree/dogep/relay. The following URLs are community maintained. Please use your own relay service. Mainnet: https://sdk.readrelay.quantumcoinapi.com |
206
+ | writeUrl | <code>string</code> | The Write API URL pointing to a write relay. See https://github.com/quantumcoinproject/quantum-coin-go/tree/dogep/relay. The following URLs are community maintained. Please use your own relay service. Mainnet: https://sdk.writerelay.quantumcoinapi.com |
207
+ | chainId | <code>number</code> | The chain id of the blockchain. Mainnet chainId is 123123. Testnet T4 chainId is 310324. |
208
+ | readApiKey | <code>string</code> | Optional parameter if authorization is enabled for the relay service. API Key for authorization. Defaults to null which indicates no authorization. |
209
+ | writeApiKey | <code>string</code> | Optional parameter if authorization is enabled for the relay service. API Key for authorization. Defaults to null which indicates no authorization. |
210
+
211
+ <a name="module_quantum-coin-js-sdk..Config+readUrl"></a>
212
+
213
+ #### config.readUrl : <code>string</code>
214
+ The Read API URL pointing to a read relay. See https://github.com/quantumcoinproject/quantum-coin-go/tree/dogep/relay
215
+
216
+ **Kind**: instance property of [<code>Config</code>](#module_quantum-coin-js-sdk..Config)
217
+ **Access**: public
218
+ <a name="module_quantum-coin-js-sdk..Config+writeUrl"></a>
219
+
220
+ #### config.writeUrl : <code>string</code>
221
+ The Read API URL pointing to a read relay. See https://github.com/quantumcoinproject/quantum-coin-go/tree/dogep/relay
222
+
223
+ **Kind**: instance property of [<code>Config</code>](#module_quantum-coin-js-sdk..Config)
224
+ **Access**: public
225
+ <a name="module_quantum-coin-js-sdk..Config+chainId"></a>
226
+
227
+ #### config.chainId : <code>number</code>
228
+ The chain id of the blockchain. Mainnet chainId is 123123. Testnet T4 chainId is 310324.
229
+
230
+ **Kind**: instance property of [<code>Config</code>](#module_quantum-coin-js-sdk..Config)
231
+ **Access**: public
232
+ <a name="module_quantum-coin-js-sdk..Config+readApiKey"></a>
233
+
234
+ #### config.readApiKey : <code>string</code>
235
+ API Key for authorization if authorization is enabled for the relay service. Defaults to null which indicates no authorization.
236
+
237
+ **Kind**: instance property of [<code>Config</code>](#module_quantum-coin-js-sdk..Config)
238
+ **Access**: public
239
+ <a name="module_quantum-coin-js-sdk..Config+writeApiKey"></a>
240
+
241
+ #### config.writeApiKey : <code>string</code>
242
+ API Key for authorization if authorization is enabled for the relay service. Defaults to null which indicates no authorization.
243
+
244
+ **Kind**: instance property of [<code>Config</code>](#module_quantum-coin-js-sdk..Config)
245
+ **Access**: public
246
+ <a name="module_quantum-coin-js-sdk..Wallet"></a>
247
+
248
+ ### quantum-coin-js-sdk~Wallet
249
+ This class represents a Wallet. Use the verifyWallet function to verify if a wallet is valid. Verifying the wallet is highly recommended, especially if it comes from an untrusted source. For more details on the underlying cryptography of the Wallet, see https://github.com/QuantumCoinProject/hybrid-pqc
250
+
251
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
252
+ **Access**: public
253
+
254
+ * [~Wallet](#module_quantum-coin-js-sdk..Wallet)
255
+ * [new Wallet(address, privateKey, publicKey, [preExpansionSeed])](#new_module_quantum-coin-js-sdk..Wallet_new)
256
+ * [.address](#module_quantum-coin-js-sdk..Wallet+address) : <code>string</code>
257
+ * [.privateKey](#module_quantum-coin-js-sdk..Wallet+privateKey) : <code>Array.&lt;number&gt;</code>
258
+ * [.publicKey](#module_quantum-coin-js-sdk..Wallet+publicKey) : <code>Array.&lt;number&gt;</code>
259
+ * [.preExpansionSeed](#module_quantum-coin-js-sdk..Wallet+preExpansionSeed) : <code>Uint8Array</code> \| <code>Array.&lt;number&gt;</code> \| <code>null</code>
260
+
261
+ <a name="new_module_quantum-coin-js-sdk..Wallet_new"></a>
262
+
263
+ #### new Wallet(address, privateKey, publicKey, [preExpansionSeed])
264
+ Creates a Wallet class. The constructor does not verify the wallet. To verify a wallet, call the verifyWallet function explicitly.
265
+
266
+
267
+ | Param | Type | Default | Description |
268
+ | --- | --- | --- | --- |
269
+ | address | <code>string</code> | | Address of the wallet |
270
+ | privateKey | <code>Array.&lt;number&gt;</code> | | Private Key byte array of the wallet |
271
+ | publicKey | <code>Array.&lt;number&gt;</code> | | Public Key byte array of the wallet |
272
+ | [preExpansionSeed] | <code>Uint8Array</code> \| <code>Array.&lt;number&gt;</code> \| <code>null</code> | <code></code> | Optional pre-expansion seed bytes. Non-null only for seed-derived wallets. |
273
+
274
+ <a name="module_quantum-coin-js-sdk..Wallet+address"></a>
275
+
276
+ #### wallet.address : <code>string</code>
277
+ Address of the wallet. Is 66 bytes in length including 0x (if the wallet is valid).
278
+
279
+ **Kind**: instance property of [<code>Wallet</code>](#module_quantum-coin-js-sdk..Wallet)
280
+ **Access**: public
281
+ <a name="module_quantum-coin-js-sdk..Wallet+privateKey"></a>
282
+
283
+ #### wallet.privateKey : <code>Array.&lt;number&gt;</code>
284
+ Private Key byte array of the wallet. Is 4064 bytes in length (if the wallet is valid).
285
+
286
+ **Kind**: instance property of [<code>Wallet</code>](#module_quantum-coin-js-sdk..Wallet)
287
+ **Access**: public
288
+ <a name="module_quantum-coin-js-sdk..Wallet+publicKey"></a>
289
+
290
+ #### wallet.publicKey : <code>Array.&lt;number&gt;</code>
291
+ Public Key byte array of the wallet. Is 1408 bytes in length (if the wallet is valid).
292
+
293
+ **Kind**: instance property of [<code>Wallet</code>](#module_quantum-coin-js-sdk..Wallet)
294
+ **Access**: public
295
+ <a name="module_quantum-coin-js-sdk..Wallet+preExpansionSeed"></a>
296
+
297
+ #### wallet.preExpansionSeed : <code>Uint8Array</code> \| <code>Array.&lt;number&gt;</code> \| <code>null</code>
298
+ Pre-expansion seed bytes. Can be null if the wallet was not created from a seed.
299
+
300
+ **Kind**: instance property of [<code>Wallet</code>](#module_quantum-coin-js-sdk..Wallet)
301
+ **Access**: public
302
+ <a name="module_quantum-coin-js-sdk..BlockDetails"></a>
303
+
304
+ ### quantum-coin-js-sdk~BlockDetails
305
+ This class represents a Block.
306
+
307
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
308
+ **Access**: public
309
+ <a name="module_quantum-coin-js-sdk..BlockDetails+blockNumber"></a>
310
+
311
+ #### blockDetails.blockNumber : <code>number</code>
312
+ Block Number of the block
313
+
314
+ **Kind**: instance property of [<code>BlockDetails</code>](#module_quantum-coin-js-sdk..BlockDetails)
315
+ **Access**: public
316
+ <a name="module_quantum-coin-js-sdk..LatestBlockDetailsResult"></a>
317
+
318
+ ### quantum-coin-js-sdk~LatestBlockDetailsResult
319
+ This class represents a result from invoking the getLatestBlock function.
320
+
321
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
322
+ **Access**: public
323
+
324
+ * [~LatestBlockDetailsResult](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
325
+ * [.resultCode](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+resultCode) : <code>number</code>
326
+ * [.blockDetails](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+blockDetails) : <code>BlockDetails</code>
327
+ * [.response](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+response) : <code>Object</code>
328
+ * [.requestId](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+requestId) : <code>string</code>
329
+ * [.err](#module_quantum-coin-js-sdk..LatestBlockDetailsResult+err) : <code>Error</code>
330
+
331
+ <a name="module_quantum-coin-js-sdk..LatestBlockDetailsResult+resultCode"></a>
332
+
333
+ #### latestBlockDetailsResult.resultCode : <code>number</code>
334
+ Represents the result of the operation. A value of 0 represents that the operation succeeded. Any other value indicates the operation failed. See the result code section for more details.
335
+
336
+ **Kind**: instance property of [<code>LatestBlockDetailsResult</code>](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
337
+ **Access**: public
338
+ <a name="module_quantum-coin-js-sdk..LatestBlockDetailsResult+blockDetails"></a>
339
+
340
+ #### latestBlockDetailsResult.blockDetails : <code>BlockDetails</code>
341
+ An object of type BlockDetails representing the block. This value is null if the value of resultCode is not 0.
342
+
343
+ **Kind**: instance property of [<code>LatestBlockDetailsResult</code>](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
344
+ **Access**: public
345
+ <a name="module_quantum-coin-js-sdk..LatestBlockDetailsResult+response"></a>
346
+
347
+ #### latestBlockDetailsResult.response : <code>Object</code>
348
+ An object of representing the raw Response returned by the service. For details, see https://developer.mozilla.org/en-US/docs/Web/API/Response. This value can be null if the value of resultCode is not 0.
349
+
350
+ **Kind**: instance property of [<code>LatestBlockDetailsResult</code>](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
351
+ **Access**: public
352
+ <a name="module_quantum-coin-js-sdk..LatestBlockDetailsResult+requestId"></a>
353
+
354
+ #### latestBlockDetailsResult.requestId : <code>string</code>
355
+ An unique id to represent the request. This can be null if request failed before it could be sent.
356
+
357
+ **Kind**: instance property of [<code>LatestBlockDetailsResult</code>](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
358
+ **Access**: public
359
+ <a name="module_quantum-coin-js-sdk..LatestBlockDetailsResult+err"></a>
360
+
361
+ #### latestBlockDetailsResult.err : <code>Error</code>
362
+ An error object if the operation resulted in an error and there was no response. This property is defined only if the resultCode is -10000.
363
+
364
+ **Kind**: instance property of [<code>LatestBlockDetailsResult</code>](#module_quantum-coin-js-sdk..LatestBlockDetailsResult)
365
+ **Access**: public
366
+ <a name="module_quantum-coin-js-sdk..AccountDetails"></a>
367
+
368
+ ### quantum-coin-js-sdk~AccountDetails
369
+ This class represents an Account.
370
+
371
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
372
+ **Access**: public
373
+
374
+ * [~AccountDetails](#module_quantum-coin-js-sdk..AccountDetails)
375
+ * [.address](#module_quantum-coin-js-sdk..AccountDetails+address) : <code>string</code>
376
+ * [.balance](#module_quantum-coin-js-sdk..AccountDetails+balance) : <code>string</code>
377
+ * [.nonce](#module_quantum-coin-js-sdk..AccountDetails+nonce) : <code>number</code>
378
+ * [.blockNumber](#module_quantum-coin-js-sdk..AccountDetails+blockNumber) : <code>number</code>
379
+
380
+ <a name="module_quantum-coin-js-sdk..AccountDetails+address"></a>
381
+
382
+ #### accountDetails.address : <code>string</code>
383
+ Address of the wallet. Is 66 bytes in length including 0x.
384
+
385
+ **Kind**: instance property of [<code>AccountDetails</code>](#module_quantum-coin-js-sdk..AccountDetails)
386
+ **Access**: public
387
+ <a name="module_quantum-coin-js-sdk..AccountDetails+balance"></a>
388
+
389
+ #### accountDetails.balance : <code>string</code>
390
+ Balance of the account in wei. To convert this to ethers, see https://docs.ethers.org/v4/api-utils.html#ether-strings-and-wei
391
+
392
+ **Kind**: instance property of [<code>AccountDetails</code>](#module_quantum-coin-js-sdk..AccountDetails)
393
+ **Access**: public
394
+ <a name="module_quantum-coin-js-sdk..AccountDetails+nonce"></a>
395
+
396
+ #### accountDetails.nonce : <code>number</code>
397
+ A monotonically increasing number representing the nonce of the account. After each transaction from the account that gets registered in the blockchain, the nonce increases by 1.
398
+
399
+ **Kind**: instance property of [<code>AccountDetails</code>](#module_quantum-coin-js-sdk..AccountDetails)
400
+ **Access**: public
401
+ <a name="module_quantum-coin-js-sdk..AccountDetails+blockNumber"></a>
402
+
403
+ #### accountDetails.blockNumber : <code>number</code>
404
+ The block number as of which the Account details was retrieved.
405
+
406
+ **Kind**: instance property of [<code>AccountDetails</code>](#module_quantum-coin-js-sdk..AccountDetails)
407
+ **Access**: public
408
+ <a name="module_quantum-coin-js-sdk..AccountDetailsResult"></a>
409
+
410
+ ### quantum-coin-js-sdk~AccountDetailsResult
411
+ This class represents a result from invoking the getAccountDetails function.
412
+
413
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
414
+ **Access**: public
415
+
416
+ * [~AccountDetailsResult](#module_quantum-coin-js-sdk..AccountDetailsResult)
417
+ * [.resultCode](#module_quantum-coin-js-sdk..AccountDetailsResult+resultCode) : <code>number</code>
418
+ * [.accountDetails](#module_quantum-coin-js-sdk..AccountDetailsResult+accountDetails) : <code>AccountDetails</code>
419
+ * [.response](#module_quantum-coin-js-sdk..AccountDetailsResult+response) : <code>Object</code>
420
+ * [.requestId](#module_quantum-coin-js-sdk..AccountDetailsResult+requestId) : <code>string</code>
421
+ * [.err](#module_quantum-coin-js-sdk..AccountDetailsResult+err) : <code>Error</code>
422
+
423
+ <a name="module_quantum-coin-js-sdk..AccountDetailsResult+resultCode"></a>
424
+
425
+ #### accountDetailsResult.resultCode : <code>number</code>
426
+ Represents the result of the operation. A value of 0 represents that the operation succeeded. Any other value indicates the operation failed. See the result code section for more details.
427
+
428
+ **Kind**: instance property of [<code>AccountDetailsResult</code>](#module_quantum-coin-js-sdk..AccountDetailsResult)
429
+ **Access**: public
430
+ <a name="module_quantum-coin-js-sdk..AccountDetailsResult+accountDetails"></a>
431
+
432
+ #### accountDetailsResult.accountDetails : <code>AccountDetails</code>
433
+ An object of type AccountDetails representing the block. This value is null if the value of resultCode is not 0.
434
+
435
+ **Kind**: instance property of [<code>AccountDetailsResult</code>](#module_quantum-coin-js-sdk..AccountDetailsResult)
436
+ **Access**: public
437
+ <a name="module_quantum-coin-js-sdk..AccountDetailsResult+response"></a>
438
+
439
+ #### accountDetailsResult.response : <code>Object</code>
440
+ An object of representing the raw Response returned by the service. For details, see https://developer.mozilla.org/en-US/docs/Web/API/Response. This value can be null if the value of resultCode is not 0.
441
+
442
+ **Kind**: instance property of [<code>AccountDetailsResult</code>](#module_quantum-coin-js-sdk..AccountDetailsResult)
443
+ **Access**: public
444
+ <a name="module_quantum-coin-js-sdk..AccountDetailsResult+requestId"></a>
445
+
446
+ #### accountDetailsResult.requestId : <code>string</code>
447
+ An unique id to represent the request. This can be null if request failed before it could be sent.
448
+
449
+ **Kind**: instance property of [<code>AccountDetailsResult</code>](#module_quantum-coin-js-sdk..AccountDetailsResult)
450
+ **Access**: public
451
+ <a name="module_quantum-coin-js-sdk..AccountDetailsResult+err"></a>
452
+
453
+ #### accountDetailsResult.err : <code>Error</code>
454
+ An error object if the operation resulted in an error and there was no response. This property is defined only if the resultCode is -10000.
455
+
456
+ **Kind**: instance property of [<code>AccountDetailsResult</code>](#module_quantum-coin-js-sdk..AccountDetailsResult)
457
+ **Access**: public
458
+ <a name="module_quantum-coin-js-sdk..SignResult"></a>
459
+
460
+ ### quantum-coin-js-sdk~SignResult
461
+ This class represents a result from invoking the signSendCoinTransaction function.
462
+
463
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
464
+ **Access**: public
465
+
466
+ * [~SignResult](#module_quantum-coin-js-sdk..SignResult)
467
+ * [.resultCode](#module_quantum-coin-js-sdk..SignResult+resultCode) : <code>number</code>
468
+ * [.txnHash](#module_quantum-coin-js-sdk..SignResult+txnHash) : <code>string</code>
469
+ * [.txnData](#module_quantum-coin-js-sdk..SignResult+txnData) : <code>string</code>
470
+
471
+ <a name="module_quantum-coin-js-sdk..SignResult+resultCode"></a>
472
+
473
+ #### signResult.resultCode : <code>number</code>
474
+ Represents the result of the operation. A value of 0 represents that the operation succeeded. Any other value indicates the operation failed. See the result code section for more details.
475
+
476
+ **Kind**: instance property of [<code>SignResult</code>](#module_quantum-coin-js-sdk..SignResult)
477
+ **Access**: public
478
+ <a name="module_quantum-coin-js-sdk..SignResult+txnHash"></a>
479
+
480
+ #### signResult.txnHash : <code>string</code>
481
+ Hash of the Transaction, to uniquely identify it. Is 66 bytes in length including 0x. This value is null if the value of resultCode is not 0.
482
+
483
+ **Kind**: instance property of [<code>SignResult</code>](#module_quantum-coin-js-sdk..SignResult)
484
+ **Access**: public
485
+ <a name="module_quantum-coin-js-sdk..SignResult+txnData"></a>
486
+
487
+ #### signResult.txnData : <code>string</code>
488
+ A payload representing the signed transaction.
489
+ To actually send a transaction, this payload can then be taken to to a different device that is connected to the blockchain relay and then sent using the postTransaction function.
490
+ This value is null if the value of resultCode is not 0.
491
+
492
+ **Kind**: instance property of [<code>SignResult</code>](#module_quantum-coin-js-sdk..SignResult)
493
+ **Access**: public
494
+ <a name="module_quantum-coin-js-sdk..SendResult"></a>
495
+
496
+ ### quantum-coin-js-sdk~SendResult
497
+ This class represents a result from invoking the sendCoins function.
498
+
499
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
500
+ **Access**: public
501
+
502
+ * [~SendResult](#module_quantum-coin-js-sdk..SendResult)
503
+ * [.resultCode](#module_quantum-coin-js-sdk..SendResult+resultCode) : <code>number</code>
504
+ * [.txnHash](#module_quantum-coin-js-sdk..SendResult+txnHash) : <code>string</code>
505
+ * [.response](#module_quantum-coin-js-sdk..SendResult+response) : <code>Object</code>
506
+ * [.requestId](#module_quantum-coin-js-sdk..SendResult+requestId) : <code>string</code>
507
+ * [.err](#module_quantum-coin-js-sdk..SendResult+err) : <code>Error</code>
508
+
509
+ <a name="module_quantum-coin-js-sdk..SendResult+resultCode"></a>
510
+
511
+ #### sendResult.resultCode : <code>number</code>
512
+ Represents the result of the operation. A value of 0 represents that the operation succeeded. Any other value indicates the operation failed. See the result code section for more details.
513
+
514
+ **Kind**: instance property of [<code>SendResult</code>](#module_quantum-coin-js-sdk..SendResult)
515
+ **Access**: public
516
+ <a name="module_quantum-coin-js-sdk..SendResult+txnHash"></a>
517
+
518
+ #### sendResult.txnHash : <code>string</code>
519
+ Hash of the Transaction, to uniquely identify it. Is 66 bytes in length including 0x. This value is null if the value of resultCode is not 0.
520
+
521
+ **Kind**: instance property of [<code>SendResult</code>](#module_quantum-coin-js-sdk..SendResult)
522
+ **Access**: public
523
+ <a name="module_quantum-coin-js-sdk..SendResult+response"></a>
524
+
525
+ #### sendResult.response : <code>Object</code>
526
+ An object of representing the raw Response returned by the service. For details, see https://developer.mozilla.org/en-US/docs/Web/API/Response. This value can be null if the value of resultCode is not 0.
527
+
528
+ **Kind**: instance property of [<code>SendResult</code>](#module_quantum-coin-js-sdk..SendResult)
529
+ **Access**: public
530
+ <a name="module_quantum-coin-js-sdk..SendResult+requestId"></a>
531
+
532
+ #### sendResult.requestId : <code>string</code>
533
+ An unique id to represent the request. This can be null if request failed before it could be sent.
534
+
535
+ **Kind**: instance property of [<code>SendResult</code>](#module_quantum-coin-js-sdk..SendResult)
536
+ **Access**: public
537
+ <a name="module_quantum-coin-js-sdk..SendResult+err"></a>
538
+
539
+ #### sendResult.err : <code>Error</code>
540
+ An error object if the operation resulted in an error and there was no response. This property is defined only if the resultCode is -10000.
541
+
542
+ **Kind**: instance property of [<code>SendResult</code>](#module_quantum-coin-js-sdk..SendResult)
543
+ **Access**: public
544
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt"></a>
545
+
546
+ ### quantum-coin-js-sdk~TransactionReceipt
547
+ This class represents a Receipt of a transaction that is registered in the blockchain. The transactionReceipt field can be null unless the transaction is registered with the blockchain.
548
+ While the transaction is pending, this field will be null. You should consider the transaction as succeeded only if the status field's value is 0x1 (success).
549
+
550
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
551
+ **Access**: public
552
+
553
+ * [~TransactionReceipt](#module_quantum-coin-js-sdk..TransactionReceipt)
554
+ * [.cumulativeGasUsed](#module_quantum-coin-js-sdk..TransactionReceipt+cumulativeGasUsed) : <code>string</code>
555
+ * [.effectiveGasPrice](#module_quantum-coin-js-sdk..TransactionReceipt+effectiveGasPrice) : <code>string</code>
556
+ * [.gasUsed](#module_quantum-coin-js-sdk..TransactionReceipt+gasUsed) : <code>string</code>
557
+ * [.status](#module_quantum-coin-js-sdk..TransactionReceipt+status) : <code>string</code>
558
+ * [.hash](#module_quantum-coin-js-sdk..TransactionReceipt+hash) : <code>string</code>
559
+ * [.type](#module_quantum-coin-js-sdk..TransactionReceipt+type) : <code>string</code>
560
+
561
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt+cumulativeGasUsed"></a>
562
+
563
+ #### transactionReceipt.cumulativeGasUsed : <code>string</code>
564
+ A hexadecimal string representing the total amount of gas used when this transaction was executed in the block.
565
+
566
+ **Kind**: instance property of [<code>TransactionReceipt</code>](#module_quantum-coin-js-sdk..TransactionReceipt)
567
+ **Access**: public
568
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt+effectiveGasPrice"></a>
569
+
570
+ #### transactionReceipt.effectiveGasPrice : <code>string</code>
571
+ A hexadecimal string representing the sum of the base fee and tip paid per unit of gas.
572
+
573
+ **Kind**: instance property of [<code>TransactionReceipt</code>](#module_quantum-coin-js-sdk..TransactionReceipt)
574
+ **Access**: public
575
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt+gasUsed"></a>
576
+
577
+ #### transactionReceipt.gasUsed : <code>string</code>
578
+ A hexadecimal string representing the amount of gas used by this specific transaction alone.
579
+
580
+ **Kind**: instance property of [<code>TransactionReceipt</code>](#module_quantum-coin-js-sdk..TransactionReceipt)
581
+ **Access**: public
582
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt+status"></a>
583
+
584
+ #### transactionReceipt.status : <code>string</code>
585
+ A hexadecimal string representing either 0x1 (success) or 0x0 (failure). Failed transactions can also incur gas fee. You should consider the transaction as succeeded only if the status value is 0x1 (success).
586
+
587
+ **Kind**: instance property of [<code>TransactionReceipt</code>](#module_quantum-coin-js-sdk..TransactionReceipt)
588
+ **Access**: public
589
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt+hash"></a>
590
+
591
+ #### transactionReceipt.hash : <code>string</code>
592
+ Hash of the Transaction, to uniquely identify it. Is 66 bytes in length including 0x.
593
+
594
+ **Kind**: instance property of [<code>TransactionReceipt</code>](#module_quantum-coin-js-sdk..TransactionReceipt)
595
+ **Access**: public
596
+ <a name="module_quantum-coin-js-sdk..TransactionReceipt+type"></a>
597
+
598
+ #### transactionReceipt.type : <code>string</code>
599
+ A hexadecimal string representing the transaction type. 0x0 is DefaultFeeTxType.
600
+
601
+ **Kind**: instance property of [<code>TransactionReceipt</code>](#module_quantum-coin-js-sdk..TransactionReceipt)
602
+ **Access**: public
603
+ <a name="module_quantum-coin-js-sdk..TransactionDetails"></a>
604
+
605
+ ### quantum-coin-js-sdk~TransactionDetails
606
+ This class represents details of a transaction. You should consider the transaction as succeeded only if the status field of the receipt object is 0x1 (success).
607
+
608
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
609
+ **Access**: public
610
+
611
+ * [~TransactionDetails](#module_quantum-coin-js-sdk..TransactionDetails)
612
+ * [.blockHash](#module_quantum-coin-js-sdk..TransactionDetails+blockHash) : <code>string</code>
613
+ * [.blockNumber](#module_quantum-coin-js-sdk..TransactionDetails+blockNumber) : <code>number</code>
614
+ * [.from](#module_quantum-coin-js-sdk..TransactionDetails+from) : <code>string</code>
615
+ * [.gas](#module_quantum-coin-js-sdk..TransactionDetails+gas) : <code>string</code>
616
+ * [.gasPrice](#module_quantum-coin-js-sdk..TransactionDetails+gasPrice) : <code>string</code>
617
+ * [.hash](#module_quantum-coin-js-sdk..TransactionDetails+hash) : <code>string</code>
618
+ * [.input](#module_quantum-coin-js-sdk..TransactionDetails+input) : <code>string</code>
619
+ * [.nonce](#module_quantum-coin-js-sdk..TransactionDetails+nonce) : <code>number</code>
620
+ * [.to](#module_quantum-coin-js-sdk..TransactionDetails+to) : <code>string</code>
621
+ * [.value](#module_quantum-coin-js-sdk..TransactionDetails+value) : <code>string</code>
622
+ * [.receipt](#module_quantum-coin-js-sdk..TransactionDetails+receipt) : <code>TransactionReceipt</code>
623
+
624
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+blockHash"></a>
625
+
626
+ #### transactionDetails.blockHash : <code>string</code>
627
+ A hexadecimal string representing the hash of the block that registered the transaction. This field can be null if the transaction was not registered in the blockchain.
628
+
629
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
630
+ **Access**: public
631
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+blockNumber"></a>
632
+
633
+ #### transactionDetails.blockNumber : <code>number</code>
634
+ The number of the block that registered the transaction. This field can be null if the transaction was not registered in the blockchain.
635
+
636
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
637
+ **Access**: public
638
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+from"></a>
639
+
640
+ #### transactionDetails.from : <code>string</code>
641
+ A 66 character hexadecimal string representing the address the transaction is sent from.
642
+
643
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
644
+ **Access**: public
645
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+gas"></a>
646
+
647
+ #### transactionDetails.gas : <code>string</code>
648
+ A hexadecimal string representing the gas provided for the transaction execution.
649
+
650
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
651
+ **Access**: public
652
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+gasPrice"></a>
653
+
654
+ #### transactionDetails.gasPrice : <code>string</code>
655
+ A hexadecimal string representing the gasPrice used for each paid gas, in Wei.
656
+
657
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
658
+ **Access**: public
659
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+hash"></a>
660
+
661
+ #### transactionDetails.hash : <code>string</code>
662
+ A 66 character hexadecimal string representing the hash of the transaction.
663
+
664
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
665
+ **Access**: public
666
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+input"></a>
667
+
668
+ #### transactionDetails.input : <code>string</code>
669
+ A hexadecimal string representing the compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
670
+
671
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
672
+ **Access**: public
673
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+nonce"></a>
674
+
675
+ #### transactionDetails.nonce : <code>number</code>
676
+ A monotonically increasing number representing the nonce of the account. After each transaction from the account that gets registered in the blockchain, the nonce increases by 1.
677
+
678
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
679
+ **Access**: public
680
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+to"></a>
681
+
682
+ #### transactionDetails.to : <code>string</code>
683
+ A 66 character hexadecimal string representing address the transaction is directed to.
684
+
685
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
686
+ **Access**: public
687
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+value"></a>
688
+
689
+ #### transactionDetails.value : <code>string</code>
690
+ A hexadecimal string representing the value sent with this transaction. The value can be 0 for smart contract transactions, since it only represents the number of coins sent.
691
+
692
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
693
+ **Access**: public
694
+ <a name="module_quantum-coin-js-sdk..TransactionDetails+receipt"></a>
695
+
696
+ #### transactionDetails.receipt : <code>TransactionReceipt</code>
697
+ The receipt of the transaction. This field will be null while the transaction is pending (not yet registered in the blockchain).
698
+
699
+ **Kind**: instance property of [<code>TransactionDetails</code>](#module_quantum-coin-js-sdk..TransactionDetails)
700
+ **Access**: public
701
+ <a name="module_quantum-coin-js-sdk..TransactionDetailsResult"></a>
702
+
703
+ ### quantum-coin-js-sdk~TransactionDetailsResult
704
+ This class represents a result from invoking the getTransactionDetails function. If transactions get discarded by the blockchain, for reasons such as due to lower than minimum gas fees or invalid nonce, the resultCode will always contain a non-zero value (failure).
705
+
706
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
707
+ **Access**: public
708
+
709
+ * [~TransactionDetailsResult](#module_quantum-coin-js-sdk..TransactionDetailsResult)
710
+ * [.resultCode](#module_quantum-coin-js-sdk..TransactionDetailsResult+resultCode) : <code>number</code>
711
+ * [.transactionDetails](#module_quantum-coin-js-sdk..TransactionDetailsResult+transactionDetails) : <code>TransactionDetails</code>
712
+ * [.response](#module_quantum-coin-js-sdk..TransactionDetailsResult+response) : <code>Object</code>
713
+ * [.requestId](#module_quantum-coin-js-sdk..TransactionDetailsResult+requestId) : <code>string</code>
714
+ * [.err](#module_quantum-coin-js-sdk..TransactionDetailsResult+err) : <code>Error</code>
715
+
716
+ <a name="module_quantum-coin-js-sdk..TransactionDetailsResult+resultCode"></a>
717
+
718
+ #### transactionDetailsResult.resultCode : <code>number</code>
719
+ Represents the result of the operation. A value of 0 represents that the operation succeeded. Any other value indicates the operation failed. See the result code section for more details.
720
+
721
+ **Kind**: instance property of [<code>TransactionDetailsResult</code>](#module_quantum-coin-js-sdk..TransactionDetailsResult)
722
+ **Access**: public
723
+ <a name="module_quantum-coin-js-sdk..TransactionDetailsResult+transactionDetails"></a>
724
+
725
+ #### transactionDetailsResult.transactionDetails : <code>TransactionDetails</code>
726
+ An object of type TransactionDetails representing the transaction. This value is null if the value of resultCode is not 0.
727
+
728
+ **Kind**: instance property of [<code>TransactionDetailsResult</code>](#module_quantum-coin-js-sdk..TransactionDetailsResult)
729
+ **Access**: public
730
+ <a name="module_quantum-coin-js-sdk..TransactionDetailsResult+response"></a>
731
+
732
+ #### transactionDetailsResult.response : <code>Object</code>
733
+ An object of representing the raw Response returned by the service. For details, see https://developer.mozilla.org/en-US/docs/Web/API/Response. This value can be null if the value of resultCode is not 0.
734
+
735
+ **Kind**: instance property of [<code>TransactionDetailsResult</code>](#module_quantum-coin-js-sdk..TransactionDetailsResult)
736
+ **Access**: public
737
+ <a name="module_quantum-coin-js-sdk..TransactionDetailsResult+requestId"></a>
738
+
739
+ #### transactionDetailsResult.requestId : <code>string</code>
740
+ An unique id to represent the request. This can be null if request failed before it could be sent.
741
+
742
+ **Kind**: instance property of [<code>TransactionDetailsResult</code>](#module_quantum-coin-js-sdk..TransactionDetailsResult)
743
+ **Access**: public
744
+ <a name="module_quantum-coin-js-sdk..TransactionDetailsResult+err"></a>
745
+
746
+ #### transactionDetailsResult.err : <code>Error</code>
747
+ An error object if the operation resulted in an error and there was no response. This property is defined only if the resultCode is -10000.
748
+
749
+ **Kind**: instance property of [<code>TransactionDetailsResult</code>](#module_quantum-coin-js-sdk..TransactionDetailsResult)
750
+ **Access**: public
751
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact"></a>
752
+
753
+ ### quantum-coin-js-sdk~AccountTransactionCompact
754
+ This class represents a transaction of an account. You should consider the transaction as succeeded only if the status field is 0x1 (success).
755
+
756
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
757
+ **Access**: public
758
+
759
+ * [~AccountTransactionCompact](#module_quantum-coin-js-sdk..AccountTransactionCompact)
760
+ * [.blockNumber](#module_quantum-coin-js-sdk..AccountTransactionCompact+blockNumber) : <code>number</code>
761
+ * [.from](#module_quantum-coin-js-sdk..AccountTransactionCompact+from) : <code>string</code>
762
+ * [.hash](#module_quantum-coin-js-sdk..AccountTransactionCompact+hash) : <code>string</code>
763
+ * [.to](#module_quantum-coin-js-sdk..AccountTransactionCompact+to) : <code>string</code>
764
+ * [.value](#module_quantum-coin-js-sdk..AccountTransactionCompact+value) : <code>string</code>
765
+ * [.status](#module_quantum-coin-js-sdk..AccountTransactionCompact+status) : <code>string</code>
766
+
767
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact+blockNumber"></a>
768
+
769
+ #### accountTransactionCompact.blockNumber : <code>number</code>
770
+ The number of the block that registered the transaction. This field can be null if the transaction was not registered in the blockchain.
771
+
772
+ **Kind**: instance property of [<code>AccountTransactionCompact</code>](#module_quantum-coin-js-sdk..AccountTransactionCompact)
773
+ **Access**: public
774
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact+from"></a>
775
+
776
+ #### accountTransactionCompact.from : <code>string</code>
777
+ A 66 character hexadecimal string representing the address the transaction is sent from.
778
+
779
+ **Kind**: instance property of [<code>AccountTransactionCompact</code>](#module_quantum-coin-js-sdk..AccountTransactionCompact)
780
+ **Access**: public
781
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact+hash"></a>
782
+
783
+ #### accountTransactionCompact.hash : <code>string</code>
784
+ A 66 character hexadecimal string representing the hash of the transaction.
785
+
786
+ **Kind**: instance property of [<code>AccountTransactionCompact</code>](#module_quantum-coin-js-sdk..AccountTransactionCompact)
787
+ **Access**: public
788
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact+to"></a>
789
+
790
+ #### accountTransactionCompact.to : <code>string</code>
791
+ A 66 character hexadecimal string representing address the transaction is directed to.
792
+
793
+ **Kind**: instance property of [<code>AccountTransactionCompact</code>](#module_quantum-coin-js-sdk..AccountTransactionCompact)
794
+ **Access**: public
795
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact+value"></a>
796
+
797
+ #### accountTransactionCompact.value : <code>string</code>
798
+ A hexadecimal string representing the value sent with this transaction. The value can be 0 for smart contract transactions, since it only represents the number of coins sent.
799
+
800
+ **Kind**: instance property of [<code>AccountTransactionCompact</code>](#module_quantum-coin-js-sdk..AccountTransactionCompact)
801
+ **Access**: public
802
+ <a name="module_quantum-coin-js-sdk..AccountTransactionCompact+status"></a>
803
+
804
+ #### accountTransactionCompact.status : <code>string</code>
805
+ A hexadecimal string representing either 0x1 (success) or 0x0 (failure). Failed transactions can also incur gas fee. You should consider the transaction as succeeded only if the status value is 0x1 (success).
806
+
807
+ **Kind**: instance property of [<code>AccountTransactionCompact</code>](#module_quantum-coin-js-sdk..AccountTransactionCompact)
808
+ **Access**: public
809
+ <a name="module_quantum-coin-js-sdk..ListAccountTransactionsResponse"></a>
810
+
811
+ ### quantum-coin-js-sdk~ListAccountTransactionsResponse
812
+ This class represents a list of account transactions returned by the listAccountTransactionDetails function.
813
+
814
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
815
+ **Access**: public
816
+
817
+ * [~ListAccountTransactionsResponse](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse)
818
+ * [.pageCount](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse+pageCount) : <code>number</code>
819
+ * [.items](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse+items) : <code>AccountTransactionCompact</code> \| <code>Array</code>
820
+
821
+ <a name="module_quantum-coin-js-sdk..ListAccountTransactionsResponse+pageCount"></a>
822
+
823
+ #### listAccountTransactionsResponse.pageCount : <code>number</code>
824
+ The number of pages available for listing.
825
+
826
+ **Kind**: instance property of [<code>ListAccountTransactionsResponse</code>](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse)
827
+ **Access**: public
828
+ <a name="module_quantum-coin-js-sdk..ListAccountTransactionsResponse+items"></a>
829
+
830
+ #### listAccountTransactionsResponse.items : <code>AccountTransactionCompact</code> \| <code>Array</code>
831
+ An array of type AccountTransactionCompact, containing the list of transactions. Can be null if no items are available.
832
+
833
+ **Kind**: instance property of [<code>ListAccountTransactionsResponse</code>](#module_quantum-coin-js-sdk..ListAccountTransactionsResponse)
834
+ **Access**: public
835
+ <a name="module_quantum-coin-js-sdk..AccountTransactionsResult"></a>
836
+
837
+ ### quantum-coin-js-sdk~AccountTransactionsResult
838
+ This class represents a result from invoking the listAccountTransactionDetails function.
839
+
840
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
841
+ **Access**: public
842
+
843
+ * [~AccountTransactionsResult](#module_quantum-coin-js-sdk..AccountTransactionsResult)
844
+ * [.resultCode](#module_quantum-coin-js-sdk..AccountTransactionsResult+resultCode) : <code>number</code>
845
+ * [.listAccountTransactionsResponse](#module_quantum-coin-js-sdk..AccountTransactionsResult+listAccountTransactionsResponse) : <code>ListAccountTransactionsResponse</code>
846
+ * [.response](#module_quantum-coin-js-sdk..AccountTransactionsResult+response) : <code>Object</code>
847
+ * [.requestId](#module_quantum-coin-js-sdk..AccountTransactionsResult+requestId) : <code>string</code>
848
+ * [.err](#module_quantum-coin-js-sdk..AccountTransactionsResult+err) : <code>Error</code>
849
+
850
+ <a name="module_quantum-coin-js-sdk..AccountTransactionsResult+resultCode"></a>
851
+
852
+ #### accountTransactionsResult.resultCode : <code>number</code>
853
+ Represents the result of the operation. A value of 0 represents that the operation succeeded. Any other value indicates the operation failed. See the result code section for more details.
854
+
855
+ **Kind**: instance property of [<code>AccountTransactionsResult</code>](#module_quantum-coin-js-sdk..AccountTransactionsResult)
856
+ **Access**: public
857
+ <a name="module_quantum-coin-js-sdk..AccountTransactionsResult+listAccountTransactionsResponse"></a>
858
+
859
+ #### accountTransactionsResult.listAccountTransactionsResponse : <code>ListAccountTransactionsResponse</code>
860
+ An object of type ListAccountTransactionsResponse representing the list of transactions along with metadata. This value is null if the value of resultCode is not 0.
861
+
862
+ **Kind**: instance property of [<code>AccountTransactionsResult</code>](#module_quantum-coin-js-sdk..AccountTransactionsResult)
863
+ **Access**: public
864
+ <a name="module_quantum-coin-js-sdk..AccountTransactionsResult+response"></a>
865
+
866
+ #### accountTransactionsResult.response : <code>Object</code>
867
+ An object of representing the raw Response returned by the service. For details, see https://developer.mozilla.org/en-US/docs/Web/API/Response. This value can be null if the value of resultCode is not 0.
868
+
869
+ **Kind**: instance property of [<code>AccountTransactionsResult</code>](#module_quantum-coin-js-sdk..AccountTransactionsResult)
870
+ **Access**: public
871
+ <a name="module_quantum-coin-js-sdk..AccountTransactionsResult+requestId"></a>
872
+
873
+ #### accountTransactionsResult.requestId : <code>string</code>
874
+ An unique id to represent the request. This can be null if request failed before it could be sent.
875
+
876
+ **Kind**: instance property of [<code>AccountTransactionsResult</code>](#module_quantum-coin-js-sdk..AccountTransactionsResult)
877
+ **Access**: public
878
+ <a name="module_quantum-coin-js-sdk..AccountTransactionsResult+err"></a>
879
+
880
+ #### accountTransactionsResult.err : <code>Error</code>
881
+ An error object if the operation resulted in an error and there was no response. This property is defined only if the resultCode is -10000.
882
+
883
+ **Kind**: instance property of [<code>AccountTransactionsResult</code>](#module_quantum-coin-js-sdk..AccountTransactionsResult)
884
+ **Access**: public
885
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest"></a>
886
+
887
+ ### quantum-coin-js-sdk~TransactionSigningRequest
888
+ This class represents a signing request that can be passed to signTransaction.
889
+
890
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
891
+ **Access**: public
892
+
893
+ * [~TransactionSigningRequest](#module_quantum-coin-js-sdk..TransactionSigningRequest)
894
+ * [new TransactionSigningRequest(wallet, toAddress, valueInWei, nonce, data, gasLimit, remarks, chainId, signingContext)](#new_module_quantum-coin-js-sdk..TransactionSigningRequest_new)
895
+ * [.wallet](#module_quantum-coin-js-sdk..TransactionSigningRequest+wallet) : <code>Wallet</code>
896
+ * [.toAddress](#module_quantum-coin-js-sdk..TransactionSigningRequest+toAddress) : <code>string</code> \| <code>null</code>
897
+ * [.valueInWei](#module_quantum-coin-js-sdk..TransactionSigningRequest+valueInWei) : <code>string</code> \| <code>BigInt</code> \| <code>null</code>
898
+ * [.nonce](#module_quantum-coin-js-sdk..TransactionSigningRequest+nonce) : <code>number</code>
899
+ * [.data](#module_quantum-coin-js-sdk..TransactionSigningRequest+data) : <code>string</code> \| <code>null</code>
900
+ * [.gasLimit](#module_quantum-coin-js-sdk..TransactionSigningRequest+gasLimit) : <code>number</code>
901
+ * [.remarks](#module_quantum-coin-js-sdk..TransactionSigningRequest+remarks) : <code>string</code> \| <code>null</code>
902
+ * [.chainId](#module_quantum-coin-js-sdk..TransactionSigningRequest+chainId) : <code>number</code> \| <code>null</code>
903
+ * [.signingContext](#module_quantum-coin-js-sdk..TransactionSigningRequest+signingContext) : <code>number</code> \| <code>null</code>
904
+
905
+ <a name="new_module_quantum-coin-js-sdk..TransactionSigningRequest_new"></a>
906
+
907
+ #### new TransactionSigningRequest(wallet, toAddress, valueInWei, nonce, data, gasLimit, remarks, chainId, signingContext)
908
+ Creates a TransactionSigningRequest class.
909
+
910
+
911
+ | Param | Type | Description |
912
+ | --- | --- | --- |
913
+ | wallet | <code>Wallet</code> | The wallet with which the transaction has to be signed. The constructor does not verify the wallet. To verify a wallet, call the verifyWallet function explicitly. |
914
+ | toAddress | <code>string</code> | The address to which the transaction request is made. Can be null (for example, for contract creation). |
915
+ | valueInWei | <code>string</code> \| <code>BigInt</code> | The value in wei-units. Can be provided as either a hex string (including 0x prefix) or a BigInt. For example, to represent 1 coin, which is 1000000000000000000 in wei-units, set the value to "0xDE0B6B3A7640000" or BigInt("1000000000000000000"). [Conversion Examples](/example/conversion-example.js) |
916
+ | nonce | <code>number</code> | A monotonically increasing number representing the nonce of the account signing the transaction. After each transaction from the account that gets registered in the blockchain, the nonce increases by 1. |
917
+ | data | <code>string</code> | An optional hex string (including 0x) that represents the contract data. Can be null if not invoking or creating a contract. |
918
+ | gasLimit | <code>number</code> | A limit of gas to be used. Set 21000 for basic non smart contract transactions. |
919
+ | remarks | <code>string</code> | An optional hex string (including 0x) that represents a remark (such as a comment). Maximum 32 bytes length (in bytes). Warning, do not store any sensitive information in this field. |
920
+ | chainId | <code>number</code> \| <code>null</code> | The chain id of the blockchain. Mainnet chainId is 123123. Testnet T4 chainId is 310324. If null, the chainId specified in the initialize() function will be used. |
921
+ | signingContext | <code>number</code> \| <code>null</code> | It is recommended that you pass null for this parameter, unless the context needs to be set explicitly. Signing context determines the cryptographic scheme used to sign. The wallet key type should compatible with the signing context. Applicable values are 0,1,2. Default value if not specified will be determined dynamically from the wallet key type. Signing context 1,2 will incur additional gas fee. For information on the schemes, see https://github.com/quantumcoinproject/circl?tab=readme-ov-file#hybrid-schemes Signing context 0: Scheme used is hybrid-ed-mldsa-slhdsa compact (scheme id 3) Signing context 1: Scheme used is hybrid-ed-mldsa-slhdsa-5 (scheme id 5 : 20x the gas fee of scheme 0) Signing context 2: hybrid-ed-mldsa-slhdsa full (scheme id 4 : 30x the gas fee of scheme 0) |
922
+
923
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+wallet"></a>
924
+
925
+ #### transactionSigningRequest.wallet : <code>Wallet</code>
926
+ The wallet that should be used to sign the transaction.
927
+
928
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
929
+ **Access**: public
930
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+toAddress"></a>
931
+
932
+ #### transactionSigningRequest.toAddress : <code>string</code> \| <code>null</code>
933
+ The address to which the transaction request is made. Can be null (for example, for contract creation).
934
+
935
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
936
+ **Access**: public
937
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+valueInWei"></a>
938
+
939
+ #### transactionSigningRequest.valueInWei : <code>string</code> \| <code>BigInt</code> \| <code>null</code>
940
+ The value in wei-units. Can be provided as either a hex string (including 0x prefix) or a BigInt. For example, to represent 1 coin, which is 1000000000000000000 in wei-units, set the value to "0xDE0B6B3A7640000" or BigInt("1000000000000000000"). [Conversion Examples](/example/conversion-example.js)
941
+
942
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
943
+ **Access**: public
944
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+nonce"></a>
945
+
946
+ #### transactionSigningRequest.nonce : <code>number</code>
947
+ A monotonically increasing number representing the nonce of the account signing the transaction. After each transaction from the account that gets registered in the blockchain, the nonce increases by 1.
948
+
949
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
950
+ **Access**: public
951
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+data"></a>
952
+
953
+ #### transactionSigningRequest.data : <code>string</code> \| <code>null</code>
954
+ An optional hex string (including 0x) that represents the contract data. Can be null if not invoking or creating a contract.
955
+
956
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
957
+ **Access**: public
958
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+gasLimit"></a>
959
+
960
+ #### transactionSigningRequest.gasLimit : <code>number</code>
961
+ A limit of gas to be used. Set 21000 for basic non smart contract transactions.
962
+
963
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
964
+ **Access**: public
965
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+remarks"></a>
966
+
967
+ #### transactionSigningRequest.remarks : <code>string</code> \| <code>null</code>
968
+ An optional hex string (including 0x) that represents a remark (such as a comment). Maximum 32 bytes length (in bytes). Warning, do not store any sensitive information in this field.
969
+
970
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
971
+ **Access**: public
972
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+chainId"></a>
973
+
974
+ #### transactionSigningRequest.chainId : <code>number</code> \| <code>null</code>
975
+ The chain id of the blockchain. Mainnet chainId is 123123. If null, the chainId specified in the initialize() function will be used.
976
+
977
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
978
+ **Access**: public
979
+ <a name="module_quantum-coin-js-sdk..TransactionSigningRequest+signingContext"></a>
980
+
981
+ #### transactionSigningRequest.signingContext : <code>number</code> \| <code>null</code>
982
+ It is recommended that you pass null for this parameter, unless the context needs to be set explicitly. Signing context determines the cryptographic scheme used to sign. Gas fee varies by context.
983
+
984
+ **Kind**: instance property of [<code>TransactionSigningRequest</code>](#module_quantum-coin-js-sdk..TransactionSigningRequest)
985
+ **Access**: public
986
+ <a name="module_quantum-coin-js-sdk..PackUnpackResult"></a>
987
+
988
+ ### quantum-coin-js-sdk~PackUnpackResult
989
+ This class represents a result from invoking the packMethodData or unpackMethodData functions.
990
+
991
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
992
+ **Access**: public
993
+
994
+ * [~PackUnpackResult](#module_quantum-coin-js-sdk..PackUnpackResult)
995
+ * [new PackUnpackResult(error, result)](#new_module_quantum-coin-js-sdk..PackUnpackResult_new)
996
+ * [.error](#module_quantum-coin-js-sdk..PackUnpackResult+error) : <code>string</code>
997
+ * [.result](#module_quantum-coin-js-sdk..PackUnpackResult+result) : <code>string</code>
998
+
999
+ <a name="new_module_quantum-coin-js-sdk..PackUnpackResult_new"></a>
1000
+
1001
+ #### new PackUnpackResult(error, result)
1002
+ Creates a PackUnpackResult class.
1003
+
1004
+
1005
+ | Param | Type | Description |
1006
+ | --- | --- | --- |
1007
+ | error | <code>string</code> | Error message if any. Empty string if no error. |
1008
+ | result | <code>string</code> | The actual result as a string. Empty string if there was an error. |
1009
+
1010
+ <a name="module_quantum-coin-js-sdk..PackUnpackResult+error"></a>
1011
+
1012
+ #### packUnpackResult.error : <code>string</code>
1013
+ Error message if any. Empty string if no error.
1014
+
1015
+ **Kind**: instance property of [<code>PackUnpackResult</code>](#module_quantum-coin-js-sdk..PackUnpackResult)
1016
+ **Access**: public
1017
+ <a name="module_quantum-coin-js-sdk..PackUnpackResult+result"></a>
1018
+
1019
+ #### packUnpackResult.result : <code>string</code>
1020
+ The actual result as a string. Empty string if there was an error.
1021
+
1022
+ **Kind**: instance property of [<code>PackUnpackResult</code>](#module_quantum-coin-js-sdk..PackUnpackResult)
1023
+ **Access**: public
1024
+ <a name="module_quantum-coin-js-sdk..EventLogEncodeResult"></a>
1025
+
1026
+ ### quantum-coin-js-sdk~EventLogEncodeResult
1027
+ This class represents a result from invoking the encodeEventLog function.
1028
+
1029
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1030
+
1031
+ * [~EventLogEncodeResult](#module_quantum-coin-js-sdk..EventLogEncodeResult)
1032
+ * [new EventLogEncodeResult(error, result)](#new_module_quantum-coin-js-sdk..EventLogEncodeResult_new)
1033
+ * [.error](#module_quantum-coin-js-sdk..EventLogEncodeResult+error) : <code>string</code>
1034
+ * [.result](#module_quantum-coin-js-sdk..EventLogEncodeResult+result) : <code>Object</code> \| <code>null</code>
1035
+
1036
+ <a name="new_module_quantum-coin-js-sdk..EventLogEncodeResult_new"></a>
1037
+
1038
+ #### new EventLogEncodeResult(error, result)
1039
+ Creates an EventLogEncodeResult class.
1040
+
1041
+
1042
+ | Param | Type | Description |
1043
+ | --- | --- | --- |
1044
+ | error | <code>string</code> | Error message if any. Empty string if no error. |
1045
+ | result | <code>Object</code> \| <code>null</code> | The actual result object with topics and data. Null if there was an error. |
1046
+ | result.topics | <code>Array.&lt;string&gt;</code> | Array of topic hex strings (with 0x prefix) |
1047
+ | result.data | <code>string</code> | Hex-encoded data string (with 0x prefix) |
1048
+
1049
+ <a name="module_quantum-coin-js-sdk..EventLogEncodeResult+error"></a>
1050
+
1051
+ #### eventLogEncodeResult.error : <code>string</code>
1052
+ Error message if any. Empty string if no error.
1053
+
1054
+ **Kind**: instance property of [<code>EventLogEncodeResult</code>](#module_quantum-coin-js-sdk..EventLogEncodeResult)
1055
+ **Access**: public
1056
+ <a name="module_quantum-coin-js-sdk..EventLogEncodeResult+result"></a>
1057
+
1058
+ #### eventLogEncodeResult.result : <code>Object</code> \| <code>null</code>
1059
+ The actual result object with topics and data. Null if there was an error.
1060
+
1061
+ **Kind**: instance property of [<code>EventLogEncodeResult</code>](#module_quantum-coin-js-sdk..EventLogEncodeResult)
1062
+ **Access**: public
1063
+ **Properties**
1064
+
1065
+ | Name | Type | Description |
1066
+ | --- | --- | --- |
1067
+ | topics | <code>Array.&lt;string&gt;</code> | Array of topic hex strings (with 0x prefix) |
1068
+ | data | <code>string</code> | Hex-encoded data string (with 0x prefix) |
1069
+
1070
+ <a name="module_quantum-coin-js-sdk..EventLogEncodeResult"></a>
1071
+
1072
+ ### quantum-coin-js-sdk~EventLogEncodeResult
1073
+ **Kind**: inner class of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1074
+
1075
+ * [~EventLogEncodeResult](#module_quantum-coin-js-sdk..EventLogEncodeResult)
1076
+ * [new EventLogEncodeResult(error, result)](#new_module_quantum-coin-js-sdk..EventLogEncodeResult_new)
1077
+ * [.error](#module_quantum-coin-js-sdk..EventLogEncodeResult+error) : <code>string</code>
1078
+ * [.result](#module_quantum-coin-js-sdk..EventLogEncodeResult+result) : <code>Object</code> \| <code>null</code>
1079
+
1080
+ <a name="new_module_quantum-coin-js-sdk..EventLogEncodeResult_new"></a>
1081
+
1082
+ #### new EventLogEncodeResult(error, result)
1083
+ Creates an EventLogEncodeResult class.
1084
+
1085
+
1086
+ | Param | Type | Description |
1087
+ | --- | --- | --- |
1088
+ | error | <code>string</code> | Error message if any. Empty string if no error. |
1089
+ | result | <code>Object</code> \| <code>null</code> | The actual result object with topics and data. Null if there was an error. |
1090
+ | result.topics | <code>Array.&lt;string&gt;</code> | Array of topic hex strings (with 0x prefix) |
1091
+ | result.data | <code>string</code> | Hex-encoded data string (with 0x prefix) |
1092
+
1093
+ <a name="module_quantum-coin-js-sdk..EventLogEncodeResult+error"></a>
1094
+
1095
+ #### eventLogEncodeResult.error : <code>string</code>
1096
+ Error message if any. Empty string if no error.
1097
+
1098
+ **Kind**: instance property of [<code>EventLogEncodeResult</code>](#module_quantum-coin-js-sdk..EventLogEncodeResult)
1099
+ **Access**: public
1100
+ <a name="module_quantum-coin-js-sdk..EventLogEncodeResult+result"></a>
1101
+
1102
+ #### eventLogEncodeResult.result : <code>Object</code> \| <code>null</code>
1103
+ The actual result object with topics and data. Null if there was an error.
1104
+
1105
+ **Kind**: instance property of [<code>EventLogEncodeResult</code>](#module_quantum-coin-js-sdk..EventLogEncodeResult)
1106
+ **Access**: public
1107
+ **Properties**
1108
+
1109
+ | Name | Type | Description |
1110
+ | --- | --- | --- |
1111
+ | topics | <code>Array.&lt;string&gt;</code> | Array of topic hex strings (with 0x prefix) |
1112
+ | data | <code>string</code> | Hex-encoded data string (with 0x prefix) |
1113
+
1114
+ <a name="module_quantum-coin-js-sdk..circl"></a>
1115
+
1116
+ ### quantum-coin-js-sdk~circl
1117
+ CIRCL WASM namespace (set after InitAccountsWebAssembly). Use getCircl() for access.
1118
+
1119
+ **Kind**: inner property of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1120
+ <a name="module_quantum-coin-js-sdk..initialize"></a>
1121
+
1122
+ ### quantum-coin-js-sdk~initialize(clientConfig) ⇒ <code>Promise.&lt;boolean&gt;</code>
1123
+ The initialize function has to be called before attempting to invoke any other function. This function should be called only once.
1124
+
1125
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1126
+ **Returns**: <code>Promise.&lt;boolean&gt;</code> - Returns a promise of type boolean; true if the initialization succeeded, else false.
1127
+
1128
+ | Param | Type | Description |
1129
+ | --- | --- | --- |
1130
+ | clientConfig | <code>Config</code> \| <code>undefined</code> | A configuration represented by the Config class. A default configuration is used, if not specified. |
1131
+
1132
+ <a name="module_quantum-coin-js-sdk..isAddressValid"></a>
1133
+
1134
+ ### quantum-coin-js-sdk~isAddressValid(address) ⇒ <code>boolean</code>
1135
+ The isAddressValid function validates whether an address is valid or not. An address is of length 66 characters including 0x.
1136
+
1137
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1138
+ **Returns**: <code>boolean</code> - Returns true if the address validation succeeded, else returns false.
1139
+
1140
+ | Param | Type | Description |
1141
+ | --- | --- | --- |
1142
+ | address | <code>string</code> | A string representing the address to validate. |
1143
+
1144
+ <a name="module_quantum-coin-js-sdk..getKeyTypeFromPrivateKey"></a>
1145
+
1146
+ ### quantum-coin-js-sdk~getKeyTypeFromPrivateKey(privateKey) ⇒ <code>number</code> \| <code>null</code>
1147
+ Internal: get key type (KEY_TYPE_HYBRIDEDMLDSASLHDSA or KEY_TYPE_HYBRIDEDMLDSASLHDSA5) from private key length.
1148
+
1149
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1150
+ **Returns**: <code>number</code> \| <code>null</code> - KEY_TYPE_HYBRIDEDMLDSASLHDSA (3), KEY_TYPE_HYBRIDEDMLDSASLHDSA5 (5), or null on error.
1151
+
1152
+ | Param | Type | Description |
1153
+ | --- | --- | --- |
1154
+ | privateKey | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Wallet private key bytes. |
1155
+
1156
+ <a name="module_quantum-coin-js-sdk..getKeyTypeFromPublicKey"></a>
1157
+
1158
+ ### quantum-coin-js-sdk~getKeyTypeFromPublicKey(publicKey) ⇒ <code>number</code> \| <code>null</code>
1159
+ Internal: get key type (KEY_TYPE_HYBRIDEDMLDSASLHDSA or KEY_TYPE_HYBRIDEDMLDSASLHDSA5) from public key length.
1160
+
1161
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1162
+ **Returns**: <code>number</code> \| <code>null</code> - KEY_TYPE_HYBRIDEDMLDSASLHDSA (3), KEY_TYPE_HYBRIDEDMLDSASLHDSA5 (5), or null on error.
1163
+
1164
+ | Param | Type | Description |
1165
+ | --- | --- | --- |
1166
+ | publicKey | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Public key bytes. |
1167
+
1168
+ <a name="module_quantum-coin-js-sdk..toUint8Array"></a>
1169
+
1170
+ ### quantum-coin-js-sdk~toUint8Array(key) ⇒ <code>Uint8Array</code>
1171
+ Convert key (number[] or Uint8Array) to Uint8Array for CIRCL.
1172
+
1173
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1174
+
1175
+ | Param | Type | Description |
1176
+ | --- | --- | --- |
1177
+ | key | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Key bytes. |
1178
+
1179
+ <a name="module_quantum-coin-js-sdk..newWallet"></a>
1180
+
1181
+ ### quantum-coin-js-sdk~newWallet(keyType) ⇒ <code>Wallet</code> \| <code>number</code>
1182
+ The newWallet function creates a new Wallet.
1183
+
1184
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1185
+ **Returns**: <code>Wallet</code> \| <code>number</code> - Returns a Wallet object, or -1000 (not initialized), -1001 (invalid key type), -1002 (crypto failure).
1186
+
1187
+ | Param | Type | Description |
1188
+ | --- | --- | --- |
1189
+ | keyType | <code>number</code> \| <code>null</code> | Optional. KEY_TYPE_HYBRIDEDMLDSASLHDSA (3) or KEY_TYPE_HYBRIDEDMLDSASLHDSA5 (5). null/undefined defaults to 3. |
1190
+
1191
+ <a name="module_quantum-coin-js-sdk..newWalletSeedWords"></a>
1192
+
1193
+ ### quantum-coin-js-sdk~newWalletSeedWords(keyType) ⇒ <code>Array.&lt;string&gt;</code> \| <code>number</code> \| <code>null</code>
1194
+ The newWalletSeedWords function creates a new wallet seed word list. The returned array can then be passed to the openWalletFromSeedWords function to create a new wallet.
1195
+
1196
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1197
+ **Returns**: <code>Array.&lt;string&gt;</code> \| <code>number</code> \| <code>null</code> - Returns an array of seed words (32 or 36 words depending on keyType). Returns -1000 if not initialized, null on failure.
1198
+
1199
+ | Param | Type | Description |
1200
+ | --- | --- | --- |
1201
+ | keyType | <code>number</code> \| <code>null</code> | Optional. KEY_TYPE_HYBRIDEDMLDSASLHDSA (3) or KEY_TYPE_HYBRIDEDMLDSASLHDSA5 (5). null/undefined defaults to 3. |
1202
+
1203
+ <a name="module_quantum-coin-js-sdk..openWalletFromSeed"></a>
1204
+
1205
+ ### quantum-coin-js-sdk~openWalletFromSeed(seedArray) ⇒ <code>Wallet</code> \| <code>number</code> \| <code>null</code>
1206
+ The openWalletFromSeed function creates a wallet from a raw seed byte array.
1207
+ Determines the key scheme from the array length: 96 bytes (hybrideds), 72 bytes (hybrid5), or 64 bytes (hybrid).
1208
+
1209
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1210
+ **Returns**: <code>Wallet</code> \| <code>number</code> \| <code>null</code> - Returns a Wallet object. Returns -1000 if not initialized, null if the operation failed.
1211
+
1212
+ | Param | Type | Description |
1213
+ | --- | --- | --- |
1214
+ | seedArray | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | The raw seed bytes. Length 96, 72, or 64 depending on scheme. |
1215
+
1216
+ <a name="module_quantum-coin-js-sdk..openWalletFromSeedWords"></a>
1217
+
1218
+ ### quantum-coin-js-sdk~openWalletFromSeedWords(seedWordList) ⇒ <code>Wallet</code> \| <code>number</code> \| <code>null</code>
1219
+ The openWalletFromSeedWords function creates a wallet from a seed word list. The seed word list is available for wallets created from Desktop/Web/Mobile wallets.
1220
+ Supports 48 words (hybrideds), 36 words (hybrid5), or 32 words (hybrid) per seed length.
1221
+
1222
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1223
+ **Returns**: <code>Wallet</code> \| <code>number</code> \| <code>null</code> - Returns a Wallet object. Returns -1000 if not initialized, null if the operation failed.
1224
+
1225
+ | Param | Type | Description |
1226
+ | --- | --- | --- |
1227
+ | seedWordList | <code>Array.&lt;string&gt;</code> | An array of seed words. Length 48, 36, or 32 depending on scheme. |
1228
+
1229
+ <a name="module_quantum-coin-js-sdk..deserializeEncryptedWallet"></a>
1230
+
1231
+ ### quantum-coin-js-sdk~deserializeEncryptedWallet(walletJsonString, passphrase) ⇒ <code>Wallet</code>
1232
+ The deserializeEncryptedWallet function opens a wallet backed-up using an application such as the Desktop/Mobile/CLI/Web wallet. This function can take upto a minute or so to execute. You should open wallets only from trusted sources.
1233
+
1234
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1235
+ **Returns**: <code>Wallet</code> - Returns a Wallet object. Returns null if opening the wallet fails.
1236
+
1237
+ | Param | Type | Description |
1238
+ | --- | --- | --- |
1239
+ | walletJsonString | <code>string</code> | The json string from a wallet file. |
1240
+ | passphrase | <code>string</code> | The passphrase used to encrypt the wallet. |
1241
+
1242
+ <a name="module_quantum-coin-js-sdk..serializeEncryptedWallet"></a>
1243
+
1244
+ ### quantum-coin-js-sdk~serializeEncryptedWallet(wallet, passphrase) ⇒ <code>string</code>
1245
+ The serializeEncryptedWallet function encrypts and serializes a Wallet object to a JSON string readable by the Desktop/Mobile/Web/CLI wallet applications. You can save this string to a file and open the file in one of these wallet applications. You may also open this string using the deserializeEncryptedWallet function. If you loose the passphrase, you will be unable to open the wallet. This function can take upto a minute or so to execute.
1246
+
1247
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1248
+ **Returns**: <code>string</code> - Returns the Wallet in JSON string format. If the wallet is invalid, null is returned.
1249
+
1250
+ | Param | Type | Description |
1251
+ | --- | --- | --- |
1252
+ | wallet | <code>Wallet</code> | A Wallet object representing the wallet to serialize. |
1253
+ | passphrase | <code>string</code> | A passphrase used to encrypt the wallet. It should atleast be 12 characters long. |
1254
+
1255
+ <a name="module_quantum-coin-js-sdk..serializeSeedAsEncryptedWallet"></a>
1256
+
1257
+ ### quantum-coin-js-sdk~serializeSeedAsEncryptedWallet(seedArray, passphrase) ⇒ <code>string</code> \| <code>number</code> \| <code>null</code>
1258
+ The serializeSeedAsEncryptedWallet function encrypts a raw seed byte array into a wallet JSON string
1259
+ that can be opened with deserializeEncryptedWallet or Desktop/Mobile/Web/CLI wallet applications.
1260
+ The seed is stored in its pre-expansion form (version 5 wallet format). This function can take
1261
+ up to a minute or so to execute due to key derivation.
1262
+
1263
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1264
+ **Returns**: <code>string</code> \| <code>number</code> \| <code>null</code> - Returns the encrypted wallet JSON string. Returns -1000 if not initialized, null if the operation failed.
1265
+
1266
+ | Param | Type | Description |
1267
+ | --- | --- | --- |
1268
+ | seedArray | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | The raw seed bytes. Length must be 96, 72, or 64 depending on scheme. |
1269
+ | passphrase | <code>string</code> | A passphrase used to encrypt the wallet. Must be at least 12 characters long. |
1270
+
1271
+ <a name="module_quantum-coin-js-sdk..verifyWallet"></a>
1272
+
1273
+ ### quantum-coin-js-sdk~verifyWallet(wallet) ⇒ <code>boolean</code>
1274
+ The verifyWallet function verifies whether a Wallet is valid or not. To mitigate spoofing and other attachs, it is highly recommended to verify a wallet, especially if it is from an untrusted source.
1275
+
1276
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1277
+ **Returns**: <code>boolean</code> - Returns true if the Wallet verification succeeded, else returns false.
1278
+
1279
+ | Param | Type | Description |
1280
+ | --- | --- | --- |
1281
+ | wallet | <code>Wallet</code> | A Wallet object representing the wallet to verify. |
1282
+
1283
+ <a name="module_quantum-coin-js-sdk..serializeWallet"></a>
1284
+
1285
+ ### quantum-coin-js-sdk~serializeWallet(wallet) ⇒ <code>string</code>
1286
+ The serializeWallet function serializes a Wallet object to a JSON string. You should encrypt the string before saving it to disk or a database.
1287
+
1288
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1289
+ **Returns**: <code>string</code> - Returns the Wallet in JSON string format. If the wallet is invalid, null is returned.
1290
+
1291
+ | Param | Type | Description |
1292
+ | --- | --- | --- |
1293
+ | wallet | <code>Wallet</code> | A Wallet object representing the wallet to serialize. |
1294
+
1295
+ <a name="module_quantum-coin-js-sdk..deserializeWallet"></a>
1296
+
1297
+ ### quantum-coin-js-sdk~deserializeWallet(walletJson) ⇒ <code>Wallet</code> \| <code>null</code>
1298
+ The deserializeWallet function creates a Wallet object from a JSON string.
1299
+
1300
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1301
+ **Returns**: <code>Wallet</code> \| <code>null</code> - Returns the Wallet corresponding to the walletJson. If the wallet is invalid or the JSON is malformed, null is returned.
1302
+
1303
+ | Param | Type | Description |
1304
+ | --- | --- | --- |
1305
+ | walletJson | <code>string</code> | A JSON string representing the wallet to deserialize. |
1306
+
1307
+ <a name="module_quantum-coin-js-sdk..postTransaction"></a>
1308
+
1309
+ ### quantum-coin-js-sdk~postTransaction(txnData) ⇒ <code>Promise.&lt;SendResult&gt;</code>
1310
+ The postTransaction function posts a signed transaction to the blockchain.
1311
+ This method can be used in conjunction with the signSendCoinTransaction method to submit a transaction that was signed using a cold wallet (offline or disconnected or air-gapped wallet).
1312
+
1313
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1314
+ **Returns**: <code>Promise.&lt;SendResult&gt;</code> - Returns a promise of type SendResult. txnHash will be null in SendResult.
1315
+
1316
+ | Param | Type | Description |
1317
+ | --- | --- | --- |
1318
+ | txnData | <code>string</code> | A signed transaction string returned by the signSendCoinTransaction function. |
1319
+
1320
+ <a name="module_quantum-coin-js-sdk..getLatestBlockDetails"></a>
1321
+
1322
+ ### quantum-coin-js-sdk~getLatestBlockDetails() ⇒ <code>Promise.&lt;LatestBlockDetailsResult&gt;</code>
1323
+ The getLatestBlockDetails function returns details of the latest block of the blockchain.
1324
+
1325
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1326
+ **Returns**: <code>Promise.&lt;LatestBlockDetailsResult&gt;</code> - Returns a promise of an object of type LatestBlockDetailsResult.
1327
+ <a name="module_quantum-coin-js-sdk..getAccountDetails"></a>
1328
+
1329
+ ### quantum-coin-js-sdk~getAccountDetails(address) ⇒ <code>Promise.&lt;AccountDetailsResult&gt;</code>
1330
+ The getAccountDetails function returns details of an account corresponding to the address.
1331
+
1332
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1333
+ **Returns**: <code>Promise.&lt;AccountDetailsResult&gt;</code> - Returns a promise of type AccountDetailsResult.
1334
+
1335
+ | Param | Type | Description |
1336
+ | --- | --- | --- |
1337
+ | address | <code>string</code> | The address of the account of which the details have to be retrieved. |
1338
+
1339
+ <a name="module_quantum-coin-js-sdk..getTransactionDetails"></a>
1340
+
1341
+ ### quantum-coin-js-sdk~getTransactionDetails(txnHash) ⇒ <code>Promise.&lt;TransactionDetailsResult&gt;</code>
1342
+ The getTransactionDetails function returns details of a transaction posted to the blockchain.
1343
+ Transactions may take a while to get registered in the blockchain. After a transaction is submitted, it may take a while before it is available for reading.
1344
+ Some transactions that have lower balance than the minimum required for gas fees may be discarded.
1345
+ In these cases, the transactions may not be returned when invoking the getTransactionDetails function.
1346
+ You should consider the transaction as succeeded only if the status field of the transactionReceipt object is 0x1 (success).
1347
+ The transactionReceipt field can be null unless the transaction is registered with the blockchain.
1348
+
1349
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1350
+ **Returns**: <code>Promise.&lt;TransactionDetailsResult&gt;</code> - Returns a promise of type TransactionDetailsResult.
1351
+
1352
+ | Param | Type | Description |
1353
+ | --- | --- | --- |
1354
+ | txnHash | <code>string</code> | The hash of the transaction to retrieve. |
1355
+
1356
+ <a name="module_quantum-coin-js-sdk..listAccountTransactions"></a>
1357
+
1358
+ ### quantum-coin-js-sdk~listAccountTransactions(address, pageNumber) ⇒ <code>Promise.&lt;AccountTransactionsResult&gt;</code>
1359
+ The listAccountTransactions function returns a list of transactions for a specific account.
1360
+ Transactions may take a while to get registered in the blockchain. After a transaction is submitted, it may take a while before it is available for listing.
1361
+ Some transactions that have lower balance than the minimum required for gas fees may be discarded.
1362
+ In these cases, the transactions may not be returned when invoking the listAccountTransactions function.
1363
+ You should consider the transaction as succeeded only if the status field of the AccountTransactionCompact object is 0x1 (success).
1364
+ Both transactions from and transactions to the address will be returned in the list.
1365
+ Use the getTransactionDetails function, passing the hash of the transaction to get detailed information about the transaction.
1366
+
1367
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1368
+ **Returns**: <code>Promise.&lt;AccountTransactionsResult&gt;</code> - Returns a promise of type AccountTransactionsResult.
1369
+
1370
+ | Param | Type | Description |
1371
+ | --- | --- | --- |
1372
+ | address | <code>string</code> | The address for which the transactions have to be listed. |
1373
+ | pageNumber | <code>number</code> | The page number for which the transactions has to be listed for the account. Pass 0 to list the latest page. Pass 1 to list the oldest page. A maximum of 20 transactions are returned in each page. The response of this API includes a field that shows the pageCount (total number of pages available). You can pass any number between 1 to pageCount to get the corresponding page. |
1374
+
1375
+ <a name="module_quantum-coin-js-sdk..signSendCoinTransaction"></a>
1376
+
1377
+ ### ~~quantum-coin-js-sdk~signSendCoinTransaction(wallet, toAddress, coins, nonce) ⇒ <code>Promise.&lt;SignResult&gt;</code>~~
1378
+ ***Use signRawTransaction instead.***
1379
+
1380
+ The signSendCoinTransaction function returns a signed transaction. The chainId used for signing should be provided in the initialize() function.
1381
+ Since the gas fee for sending coins is fixed at 1000 coins, there is no option to set the gas fee explicitly.
1382
+ This function is useful for offline (cold storage) wallets, where you can sign a transaction offline and then use the postTransaction function to post it on a connected device.
1383
+ Another usecase for this function is when you want to first store a signed transaction to a database, then queue it and finally submit the transaction by calling the postTransaction function.
1384
+
1385
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1386
+ **Returns**: <code>Promise.&lt;SignResult&gt;</code> - Returns a promise of type SignResult.
1387
+
1388
+ | Param | Type | Description |
1389
+ | --- | --- | --- |
1390
+ | wallet | <code>Wallet</code> | A Wallet object from which the transaction has to be sent. The address corresponding to the Wallet should have enough coins to cover gas fees as well. A minimum of 1000 coins (1000000000000000000000 wei) are required for gas fees. |
1391
+ | toAddress | <code>string</code> | The address to which the coins should be sent. |
1392
+ | coins | <code>string</code> | The string representing the number of coins (in ether) to send. To convert between ethers and wei, see https://docs.ethers.org/v4/api-utils.html#ether-strings-and-wei |
1393
+ | nonce | <code>number</code> | The nonce of the account retrieved by invoking the getAccountDetails function. You have to carefully manage state of the nonce to avoid sending the coins multiple times, such as when retrying sendCoins after a network error. |
1394
+
1395
+ <a name="module_quantum-coin-js-sdk..signTransaction"></a>
1396
+
1397
+ ### ~~quantum-coin-js-sdk~signTransaction(wallet, toAddress, coins, nonce, data) ⇒ <code>Promise.&lt;SignResult&gt;</code>~~
1398
+ ***Use signRawTransaction instead.***
1399
+
1400
+ The signTransaction function returns a signed transaction. The chainId used for signing should be provided in the initialize() function.
1401
+ Since the gas fee for sending coins is fixed at 1000 coins, there is no option to set the gas fee explicitly.
1402
+ This function is useful for offline (cold storage) wallets, where you can sign a transaction offline and then use the postTransaction function to post it on a connected device.
1403
+ Another usecase for this function is when you want to first store a signed transaction to a database, then queue it and finally submit the transaction by calling the postTransaction function.
1404
+
1405
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1406
+ **Returns**: <code>Promise.&lt;SignResult&gt;</code> - Returns a promise of type SignResult.
1407
+
1408
+ | Param | Type | Description |
1409
+ | --- | --- | --- |
1410
+ | wallet | <code>Wallet</code> | A Wallet object from which the transaction has to be sent. The address corresponding to the Wallet should have enough coins to cover gas fees as well. A minimum of 1000 coins (1000000000000000000000 wei) are required for gas fees. |
1411
+ | toAddress | <code>string</code> | The address to which the coins should be sent. |
1412
+ | coins | <code>string</code> | The string representing the number of coins (in ether) to send. To convert between ethers and wei, see https://docs.ethers.org/v4/api-utils.html#ether-strings-and-wei |
1413
+ | nonce | <code>number</code> | The nonce of the account retrieved by invoking the getAccountDetails function. You have to carefully manage state of the nonce to avoid sending the coins multiple times, such as when retrying sendCoins after a network error. |
1414
+ | data | <code>string</code> | Ignored. This parameter is accepted but not used. Use signRawTransaction to pass contract data. |
1415
+
1416
+ <a name="module_quantum-coin-js-sdk..hexStringToUint8Array"></a>
1417
+
1418
+ ### quantum-coin-js-sdk~hexStringToUint8Array(hex) ⇒ <code>Uint8Array</code>
1419
+ Helper function to convert a hex string to Uint8Array
1420
+
1421
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1422
+ **Returns**: <code>Uint8Array</code> - Uint8Array representation of the hex string, or empty array if null/undefined
1423
+
1424
+ | Param | Type | Description |
1425
+ | --- | --- | --- |
1426
+ | hex | <code>string</code> | Hex string with or without 0x prefix |
1427
+
1428
+ <a name="module_quantum-coin-js-sdk..signRawTransaction"></a>
1429
+
1430
+ ### quantum-coin-js-sdk~signRawTransaction(transactionSigningRequest) ⇒ <code>SignResult</code>
1431
+ The signRawTransaction function returns a signed transaction. The chainId used for signing can be provided in the TransactionSigningRequest, or if null, the chainId specified in the initialize() function will be used.
1432
+ With this function, you can set the gasLimit explicitly compared to signTransaction.
1433
+ You can also pass data to be signed, such as when creating or invoking a smart contract.
1434
+ Since the gas fee is fixed at 1000 coins for 21000 units of gas, there is no option to set the gas fee explicitly.
1435
+ This function is useful for offline (cold storage) wallets, where you can sign a transaction offline and then use the postTransaction function to post it on a connected device.
1436
+ Another usecase for this function is when you want to first store a signed transaction to a database, then queue it and finally submit the transaction by calling the postTransaction function.
1437
+
1438
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1439
+ **Returns**: <code>SignResult</code> - Returns a promise of type SignResult.
1440
+
1441
+ | Param | Type | Description |
1442
+ | --- | --- | --- |
1443
+ | transactionSigningRequest | <code>TransactionSigningRequest</code> | An object of type TransactionSigningRequest with the transaction signing details. |
1444
+
1445
+ <a name="module_quantum-coin-js-sdk..sign"></a>
1446
+
1447
+ ### quantum-coin-js-sdk~sign(privateKey, message, [signingContext]) ⇒ <code>Object</code>
1448
+ Sign a message with a private key. Optional signingContext selects algorithm (same pattern as signRawTransaction); if null/omitted, derived from private key type.
1449
+
1450
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1451
+ **Returns**: <code>Object</code> - resultCode 0 on success, signature bytes; negative on error (e.g. -1000 not initialized, -700 invalid args, -701 unknown key type, -702/-703 CIRCL sign error, -704 unsupported key type or context).
1452
+
1453
+ | Param | Type | Description |
1454
+ | --- | --- | --- |
1455
+ | privateKey | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Private key bytes. |
1456
+ | message | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Message bytes (e.g. 32-byte hash). |
1457
+ | [signingContext] | <code>number</code> \| <code>null</code> | Optional. 0 = hybridedmldsaslhdsa compact, 1 = hybridedmldsaslhdsa5, 2 = hybridedmldsaslhdsa full. If null/omitted, derived from private key type. |
1458
+
1459
+ <a name="module_quantum-coin-js-sdk..verify"></a>
1460
+
1461
+ ### quantum-coin-js-sdk~verify(publicKey, signature, message) ⇒ <code>Object</code>
1462
+ Verify a signature over a message with a public key. Algorithm is determined by the first byte of the signature: 1=hybrideds verifyCompact, 2=hybrideds verify, 3=hybridedmldsaslhdsa verifyCompact, 4=hybridedmldsaslhdsa verify, 5=hybridedmldsaslhdsa5 verify.
1463
+
1464
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1465
+ **Returns**: <code>Object</code> - resultCode 0 and valid true if signature is valid; negative on error (e.g. -1000 not initialized, -715 invalid args, -717 CIRCL verify error, -719 signature invalid, -718 unknown signature type).
1466
+
1467
+ | Param | Type | Description |
1468
+ | --- | --- | --- |
1469
+ | publicKey | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Public key bytes. |
1470
+ | signature | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Signature bytes from sign(); first byte selects verify function (1-5). |
1471
+ | message | <code>Array.&lt;number&gt;</code> \| <code>Uint8Array</code> | Message bytes (same as passed to sign). |
1472
+
1473
+ <a name="module_quantum-coin-js-sdk..sendCoins"></a>
1474
+
1475
+ ### ~~quantum-coin-js-sdk~sendCoins(wallet, toAddress, coins, nonce) ⇒ <code>Promise.&lt;SendResult&gt;</code>~~
1476
+ ***Use signRawTransaction and postTransaction instead.***
1477
+
1478
+ The sendCoins function posts a send-coin transaction to the blockchain. The chainId used for signing should be provided in the initialize() function.
1479
+ Since the gas fee for sending coins is fixed at 1000 coins, there is no option to set the gas fee explicitly.
1480
+ It may take many seconds after submitting a transaction before the transaction is returned by the getTransactionDetails function.
1481
+ Transactions are usually committed in less than 30 seconds.
1482
+
1483
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1484
+ **Returns**: <code>Promise.&lt;SendResult&gt;</code> - Returns a promise of type SendResult.
1485
+
1486
+ | Param | Type | Description |
1487
+ | --- | --- | --- |
1488
+ | wallet | <code>Wallet</code> | A Wallet object from which the transaction has to be sent. The address corresponding to the Wallet should have enough coins to cover gas fees as well. A minimum of 1000 coins (1000000000000000000000 wei) are required for gas fees. |
1489
+ | toAddress | <code>string</code> | The address to which the coins should be sent. |
1490
+ | coins | <code>string</code> | The string representing the number of coins (in ether) to send. To convert between ethers and wei, see https://docs.ethers.org/v4/api-utils.html#ether-strings-and-wei |
1491
+ | nonce | <code>number</code> | The nonce of the account retrieved by invoking the getAccountDetails function. You have to carefully manage state of the nonce to avoid sending the coins multiple times, such as when retrying sendCoins after a network error. |
1492
+
1493
+ <a name="module_quantum-coin-js-sdk..publicKeyFromSignature"></a>
1494
+
1495
+ ### quantum-coin-js-sdk~publicKeyFromSignature(digest, signature) ⇒ <code>string</code>
1496
+ The publicKeyFromSignature extracts the public key from a signature.
1497
+
1498
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1499
+ **Returns**: <code>string</code> - - Returns the public key as a hex string. Returns null if the operation failed.
1500
+
1501
+ | Param | Type | Description |
1502
+ | --- | --- | --- |
1503
+ | digest | <code>Array.&lt;number&gt;</code> | An array of bytes containing the digestHash. Should be of length 32. |
1504
+ | signature | <code>Array.&lt;number&gt;</code> | An array of bytes containing the signature. |
1505
+
1506
+ <a name="module_quantum-coin-js-sdk..publicKeyFromPrivateKey"></a>
1507
+
1508
+ ### quantum-coin-js-sdk~publicKeyFromPrivateKey(privateKey) ⇒ <code>string</code>
1509
+ The publicKeyFromPrivateKey extracts the public key from a private key.
1510
+
1511
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1512
+ **Returns**: <code>string</code> - - Returns the public key as a hex string. Returns null if the operation failed.
1513
+
1514
+ | Param | Type | Description |
1515
+ | --- | --- | --- |
1516
+ | privateKey | <code>Array.&lt;number&gt;</code> | An array of bytes containing the privateKey. |
1517
+
1518
+ <a name="module_quantum-coin-js-sdk..addressFromPublicKey"></a>
1519
+
1520
+ ### quantum-coin-js-sdk~addressFromPublicKey(publicKey) ⇒ <code>string</code>
1521
+ The addressFromPublicKey returns the address corresponding to the public key.
1522
+
1523
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1524
+ **Returns**: <code>string</code> - - Returns the address corresponding to the public key as a hex string. Returns null if the operation failed.
1525
+
1526
+ | Param | Type | Description |
1527
+ | --- | --- | --- |
1528
+ | publicKey | <code>Array.&lt;number&gt;</code> | An array of bytes containing the public key. |
1529
+
1530
+ <a name="module_quantum-coin-js-sdk..combinePublicKeySignature"></a>
1531
+
1532
+ ### quantum-coin-js-sdk~combinePublicKeySignature(publicKey, signature) ⇒ <code>string</code>
1533
+ The combinePublicKeySignature combines the public key and signature.
1534
+
1535
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1536
+ **Returns**: <code>string</code> - - Returns a hex string corresponding to combined signature. Returns null if the operation failed.
1537
+
1538
+ | Param | Type | Description |
1539
+ | --- | --- | --- |
1540
+ | publicKey | <code>Array.&lt;number&gt;</code> | An array of bytes containing the public key. |
1541
+ | signature | <code>Array.&lt;number&gt;</code> | An array of bytes containing the signature. |
1542
+
1543
+ <a name="module_quantum-coin-js-sdk..packMethodData"></a>
1544
+
1545
+ ### quantum-coin-js-sdk~packMethodData(abiJSON, methodName, ...args) ⇒ <code>PackUnpackResult</code>
1546
+ The packMethodData function packs a Solidity method call with the given ABI, method name, and arguments.
1547
+ It returns the transaction data as a hex string that can be included in a transaction.
1548
+
1549
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1550
+ **Returns**: <code>PackUnpackResult</code> - - Returns a PackUnpackResult object containing the error (if any) and the packed transaction data as a hex string.
1551
+
1552
+ | Param | Type | Description |
1553
+ | --- | --- | --- |
1554
+ | abiJSON | <code>string</code> | The Solidity ABI file content as a JSON string |
1555
+ | methodName | <code>string</code> | The name of the method to call |
1556
+ | ...args | <code>\*</code> | The parameters to pass to the method (variable arguments) |
1557
+
1558
+ <a name="module_quantum-coin-js-sdk..unpackMethodData"></a>
1559
+
1560
+ ### quantum-coin-js-sdk~unpackMethodData(abiJSON, methodName, hexData) ⇒ <code>PackUnpackResult</code>
1561
+ The unpackMethodData function unpacks the return values of a Solidity method call.
1562
+ It returns the unpacked values as a JavaScript array or object.
1563
+
1564
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1565
+ **Returns**: <code>PackUnpackResult</code> - - Returns a PackUnpackResult object containing the error (if any) and the unpacked return values as a JSON string.
1566
+
1567
+ | Param | Type | Description |
1568
+ | --- | --- | --- |
1569
+ | abiJSON | <code>string</code> | The Solidity ABI file content as a JSON string |
1570
+ | methodName | <code>string</code> | The name of the method whose return values to unpack |
1571
+ | hexData | <code>string</code> | The hex-encoded return data (with or without 0x prefix) |
1572
+
1573
+ <a name="module_quantum-coin-js-sdk..packCreateContractData"></a>
1574
+
1575
+ ### quantum-coin-js-sdk~packCreateContractData(abiJSON, bytecode, ...args) ⇒ <code>PackUnpackResult</code>
1576
+ The packCreateContractData function packs constructor data for contract creation.
1577
+ It combines the contract bytecode with the ABI-encoded constructor parameters.
1578
+ This matches the Go pattern: Pack("", params...) and append(bytecode, input...)
1579
+
1580
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1581
+ **Returns**: <code>PackUnpackResult</code> - - Returns a PackUnpackResult object containing the error (if any) and the packed contract creation data as a hex string.
1582
+
1583
+ | Param | Type | Description |
1584
+ | --- | --- | --- |
1585
+ | abiJSON | <code>string</code> | The Solidity ABI file content as a JSON string |
1586
+ | bytecode | <code>string</code> | The contract bytecode as a hex string (with or without 0x prefix) |
1587
+ | ...args | <code>\*</code> | The constructor parameters (variable arguments, can be 0 or more) |
1588
+
1589
+ <a name="module_quantum-coin-js-sdk..encodeEventLog"></a>
1590
+
1591
+ ### quantum-coin-js-sdk~encodeEventLog(abiJSON, eventName, ...args) ⇒ <code>EventLogEncodeResult</code>
1592
+ The encodeEventLog function encodes event parameters into topics and data according to the ABI specification.
1593
+ It returns the topics array and data hex string that can be used to create event logs.
1594
+
1595
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1596
+ **Returns**: <code>EventLogEncodeResult</code> - - Returns an EventLogEncodeResult object containing the error (if any) and the encoded event log with topics and data.
1597
+
1598
+ | Param | Type | Description |
1599
+ | --- | --- | --- |
1600
+ | abiJSON | <code>string</code> | The Solidity ABI file content as a JSON string |
1601
+ | eventName | <code>string</code> | The name of the event to encode |
1602
+ | ...args | <code>\*</code> | The event parameter values (variable arguments) |
1603
+
1604
+ <a name="module_quantum-coin-js-sdk..decodeEventLog"></a>
1605
+
1606
+ ### quantum-coin-js-sdk~decodeEventLog(abiJSON, eventName, topics, data) ⇒ <code>PackUnpackResult</code>
1607
+ The decodeEventLog function decodes event log topics and data back into event parameters.
1608
+ It returns the decoded values as a JavaScript object.
1609
+
1610
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1611
+ **Returns**: <code>PackUnpackResult</code> - - Returns a PackUnpackResult object containing the error (if any) and the decoded event parameters as a JSON string.
1612
+
1613
+ | Param | Type | Description |
1614
+ | --- | --- | --- |
1615
+ | abiJSON | <code>string</code> | The Solidity ABI file content as a JSON string |
1616
+ | eventName | <code>string</code> | The name of the event to decode |
1617
+ | topics | <code>Array.&lt;string&gt;</code> | Array of topic hex strings (with or without 0x prefix) |
1618
+ | data | <code>string</code> | Hex-encoded data string (with or without 0x prefix) |
1619
+
1620
+ <a name="module_quantum-coin-js-sdk..encodeRlp"></a>
1621
+
1622
+ ### quantum-coin-js-sdk~encodeRlp(value) ⇒ <code>PackUnpackResult</code>
1623
+ The encodeRlp function encodes a JavaScript value to RLP (Recursive Length Prefix) format.
1624
+ Supports: strings, numbers, booleans, arrays, objects (maps), and hex-encoded bytes.
1625
+ Returns a hex-encoded string of the RLP-encoded data.
1626
+
1627
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1628
+ **Returns**: <code>PackUnpackResult</code> - - Returns a PackUnpackResult object containing the error (if any) and the RLP-encoded data as a hex string.
1629
+
1630
+ | Param | Type | Description |
1631
+ | --- | --- | --- |
1632
+ | value | <code>\*</code> | The value to encode (can be string, number, boolean, array, object, etc.) |
1633
+
1634
+ <a name="module_quantum-coin-js-sdk..decodeRlp"></a>
1635
+
1636
+ ### quantum-coin-js-sdk~decodeRlp(data) ⇒ <code>PackUnpackResult</code>
1637
+ The decodeRlp function decodes RLP-encoded data back to a JavaScript-compatible value.
1638
+ Takes a hex-encoded string and returns a JSON string representation of the decoded value.
1639
+
1640
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1641
+ **Returns**: <code>PackUnpackResult</code> - - Returns a PackUnpackResult object containing the error (if any) and the decoded value as a JSON string.
1642
+
1643
+ | Param | Type | Description |
1644
+ | --- | --- | --- |
1645
+ | data | <code>string</code> | The hex-encoded RLP data (with or without 0x prefix) |
1646
+
1647
+ <a name="module_quantum-coin-js-sdk..createAddress"></a>
1648
+
1649
+ ### quantum-coin-js-sdk~createAddress(address, nonce) ⇒ <code>string</code> \| <code>null</code>
1650
+ The createAddress function calculates the contract address that will be created by a transaction.
1651
+ This uses the CREATE opcode address calculation: keccak256(RLP(sender, nonce))
1652
+
1653
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1654
+ **Returns**: <code>string</code> \| <code>null</code> - - Returns the contract address as a hex string, or null if an error occurred.
1655
+
1656
+ | Param | Type | Description |
1657
+ | --- | --- | --- |
1658
+ | address | <code>string</code> | The address of the account that will create the contract (hex string with 0x prefix) |
1659
+ | nonce | <code>number</code> | The nonce of the account at the time of contract creation |
1660
+
1661
+ <a name="module_quantum-coin-js-sdk..createAddress2"></a>
1662
+
1663
+ ### quantum-coin-js-sdk~createAddress2(address, salt, initHash) ⇒ <code>string</code> \| <code>null</code>
1664
+ The createAddress2 function calculates the contract address using the CREATE2 opcode.
1665
+ This allows deterministic contract address calculation: keccak256(0xff || sender || salt || keccak256(init_code))
1666
+
1667
+ **Kind**: inner method of [<code>quantum-coin-js-sdk</code>](#module_quantum-coin-js-sdk)
1668
+ **Returns**: <code>string</code> \| <code>null</code> - - Returns the contract address as a hex string, or null if an error occurred.
1669
+
1670
+ | Param | Type | Description |
1671
+ | --- | --- | --- |
1672
+ | address | <code>string</code> | The address of the account that will create the contract (hex string with 0x prefix) |
1673
+ | salt | <code>string</code> | A 32-byte salt value as a hex string (with 0x prefix) |
1674
+ | initHash | <code>string</code> | The keccak256 hash of the contract initialization code as a hex string (with 0x prefix) |
1675
+