Quantum Coin - Q SDK in JavaScript
npm install quantum-coin-js-sdkExample
``js
Requires Node.js version v20.18.1 or higher
Installation:
npm install quantum-coin-js-sdk --save
//Adding reference:
var qcsdk = require('quantum-coin-js-sdk');
//Example initialization with defaults for mainnet
//Initialize the SDK first before invoking any other function
qcsdk.initialize(null).then((initResult) => {
}
//Example initialization with specific values
//Initialize the SDK first before invoking any other function
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)
qcsdk.initialize(clientConfigVal).then((initResult) => {
}
Example Project: https://github.com/quantumcoinproject/quantum-coin-js-sdk/tree/main/example
``
* quantum-coin-js-sdk
* ~Config
* new Config(readUrl, writeUrl, chainId, readApiKey, writeApiKey)
* .readUrl : string
* .writeUrl : string
* .chainId : number
* .readApiKey : string
* .writeApiKey : string
* ~Wallet
* new Wallet(address, privateKey, publicKey)
* .address : string
* .privateKey : Array.<number>
* .publicKey : Array.<number>
* ~BlockDetails
* .blockNumber : number
* ~LatestBlockDetailsResult
* .resultCode : number
* .blockDetails : BlockDetails
* .response : Object
* .requestId : string
* .err : Error
* ~AccountDetails
* .address : string
* .balance : string
* .nonce : number
* .blockNumber : number
* ~AccountDetailsResult
* .resultCode : number
* .accountDetails : AccountDetails
* .response : Object
* .requestId : string
* .err : Error
* ~SignResult
* .resultCode : number
* .txnHash : string
* .txnData : string
* ~SendResult
* .resultCode : number
* .txnHash : string
* .response : Object
* .requestId : string
* .err : Error
* ~TransactionReceipt
* .cumulativeGasUsed : string
* .effectiveGasPrice : string
* .gasUsed : string
* .status : string
* .hash : string
* .type : string
* ~TransactionDetails
* .blockHash : string
* .blockNumber : number
* .from : string
* .gas : string
* .gasPrice : string
* .hash : string
* .input : string
* .nonce : number
* .to : string
* .value : string
* .receipt : TransactionReceipt
* ~TransactionDetailsResult
* .resultCode : number
* .transactionDetails : TransactionDetails
* .response : Object
* .requestId : string
* .err : Error
* ~AccountTransactionCompact
* .blockNumber : number
* .from : string
* .hash : string
* .to : string
* .value : string
* .status : string
* ~ListAccountTransactionsResponse
* .pageCount : number
* .items : AccountTransactionCompact \| Array
* ~AccountTransactionsResult
* .resultCode : number
* .listAccountTransactionsResponse : ListAccountTransactionsResponse
* .response : Object
* .requestId : string
* .err : Error
* ~TransactionSigningRequest
* new TransactionSigningRequest(wallet, toAddress, valueInWei, nonce, data, gasLimit, remarks, chainId)
* .wallet : Wallet
* .toAddress : string \| null
* .valueInWei : string \| BigInt \| null
* .nonce : number
* .data : string \| null
* .gasLimit : number
* .remarks : string \| null
* .chainId : number \| null
* ~PackUnpackResult
* new PackUnpackResult(error, result)
* .error : string
* .result : string
* ~EventLogEncodeResult
* new EventLogEncodeResult(error, result)
* .error : string
* .result : Object \| null
* ~EventLogEncodeResult
* new EventLogEncodeResult(error, result)
* .error : string
* .result : Object \| null
* ~initialize(clientConfig) ⇒ Promise.<boolean>
* ~isAddressValid(address) ⇒ boolean
* ~newWallet() ⇒ Wallet
* ~newWalletSeed() ⇒ array
* ~openWalletFromSeedWords(seedWordList) ⇒ Wallet
* ~deserializeEncryptedWallet(walletJsonString, passphrase) ⇒ Wallet
* ~serializeEncryptedWallet(wallet, passphrase) ⇒ string
* ~verifyWallet(wallet) ⇒ boolean
* ~serializeWallet(wallet) ⇒ string
* ~deserializeWallet(walletJson) ⇒ Wallet
* ~postTransaction(txnData) ⇒ Promise.<SendResult>
* ~getLatestBlockDetails() ⇒ Promise.<LatestBlockDetailsResult>
* ~getAccountDetails(address) ⇒ Promise.<AccountDetailsResult>
* ~getTransactionDetails(txnHash) ⇒ Promise.<TransactionDetailsResult>
* ~listAccountTransactions(address, pageNumber) ⇒ Promise.<ListAccountTransactionsResponse>
* ~signSendCoinTransaction(wallet, toAddress, coins, nonce) ⇒ SignResult
* ~signTransaction(wallet, toAddress, coins, nonce, data) ⇒ SignResult
* ~hexStringToUint8Array(hex) ⇒ Uint8Array
* ~signRawTransaction(transactionSigningRequest) ⇒ SignResult
* ~sendCoins(wallet, toAddress, coins, nonce) ⇒ Promise.<SendResult>
* ~publicKeyFromSignature(digest, signature) ⇒ string
* ~publicKeyFromPrivateKey(privateKey) ⇒ string
* ~addressFromPublicKey(publicKey) ⇒ string
* ~combinePublicKeySignature(publicKey, signature) ⇒ string
* ~packMethodData(abiJSON, methodName, ...args) ⇒ PackUnpackResult
* ~unpackMethodData(abiJSON, methodName, hexData) ⇒ PackUnpackResult
* ~packCreateContractData(abiJSON, bytecode, ...args) ⇒ PackUnpackResult
* ~encodeEventLog(abiJSON, eventName, ...args) ⇒ EventLogEncodeResult
* ~decodeEventLog(abiJSON, eventName, topics, data) ⇒ PackUnpackResult
* ~encodeRlp(value) ⇒ PackUnpackResult
* ~decodeRlp(data) ⇒ PackUnpackResult
* ~createAddress(address, nonce) ⇒ string \| null
* ~createAddress2(address, salt, initHash) ⇒ string \| null
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~Config
* new Config(readUrl, writeUrl, chainId, readApiKey, writeApiKey)
* .readUrl : string
* .writeUrl : string
* .chainId : number
* .readApiKey : string
* .writeApiKey : string
#### new Config(readUrl, writeUrl, chainId, readApiKey, writeApiKey)
Creates a config class
| Param | Type | Description |
| --- | --- | --- |
| readUrl | string | 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 |
| writeUrl | string | 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 |
| chainId | number | The chain id of the blockchain. Mainnet chainId is 123123. Testnet T4 chainId is 310324. |
| readApiKey | string | Optional parameter if authorization is enabled for the relay service. API Key for authorization. Defaults to null which indicates no authorization. |
| writeApiKey | string | Optional parameter if authorization is enabled for the relay service. API Key for authorization. Defaults to null which indicates no authorization. |
#### config.readUrl : string
The Read API URL pointing to a read relay. See https://github.com/quantumcoinproject/quantum-coin-go/tree/dogep/relay
Kind: instance property of Config
Access: public
#### config.writeUrl : string
The Read API URL pointing to a read relay. See https://github.com/quantumcoinproject/quantum-coin-go/tree/dogep/relay
Kind: instance property of Config
Access: public
#### config.chainId : number
The chain id of the blockchain. Mainnet chainId is 123123. Testnet T4 chainId is 310324.
Kind: instance property of Config
Access: public
#### config.readApiKey : string
API Key for authorization if authorization is enabled for the relay service. Defaults to null which indicates no authorization.
Kind: instance property of Config
Access: public
#### config.writeApiKey : string
API Key for authorization if authorization is enabled for the relay service. Defaults to null which indicates no authorization.
Kind: instance property of Config
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~Wallet
* new Wallet(address, privateKey, publicKey)
* .address : string
* .privateKey : Array.<number>
* .publicKey : Array.<number>
#### new Wallet(address, privateKey, publicKey)
Creates a Wallet class. The constructor does not verify the wallet. To verify a wallet, call the verifyWallet function explicitly.
| Param | Type | Description |
| --- | --- | --- |
| address | string | Address of the wallet |
| privateKey | Array.<number> | Private Key byte array of the wallet |
| publicKey | Array.<number> | The chain id of the blockchain. Mainnet chainId is 123123. Testnet T4 chainId is 310324. |
#### wallet.address : string
Address of the wallet. Is 66 bytes in length including 0x (if the wallet is valid).
Kind: instance property of Wallet
Access: public
#### wallet.privateKey : Array.<number>
Private Key byte array of the wallet. Is 4064 bytes in length (if the wallet is valid).
Kind: instance property of Wallet
Access: public
#### wallet.publicKey : Array.<number>
Public Key byte array of the wallet. Is 1408 bytes in length (if the wallet is valid).
Kind: instance property of Wallet
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
#### blockDetails.blockNumber : number
Block Number of the block
Kind: instance property of BlockDetails
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~LatestBlockDetailsResult
* .resultCode : number
* .blockDetails : BlockDetails
* .response : Object
* .requestId : string
* .err : Error
#### latestBlockDetailsResult.resultCode : number
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.
Kind: instance property of LatestBlockDetailsResult
Access: public
#### latestBlockDetailsResult.blockDetails : BlockDetails
An object of type BlockDetails representing the block. This value is null if the value of resultCode is not 0.
Kind: instance property of LatestBlockDetailsResult
Access: public
#### latestBlockDetailsResult.response : Object
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.
Kind: instance property of LatestBlockDetailsResult
Access: public
#### latestBlockDetailsResult.requestId : string
An unique id to represent the request. This can be null if request failed before it could be sent.
Kind: instance property of LatestBlockDetailsResult
Access: public
#### latestBlockDetailsResult.err : Error
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.
Kind: instance property of LatestBlockDetailsResult
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~AccountDetails
* .address : string
* .balance : string
* .nonce : number
* .blockNumber : number
#### accountDetails.address : string
Address of the wallet. Is 66 bytes in length including 0x.
Kind: instance property of AccountDetails
Access: public
#### accountDetails.balance : string
Balance of the account in wei. To convert this to ethers, see https://docs.ethers.org/v4/api-utils.html#ether-strings-and-wei
Kind: instance property of AccountDetails
Access: public
#### accountDetails.nonce : number
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.
Kind: instance property of AccountDetails
Access: public
#### accountDetails.blockNumber : number
The block number as of which the Account details was retrieved.
Kind: instance property of AccountDetails
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~AccountDetailsResult
* .resultCode : number
* .accountDetails : AccountDetails
* .response : Object
* .requestId : string
* .err : Error
#### accountDetailsResult.resultCode : number
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.
Kind: instance property of AccountDetailsResult
Access: public
#### accountDetailsResult.accountDetails : AccountDetails
An object of type AccountDetails representing the block. This value is null if the value of resultCode is not 0.
Kind: instance property of AccountDetailsResult
Access: public
#### accountDetailsResult.response : Object
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.
Kind: instance property of AccountDetailsResult
Access: public
#### accountDetailsResult.requestId : string
An unique id to represent the request. This can be null if request failed before it could be sent.
Kind: instance property of AccountDetailsResult
Access: public
#### accountDetailsResult.err : Error
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.
Kind: instance property of AccountDetailsResult
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~SignResult
* .resultCode : number
* .txnHash : string
* .txnData : string
#### signResult.resultCode : number
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.
Kind: instance property of SignResult
Access: public
#### signResult.txnHash : string
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.
Kind: instance property of SignResult
Access: public
#### signResult.txnData : string
A payload representing the signed transaction.
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.
This value is null if the value of resultCode is not 0.
Kind: instance property of SignResult
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~SendResult
* .resultCode : number
* .txnHash : string
* .response : Object
* .requestId : string
* .err : Error
#### sendResult.resultCode : number
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.
Kind: instance property of SendResult
Access: public
#### sendResult.txnHash : string
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.
Kind: instance property of SendResult
Access: public
#### sendResult.response : Object
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.
Kind: instance property of SendResult
Access: public
#### sendResult.requestId : string
An unique id to represent the request. This can be null if request failed before it could be sent.
Kind: instance property of SendResult
Access: public
#### sendResult.err : Error
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.
Kind: instance property of SendResult
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~TransactionReceipt
* .cumulativeGasUsed : string
* .effectiveGasPrice : string
* .gasUsed : string
* .status : string
* .hash : string
* .type : string
#### transactionReceipt.cumulativeGasUsed : string
A hexadecimal string representing the total amount of gas used when this transaction was executed in the block.
Kind: instance property of TransactionReceipt
Access: public
#### transactionReceipt.effectiveGasPrice : string
A hexadecimal string representing the sum of the base fee and tip paid per unit of gas.
Kind: instance property of TransactionReceipt
Access: public
#### transactionReceipt.gasUsed : string
A hexadecimal string representing the amount of gas used by this specific transaction alone.
Kind: instance property of TransactionReceipt
Access: public
#### transactionReceipt.status : string
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).
Kind: instance property of TransactionReceipt
Access: public
#### transactionReceipt.hash : string
Hash of the Transaction, to uniquely identify it. Is 66 bytes in length including 0x.
Kind: instance property of TransactionReceipt
Access: public
#### transactionReceipt.type : string
A hexadecimal string representing the transaction type. 0x0 is DefaultFeeTxType.
Kind: instance property of TransactionReceipt
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~TransactionDetails
* .blockHash : string
* .blockNumber : number
* .from : string
* .gas : string
* .gasPrice : string
* .hash : string
* .input : string
* .nonce : number
* .to : string
* .value : string
* .receipt : TransactionReceipt
#### transactionDetails.blockHash : string
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.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.blockNumber : number
The number of the block that registered the transaction. This field can be null if the transaction was not registered in the blockchain.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.from : string
A 66 character hexadecimal string representing the address the transaction is sent from.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.gas : string
A hexadecimal string representing the gas provided for the transaction execution.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.gasPrice : string
A hexadecimal string representing the gasPrice used for each paid gas, in Wei.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.hash : string
A 66 character hexadecimal string representing the hash of the transaction.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.input : string
A hexadecimal string representing the compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.nonce : number
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.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.to : string
A 66 character hexadecimal string representing address the transaction is directed to.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.value : string
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.
Kind: instance property of TransactionDetails
Access: public
#### transactionDetails.receipt : TransactionReceipt
The receipt of the transaction. This field will be null while the transaction is pending (not yet registered in the blockchain).
Kind: instance property of TransactionDetails
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~TransactionDetailsResult
* .resultCode : number
* .transactionDetails : TransactionDetails
* .response : Object
* .requestId : string
* .err : Error
#### transactionDetailsResult.resultCode : number
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.
Kind: instance property of TransactionDetailsResult
Access: public
#### transactionDetailsResult.transactionDetails : TransactionDetails
An object of type TransactionDetails representing the transaction. This value is null if the value of resultCode is not 0.
Kind: instance property of TransactionDetailsResult
Access: public
#### transactionDetailsResult.response : Object
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.
Kind: instance property of TransactionDetailsResult
Access: public
#### transactionDetailsResult.requestId : string
An unique id to represent the request. This can be null if request failed before it could be sent.
Kind: instance property of TransactionDetailsResult
Access: public
#### transactionDetailsResult.err : Error
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.
Kind: instance property of TransactionDetailsResult
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~AccountTransactionCompact
* .blockNumber : number
* .from : string
* .hash : string
* .to : string
* .value : string
* .status : string
#### accountTransactionCompact.blockNumber : number
The number of the block that registered the transaction. This field can be null if the transaction was not registered in the blockchain.
Kind: instance property of AccountTransactionCompact
Access: public
#### accountTransactionCompact.from : string
A 66 character hexadecimal string representing the address the transaction is sent from.
Kind: instance property of AccountTransactionCompact
Access: public
#### accountTransactionCompact.hash : string
A 66 character hexadecimal string representing the hash of the transaction.
Kind: instance property of AccountTransactionCompact
Access: public
#### accountTransactionCompact.to : string
A 66 character hexadecimal string representing address the transaction is directed to.
Kind: instance property of AccountTransactionCompact
Access: public
#### accountTransactionCompact.value : string
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.
Kind: instance property of AccountTransactionCompact
Access: public
#### accountTransactionCompact.status : string
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).
Kind: instance property of AccountTransactionCompact
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~ListAccountTransactionsResponse
* .pageCount : number
* .items : AccountTransactionCompact \| Array
#### listAccountTransactionsResponse.pageCount : number
The number of pages available for listing.
Kind: instance property of ListAccountTransactionsResponse
Access: public
#### listAccountTransactionsResponse.items : AccountTransactionCompact \| Array
An array of type AccountTransactionCompact, containing the list of transactions. Can be null if no items are available.
Kind: instance property of ListAccountTransactionsResponse
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~AccountTransactionsResult
* .resultCode : number
* .listAccountTransactionsResponse : ListAccountTransactionsResponse
* .response : Object
* .requestId : string
* .err : Error
#### accountTransactionsResult.resultCode : number
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.
Kind: instance property of AccountTransactionsResult
Access: public
#### accountTransactionsResult.listAccountTransactionsResponse : ListAccountTransactionsResponse
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.
Kind: instance property of AccountTransactionsResult
Access: public
#### accountTransactionsResult.response : Object
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.
Kind: instance property of AccountTransactionsResult
Access: public
#### accountTransactionsResult.requestId : string
An unique id to represent the request. This can be null if request failed before it could be sent.
Kind: instance property of AccountTransactionsResult
Access: public
#### accountTransactionsResult.err : Error
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.
Kind: instance property of AccountTransactionsResult
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~TransactionSigningRequest
* new TransactionSigningRequest(wallet, toAddress, valueInWei, nonce, data, gasLimit, remarks, chainId)
* .wallet : Wallet
* .toAddress : string \| null
* .valueInWei : string \| BigInt \| null
* .nonce : number
* .data : string \| null
* .gasLimit : number
* .remarks : string \| null
* .chainId : number \| null
#### new TransactionSigningRequest(wallet, toAddress, valueInWei, nonce, data, gasLimit, remarks, chainId)
Creates a TransactionSigningRequest class.
| Param | Type | Description |
| --- | --- | --- |
| wallet | Wallet | 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. |
| toAddress | string | The address to which the transaction request is made. Can be null (for example, for contract creation). |
| valueInWei | string \| BigInt | 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 |
| nonce | number | 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. |
| data | string | An optional hex string (including 0x) that represents the contract data. Can be null if not invoking or creating a contract. |
| gasLimit | number | A limit of gas to be used. Set 21000 for basic non smart contract transactions. |
| remarks | string | 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. |
| chainId | number \| null | 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. |
#### transactionSigningRequest.wallet : Wallet
The wallet that should be used to sign the transaction.
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.toAddress : string \| null
The address to which the transaction request is made. Can be null (for example, for contract creation).
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.valueInWei : string \| BigInt \| null
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
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.nonce : number
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.
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.data : string \| null
An optional hex string (including 0x) that represents the contract data. Can be null if not invoking or creating a contract.
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.gasLimit : number
A limit of gas to be used. Set 21000 for basic non smart contract transactions.
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.remarks : string \| null
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.
Kind: instance property of TransactionSigningRequest
Access: public
#### transactionSigningRequest.chainId : number \| null
The chain id of the blockchain. Mainnet chainId is 123123. If null, the chainId specified in the initialize() function will be used.
Kind: instance property of TransactionSigningRequest
Access: public
Kind: inner class of quantum-coin-js-sdk
Access: public
* ~PackUnpackResult
* new PackUnpackResult(error, result)
* .error : string
* .result : string
#### new PackUnpackResult(error, result)
Creates a PackUnpackResult class.
| Param | Type | Description |
| --- | --- | --- |
| error | string | Error message if any. Empty string if no error. |
| result | string | The actual result as a string. Empty string if there was an error. |
#### packUnpackResult.error : string
Error message if any. Empty string if no error.
Kind: instance property of PackUnpackResult
Access: public
#### packUnpackResult.result : string
The actual result as a string. Empty string if there was an error.
Kind: instance property of PackUnpackResult
Access: public
Kind: inner class of [quantum-c