On this page you will find description of every method in Qwertycoin RPC Wallet API. Qwertycoin RPC Wallet is a HTTP server which provides JSON 2.0 RPC interface for Qwertycoin payment operations and address management. Each method has its own page that can be found by clicking on this method.
More on how to start and operate Qwertycoin RPC Wallet can be found here: [Using-RPC-Wallet.md Qwertycoin RPC Wallet].
To make a JSON PRC request to your Qwertycoin RPC Wallet you should use POST request that looks like this:
http://<service address>:<service port>/json_rpc
Where:
is an IP of Qwertycoin RPC Wallet, if RPC Wallet is located on local machine it is either 127.0.0.1 or localhost,
is Qwertycoin RPC Wallet port, by default it is binded to 8070 port, but it can be manually binded to any port you want, read more about this
Reset
reset() method allows you to re-sync your wallet.
Input.
No output in case of success.
Important: If the view_secret_key was not pointed out reset() methods resets the wallet and re-syncs it. If the view_secret_key argument was pointed out reset() method substitutes the existing wallet with a new one with a specified view_secret_key and creates an address for it.
getTransactionHashes() method returns an array of block and transaction hashes.
Transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.
Input:
Note: if paymentId parameter is set, getTransactionHashes() method returns transaction hashes of transactions that contain specified payment_id. (in the set block range)
Note: if addresses parameter is set, getTransactionHashes() method returns transaction hashes of transactions that contain transfer from at least one of specified addresses.
Note: if both above mentioned parameters are set, getTransactionHashes() method returns transaction hashes of transactions that contain both specified payment_id and transfer from at least one of specified addresses.
getTransactions() method returns an array of block and transaction hashes.
Transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.
Input:
Note: if paymentId parameter is set, getTransactions() method returns transactions that contain specified payment_id. (in the set block range)
Note: if addresses parameter is set, getTransactions() method returns transactions that contain transfer from at least one of specified addresses.
Note: if both above mentioned parameters are set, getTransactions() method returns transactions that contain both specified payment_id and transfer from at least one of specified addresses.
Output:
- block\_hash - string - hash of the block which contains a transaction
- transactions - array - contains
** transactionHash - string - hash of the transaction ** blockIndex - uint32 - number of the block that contains a transaction ** timestamp - uint64 - timestamp of the transaction ** isBase - boolean - shows if the transaction is a coinbase transaction or not ** unlockTime - uint64 - height of the block when transaction is going to be available for spending ** amount - int64 - amount of the transaction ** fee - uint64- transaction fee ** extra - string ** paymentId - string - payment\_id of the transaction (optional) ** transfers - array - contains **\* address - string **\* amount - int64 | array | See below |
getUnconfirmedTransactionHashes() method returns information about the current unconfirmed transaction pool or for a specified addresses.
Transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.
Input:
Note: if addresses parameter is set, getUnconfirmedTransactionHashes() method returns transactions that contain transfer from at least one of specified addresses.
getTransaction() method returns information about a particular transaction.
Transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.
Input:
Output:
- transactionHash - string - hash of the transaction
- blockIndex - uint32 - number of the block that contains a transaction (optional)
- timestamp - uint64 - timestamp of the transaction (optional)
- isBase - boolean - shows if the transaction is a coinbase transaction or not
- unlockTime - uint64 - height of the block when transaction is going to be available for spending
- amount - int64 - amount of the transaction
- fee - uint64- transaction fee
- extra - string - ?
- paymentId - string - payment\_id of the transaction (optional)
- transfers - array - contains
** address - string ** amount - int64 | array | See below |
sendTransaction() method allows you to send transaction to one or several addresses. Also, it allows you to use a payment_id for a transaction to a single address.
Input:
Note: if container contains only 1 address, changeAddress field can be left empty and the change is going to be sent to this address
Note: if addresses field contains only 1 address, changeAddress can be left empty and the change is going to be sent to this address
Note: in the rest of the cases, changeAddress field is mandatory and must contain an address.