quantum-coin-js-sdk 1.0.32 → 1.0.34

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