RPC commands

Cloak V2.0.1.1 - RPC Commands

RPC Commands can be issued to the daemon on the commandline and via the debug window for 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.

sendtoaddress <CloakCoinaddress> <amount> [comment] [comment-to] [narration]

<amount> is a real and is rounded to the nearest 0.000001
coins can be anonymized via Enigma by appending :posa to the destination address, which will cloak the address you sent them from.
requires wallet passphrase to be set with walletpassphrase first

sendcloakedtoaddress <CloakCoinaddress> <amount> [numCloakers] [timeoutMins] [comment] [comment-to]

<amount> is a real and is rounded to the nearest 0.000001

requires wallet passphrase to be set with walletpassphrase first

getreceivedbyaddress <CloakCoinaddress> [minconf=1]

Returns the total amount received by <CloakCoinaddress> in transactions with at least [minconf] confirmations.

getreceivedbyaccount <account> [minconf=1]

Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations.

listreceivedbyaddress [minconf=1] [includeempty=false]

[minconf] is the minimum number of confirmations before payments are included.
[includeempty] whether to include addresses that haven't received any payments.
Returns an array of objects containing:
"address" : receiving address
"account" : the account of the receiving address
"amount" : total amount received by the address
"confirmations" : number of confirmations of the most recent transaction included

listreceivedbyaccount [minconf=1] [includeempty=false]

[minconf] is the minimum number of confirmations before payments are included.
[includeempty] whether to include accounts that haven't received any payments.
Returns an array of objects containing:
"account" : the account of the receiving addresses
"amount" : total amount received by addresses with this account
"confirmations" : number of confirmations of the most recent transaction included

backupwallet <destination>

Safely copies wallet.dat to destination, which can be a directory or a path with filename.

keypoolrefill

Fills the keypool.
requires wallet passphrase to be set with walletpassphrase first

walletpassphrase <passphrase> <timeout> [mintonly]

Stores the wallet decryption key in memory for <timeout> seconds.
mintonly is optional true/false allowing only block minting.

walletpassphrasechange <oldpassphrase> <newpassphrase>

Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>.

walletlock

Removes the wallet encryption key from memory, locking the wallet.
After calling this method, you will need to call walletpassphrase again
before being able to call any methods which require the wallet to be unlocked.

validateaddress <CloakCoinaddress>

Return information about <CloakCoinaddress>.

validatepubkey <CloakCoinpubkey>

Return information about <CloakCoinpubkey>.

getbalance [account] [minconf=1]

If [account] is not specified, returns the server's total available balance.
If [account] is specified, returns the balance in the account.

move <fromaccount> <toaccount> <amount> [minconf=1] [comment]

Move from one account in your wallet to another.

sendfrom <fromaccount>[:posa] <toCloakCoinaddress> <amount> [minconf=1] [comment] [comment-to] [narration]

<amount> is a real and is rounded to the nearest 0.000001
coins can be anonymized via Enigma by appending :posa to the account name, which will cloak the address you sent them from.
requires wallet passphrase to be set with walletpassphrase first

sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]

amounts are double-precision floating point numbers
coins can be anonymized via Enigma by appending |posa to the account name, which will cloak the address you sent them from.
requires wallet passphrase to be set with walletpassphrase first

addmultisigaddress <nrequired> <'["key","key"]'> [account]

Add a nrequired-to-sign multisignature address to the wallet"
each key is a CloakCoin address or hex-encoded public key
If [account] is specified, assign address to [account].

getrawmempool

Returns all transaction ids in memory pool.

getblock <hash> [txinfo]

txinfo optional to print more detailed tx info
Returns details of a block with given block-hash.

getblockhash <index>

Returns hash of block in best-block-chain at <index>.

gettransaction <txid>

Get detailed information about <txid>

listtransactions [account] [count=10] [from=0]

Returns up to [count] most recent transactions skipping the first [from] transactions for account [account].

listaddressgroupings

Lists groups of addresses which have had their common ownership
made public by common use as inputs or as the resulting change
in past transactions

signmessage <CloakCoinaddress> <message>

Sign a message with the private key of an address

verifymessage <CloakCoinaddress> <signature> <message>

Verify a signed message

getwork [data]

If [data] is not specified, returns formatted hash data to work on:
"midstate" : precomputed hash state after hashing the first half of the data (DEPRECATED)
"data" : block data
"hash1" : formatted hash buffer for second hash (DEPRECATED)
"target" : little endian hash target
If [data] is specified, tries to solve the block and returns true if it was successful.

getworkex [data, coinbase]

If [data, coinbase] is not specified, returns extended work data.

listaccounts [minconf=1]

Returns Object that has account names as keys, account balances as values.

settxfee <amount>

