Difference between revisions of "Tutorials: How to use RPC commands"

From CloakCoin Wiki
Jump to: navigation, search
(Created page with "=== Cloak V2.0.1.1 - RPC Commands === RPC Commands can be issued to the daemon on the commandline or via the debug window for the QT wallet.")
 
Line 1: Line 1:
 
=== Cloak V2.0.1.1 - RPC Commands ===
 
=== Cloak V2.0.1.1 - RPC Commands ===
  
RPC Commands can be issued to the daemon on the commandline or via the debug window for the QT wallet.
+
RPC Commands can be issued to the daemon on the commandline or via the debug window on the QT wallet.
 +
 
 +
 
 +
::<code>help [command]</code>
 +
List commands, or get help for a command.
 +
 
 +
 
 +
::<code>stop <detach></code>
 +
<detach> is [true] to detach the database, [false] to stop only Stop CloakCoin server (and possibly override the detachdb config value).
 +
 
 +
 
 +
::<code>getblockcount</code>
 +
Returns the number of blocks in the longest block chain.
 +
 
 +
 
 +
::<code>getconnectioncount</code>
 +
Returns the number of connections to other nodes.
 +
 
 +
 
 +
::<code>getpeerinfo</code>
 +
Returns data about each connected network node.
 +
 
 +
 
 +
::<code>getdifficulty</code>
 +
Returns the difficulty as a multiple of the minimum difficulty.
 +
 
 +
 
 +
::<code>getgenerate</code>
 +
Returns true or false to indicate if currently mining.
 +
 
 +
 
 +
::<code>setgenerate <generate> [genproclimit]</code>
 +
<generate> is true or false to turn mining on or off.
 +
 
 +
Generation is limited to [genproclimit] processors, -1 for unlimited.
 +
 
 +
 
 +
::<code>gethashespersec</code>
 +
Returns a recent hashes per second performance measurement while generating.
 +
 
 +
 
 +
::<code>getinfo</code>
 +
Returns an object containing various state info.
 +
 
 +
 
 +
::<code>getmininginfo</code>
 +
Returns an object containing mining-related information.
 +
 
 +
 
 +
::<code>getnewaddress [account]</code>
 +
Returns a new CloakCoin address for receiving payments. If [account] is specified (recommended), it is added to the address book so payments received with the address will be credited to [account].
 +
 
 +
 
 +
::<code>getnewpubkey [account]</code>
 +
Returns new public key for coinbase generation.
 +
 
 +
 
 +
::<code>getaccountaddress <account></code>
 +
Returns the current CloakCoin address for receiving payments to this account.
 +
 
 +
 
 +
::<code>setaccount <CloakCoinaddress> <account></code>
 +
Sets the account associated with the given address.
 +
 
 +
 
 +
::<code>getaccount <CloakCoinaddress></code>
 +
Returns the account associated with the given address.
 +
 
 +
 
 +
::<code>getaddressesbyaccount <account></code>
 +
Returns the list of addresses for the given account.

Revision as of 02:10, 4 November 2017

Cloak V2.0.1.1 - RPC Commands

RPC Commands can be issued to the daemon on the commandline or via the debug window on the QT wallet.


help [command]

List commands, or get help for a command.


stop <detach>

<detach> is [true] to detach the database, [false] to stop only Stop CloakCoin server (and possibly override the detachdb config value).


getblockcount

Returns the number of blocks in the longest block chain.


getconnectioncount

Returns the number of connections to other nodes.


getpeerinfo

Returns data about each connected network node.


getdifficulty

Returns the difficulty as a multiple of the minimum difficulty.


getgenerate

Returns true or false to indicate if currently mining.


setgenerate <generate> [genproclimit]

<generate> is true or false to turn mining on or off.

Generation is limited to [genproclimit] processors, -1 for unlimited.


gethashespersec

Returns a recent hashes per second performance measurement while generating.


getinfo

Returns an object containing various state info.


getmininginfo

Returns an object containing mining-related information.


getnewaddress [account]

Returns a new CloakCoin address for receiving payments. If [account] is specified (recommended), it is added to the address book so payments received with the address will be credited to [account].


getnewpubkey [account]

Returns new public key for coinbase generation.


getaccountaddress <account>

Returns the current CloakCoin address for receiving payments to this account.


setaccount <CloakCoinaddress> <account>

Sets the account associated with the given address.


getaccount <CloakCoinaddress>

Returns the account associated with the given address.


getaddressesbyaccount <account>

Returns the list of addresses for the given account.