<amount> is a real and is rounded to the nearest 0.01

getblocktemplate [params]

Returns data needed to construct a block to work on:
"version" : block version
"previousblockhash" : hash of current highest block
"transactions" : contents of non-coinbase transactions that should be included in the next block
"coinbaseaux" : data that should be included in coinbase
"coinbasevalue" : maximum allowable input to coinbase transaction, including the generation award and transaction fees
"target" : hash target
"mintime" : minimum timestamp appropriate for next block
"curtime" : current timestamp
"mutable" : list of ways the block template may be changed
"noncerange" : range of valid nonces
"sigoplimit" : limit of sigops in blocks
"sizelimit" : limit of block size
"bits" : compressed target of next block
"height" : height of the next block
See https://en.bitcoin.it/wiki/BIP_0022 for full specification.

submitblock <hex data> [optional-params-obj]

[optional-params-obj] parameter is currently ignored.
Attempts to submit new block to network.
See https://en.bitcoin.it/wiki/BIP_0022 for full specification.

listsinceblock [blockhash] [target-confirmations]

Get all transactions in blocks since block [blockhash], or all transactions if omitted

dumpprivkey <CloakCoinaddress>

Reveals the private key corresponding to <CloakCoinaddress>.

importprivkey <CloakCoinprivkey> [label]

Adds a private key (as returned by dumpprivkey) to your wallet.

listunspent [minconf=1] [maxconf=9999999] ["address",...]

Returns array of unspent transaction outputs
with between minconf and maxconf (inclusive) confirmations.
Optionally filtered to only include txouts paid to specified addresses.
Results are an array of Objects, each of which has:
{txid, vout, scriptPubKey, amount, confirmations}

getrawtransaction <txid> [verbose=0]

If verbose=0, returns a string that is
serialized, hex-encoded data for <txid>.
If verbose is non-zero, returns an Object
with information about <txid>.

createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}

Create a transaction spending given inputs
(array of objects containing transaction id and output number),
sending to given address(es).
Returns hex-encoded raw transaction.
Note that the transaction's inputs are not signed, and
it is not stored in the wallet or transmitted to the network.

decoderawtransaction <hex string>

Return a JSON object representing the serialized, hex-encoded transaction.

signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] [sighashtype="ALL"]

Sign inputs for raw transaction (serialized, hex-encoded).
Second optional argument (may be null) is an array of previous transaction outputs that
this transaction depends on but may not yet be in the blockchain.
Third optional argument (may be null) is an array of base58-encoded private
keys that, if given, will be the only keys used to sign the transaction.
Fourth optional argument is a string that is one of six values; ALL, NONE, SINGLE or
ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.
Returns json object with keys:
hex : raw transaction with signature(s) (hex-encoded string)
complete : 1 if transaction has a complete set of signature (0 if not)
requires wallet passphrase to be set with walletpassphrase first

sendrawtransaction <hex string>

Submits raw transaction (serialized, hex-encoded) to local node and network.

getbigtx [minamount=NUM_CLOAK]

Returns array of unspent transaction outputs
with between minconf and maxconf (inclusive) confirmations.
Optionally filtered to only include txouts paid to specified addresses.
Results are an array of Objects, each of which has:
{txid, vout, scriptPubKey, amount, confirmations}

getcheckpoint

Show info of synchronized checkpoint.

reservebalance [<reserve> [amount]]

<reserve> is true or false to turn balance reserve on or off.
<amount> is a real and rounded to cent.
Set reserve amount not participating in network protection.
If no parameters provided current setting is printed.

checkwallet

Check wallet for integrity.

repairwallet

Repair wallet if checkwallet reports any problem.

resendtx

Re-send unconfirmed transactions.

makekeypair [prefix]

Make a public/private key pair.
[prefix] is optional preferred prefix for the public key.

sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]

<message> is the alert text message
<privatekey> is hex string of alert master private key
<minver> is the minimum applicable internal client version
<maxver> is the maximum applicable internal client version
<priority> is integer priority number
<id> is the alert id
[cancelupto] cancels all alert id's up to this number
Returns true or false.

getnewstealthaddress [label]

Returns a new Cloak stealth address for receiving payments anonymously.

importstealthaddress <scan_secret> <spend_secret> [label]

Import an owned stealth addresses.

sendtostealthaddress <stealth_address> <amount> [comment] [comment-to] [narration]

<amount> is a real and is rounded to the nearest 0.000001
requires wallet passphrase to be set with walletpassphrase first

scanforalltxns [fromHeight]

Scan blockchain for owned transactions.

listcloakinghistory

Displays historical cloaking operations that have been completed.
Note the result set might be quite large.

listcloakingactive

Lists Enigma cloaking operations currently in progress.