Hydra Core Wallet Commands
The Hydra Core wallet has a rich set of commands which give comprehensive control of the wallet and blockchain transactions. There are two sets of commands that may be used with Hydra Core wallets:
    Console commands are given to a wallet that is already running.
    Startup commands are used when starting up a wallet.
This manual focuses on the console commands which are given to a wallet that is running and can be sent using RPC (Remote Procedure Calls) or on the command line to the hydrad server wallet or given to the Hydra-qt desktop GUI (Graphical User Interface) wallet using the Debug window Console command line (see Figure 1).
Figure 1. The hydra-qt Console
Note the warning message in red in Figure 1 and be careful using the private key commands (dumpprivkey and dumpwallet) with Mainnet wallets.
For the server wallet hydrad, console commands are given using the Command Line Interface application hydra-cli on the system command line prompt (see Figure 2).
You can always get a list of the current console commands using the help command (see Figure 3.)
Figure 3. The help command

Console Commands :hammer_and_wrench:

Console commands are given to a running Hydra Core wallet and provide additional information and control. Console commands and are required to operate the hydrad server wallet, which is a "headless" wallet with no graphical user interface.
There are 136 console commands with some good references for the 112 inherited from bitcoin. There are 13 "hidden" commands that are used by developers and won't show up in the "help" list.
Commands can have required or optional parameters and more numerous parameters are entered in JSON (JavaScript Object Notation) format with escaped double quotes ( \" ) as shown below.
Common parameters for these commands are Hydra addresses, block hashes, contract addresses, etc. Some of the commands will have an optional parameter "minconf" (minimum confirmations) which allows you to get a response for a transaction or block that has at least that number of confirmations.
The chain query bitcoin API reference http://chainquery.com/bitcoin-api explains the parameters and gives examples with responses for the commands inherited from bitcoin. The bitcoin chain query API reverence gives 67 commands, of which 2 are not in Hydra (estimatepriority, getgenerate) and two (gettransaction, walletpassphrase) have an additional parameter for Hydra. See also https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs.
Advanced interfaces to the Hydra Core wallet (full node) can use these "console commands" as RPCs (Remote Procedure Calls) over a dedicated port connection to the node. To build an exchange hot wallet or server node for a mobile DAPP (Distributed Application) you can use RPCs, which follow these same console commands. The client node offers a JSON-RPC interface over HTTP sockets to perform various operational functions and to manage the local node.
A quick comment on "accounts". Accounts was an ill-fated way from bitcoin to track balances for what are really UTXO transaction-based values, and "accounts" are deprecated and will be phased out by version 0.18.
Here are some command groupings that are useful for various tasks:
    Peer connections: getconnectioncount, getpeerinfo, addnodes, getnetworkinfo
    Staking: getstakinginfo, getwalletinfo, getnetworkinfo
    Sending: listaddressgroupings, sendtoaddress, sendmany, sendmanywithdupes
    Raw transactions: crearterawtransaction, signrawtransaction, combinerawtransactoins, sendrawtransaction
    Smart contract transactions: createcontract, callcontract, sendtocontract, getaccountinfo, getstorage, searchlogs, waitforlogs

Startup Commands

Startup commands give additional control and recovery options when launching the wallet. For example, you can use startup commands for various kinds of blockchain recovery techniques, additional debug logging or additional controls. If you are going to use these startup commands, make sure you have a good backup of the wallet.dat file.
See the startup commands on the Hydra-qt wallet with Help - Command line options:
Figure 4. Startup commands
and on the command line itself with "Hydra -?":
Figure 5. Startup commands from the command line

Console Commands A - Z

For these console commands documented below, responses are given for default parameters (Hydraversion 0.16 - winter 2018/2019). Commands marked DEPRECATED should not be used because they will be removed and replaced in future versions of the wallet, for example, commands using "account" will be removed in version 0.18.
Using the command "help \" will give complete information about the command and relevant parameters, formatted in a way you can copy and paste (replacing the addresses, transactions IDs, etc., as required). The format below shows the command with parameters followed by the response, in some cases, parameters or responses are truncated with the term "\". Where noted, some commands only work with the regtest (Regression Test) network. Many commands will return "null" for Hydra-qt and return nothing for command line systems.

abandontransaction "txid"

Works on transactions not in the blockchain or mempool, used in testing.
1
abandontransaction "0cc99a30bc2064041ea4263835b4ed594ff500c56d6b14e4970aeee548e71389"
2
3
Transaction not eligible for abandonment (code -5)
Copied!

abortrescan

Stops a wallet rescan triggered by a command such as importprivkey. This command can be issued by opening a 2nd command line window (where the first window is scanning), in which case the command will stop the scan and return "true".
1
hydra-cli abortrescan
2
3
true
Copied!

addmultisigaddress nrequired ["key",...] ( "account" "address_type" )

Add a multisignature address to the wallet so you can receive and send from that address. Run the command on each machine that will be signing and backup the wallet.dat file. The address can be a Hydra address or hex-encoded public key. Use importaddress to add the multisig address on each signing wallet.
This functionality is only intended for use with non-watchonly addresses. See importaddress for watchonly p2sh address support. Use of account is DEPRECATED). See also validateaddress.
1
addmultisigaddress 2 "[\"HgdaD9b3ppKowoC45EZMtepjjBfnvEe6m\",\"HFmr8vY29reHj73XSHfdWvkV3mD57Kqd8\"]"
2
3
{
4
"address": "mHB9w64hHbm2YtCxyqS8kG3g77b2gbSvK",
5
"redeemScript": "5321538ef45ab52bd53508adfda3cfe82ebcaf0495963729e5ff2a8e5aeecdd4cdd23daea03cf4394ad4c578caff2d297ce937c3afba5bc56f31c786b2addf56c72ab"
6
}
Copied!

addnode "node" "add|remove|onetry"

Attempts to add a node with a known IP address. This command is useful for new wallets that are having trouble making peer connections. Here are some good IP addresses to add, you can put these commands in one after another, then the wallet will try for a few minutes to make a peer connection with each. Hydrad returns nothing:
1
addnode 35.200.159.68:3888 add
2
addnode 35.197.138.163:3888 add
3
addnode 35.226.31.206:3888 add
4
addnode 35.200.130.53:3888 add
5
addnode 35.192.54.161:3888 add
Copied!
Hydra-qt returns "null" after each (see Figure 6).
Figure 6. Entering the addnode command

addwitnessaddress "address" ( p2sh )

Hidden command. DEPRECATED. This command was a way to generate a SegWit address from an existing legacy address, usually a P2SH-P2WPKH addresses - Pay-to-Witness-Public-Key-Hash (P2WPKH) script embedded in a Pay-to-Script-Hash (P2SH) address. This command is mostly disabled in version 0.16 and will be removed in version 0.17. Instead, use the getnewaddress command with address type "p2sh-segwit" or "bech32".
Launch v 0.16 Hydrad with -deprecatedrpc=addwitnessaddress to run the command:
1
addwitnessaddress HkSc3wcAJ59Nk4X9mvd258ycVxJ7XWhp9
2
3
MHa57hGwD48SZQjh23MZbq24tFwTu7Q3c
Copied!

backupwallet "destination"

The destination can be a filename or path with a filename. The wallet must be fully decrypted (not just for staking only) for this command to work. Hydra-qt will returns "null", Hydrad returns nothing. On Windows:
1
backupwallet "C:\Users\\Desktop\Backups\backup2018-10-21.dat"
2
3
null
Copied!

bumpfee "txid" ( options )

Bumps the fee of a transaction, replacing it with a new transaction by adjusting the change. The new fee can be calculated automatically or by using various options.
1
bumpfee "cae25062777fca1bce7f860dd238af2be4495f4aef1b5a15bbee260b4c3cde2"
2
3
{
4
"txid": "ecbc798c140b5104ae3d5828493e8e5ef04131dd0e44eb7fa7e1abba24901a5",
5
"origfee": 0.00090400,
6
"fee": 0.00093061,
7
"errors": [
8
]
9
}
Copied!

callcontract "address" "data" ( address )

Arguments:
    1.
    "address" (string, required) The account address
    2.
    "data" (string, required) The data hex string
    3.
    address (string, optional) The sender address hex string
    4.
    gasLimit (string, optional) The gas limit for executing the contract
TO COME

clearbanned

Clear all banned nodes IPs. Hydra-qt returns "null", hydrad gives no response.
1
clearbanned
2
3
null
Copied!

combinerawtransaction ["hexstring",...]

Combine multiple partially signed raw transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction. Here two raw transactions are combined:
1
combinerawtransaction "[\"0200000001b000000\", \"0200000001c000000\"]"
2
3
0200000001b000000
Copied!

createcontract "bytecode" (gaslimit gasprice "senderaddress" broadcast)

Publish a smart contract for the given bytecode, using default gas price of 0.00000040 and gas amount of 2,500,000. Returns the transaction ID and the contract address hash.
1
createcontract 6060604041701d0029
2
3
{
4
"txid": "a1d823cb5ce776200dcbe729d901d4e1d31ad5bb8d835db0f704g73ac8e74d3",
5
"sender": "HfdR8vwd69oMi2xeeSe8XBgv3mku27ukh",
6
"hash160": "efe574bu5ce54a7eb33f96e4336accbed826ffe",
7
"address": "4853cd349027fe239fed85837456b3c48aae42a"
8
}
Copied!

createmultisig nrequired ["key",...]

DEPRECATED. Use addmultisigaddress.

createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) ( replaceable )

Create a hex-encoded raw transaction sending some inputs to outputs. The transaction must then be signed and sent to the network, see signrawtransaction and sendrawtransaction. Returns a hex-encoded raw transaction. If you are sending coins make sure to create a change address so the change can be returned; any difference between the input values and output values will be taken as the transaction fee. If you don't work out the math you could pay a big transaction fee.
1
createrawtransaction "[{\"txid\":\"17b3f9ef530695ef2e0368e445a3b59bf12811bdfd42325bb14248e72deb7e2\",\"vout\":0}]" "{\"Qd5eHho389mJMCxSzAbe31w2vntTc7192\":1.0, \"QdXtq55Bf443Lkme2hdj4mD8KKepk32f6\":0.99}"
2
3
020000001d637cf207c6418fb6220cfcb2b141ba5d230f0ba0a43c68b358aff9a8a6000000000fffffff0509e5f50480000001983a952d5fb15a70832ffdc3cadd3dc7749a49bf053ed6defacd09ef6060000000187aa814bd4ae4167bebbf56bb7c51c5eabf35d50a5c6e7f33ad0000000
Copied!

decoderawtransaction "hexstring" ( iswitness )

Gives the decoded data from a raw hex-encoded transaction. Here we decode the results from createrawtransaction above.
1
decoderawtransaction 0200000f33ad0000000
2
3
{
4
"txid": "c93dace459f5ac38c9d28ded224e47364abdde5e3fa947dc2d9c4422afb8852",
5
"hash": "c93dace459f5ac38c9d28ded224e47364abdde5e3fa947dc2d9c4422afb8852",
6
"version": 2,
7
"size": 119,
8
"vsize": 119,
9
"locktime": 0,
10
"vin": [
11
{
12
"txid": "17b3f9ef530695ef2e0368e445a3b59bf12811bdfd42325bb14248e72deb7e2",
13
"vout": 0,
14
"scriptSig": {
15
"asm": "",
16
"hex": ""
17
},
18
"sequence": 4384362583
19
}
20
],
21
"vout": [
22
{
23
"value": 1.00000000,
24
25
}
26
]
27
}
Copied!

decodescript "hexstring"

Decode a hex-encoded script, for example, decode the script for a mulitsig address:
1
decodescript 52460396bc49812bad50949fbc0bbd44e95bf32a5695519b3ff267a5d93cba3bd169b2393cd4864da4c2786dd3322fcfcb239c3db185ef33fa14836b8fecf36c68bb84ddac92f2
2
3
{
4
"asm": "2 0396c2483bbc207827fbc06fb32f48bf28450b5fb973032b742aeedd98dadcf3ba 02ba529ef3455bcc4339dbd7269acc2de135ff65a33c706a9beef48c37ab2a95ab 2 OP_CHECKMULTISIG",
5
"reqSigs": 2,
6
"type": "multisig",
7
"addresses": [
8
"Hgw5Ds4Py6J2oBX3EKP3kyde2UpnWn7eV",
9
"HK3bx79fzkei5XF7h2q7wB4s6MK99u29x"
10
],
11
"p2sh": "mKa7c52cX97eK4vdk35jV442p3j59hk3R"
12
}
Copied!

disconnectnode "[address]" [nodeid]

Disconnects a peer (node) using either the IP address or node number. Hydra-qt will return "null", Hydra will return nothing.
1
disconnectnode "35.198.0.76:3888"
2
3
null
Copied!

dumpprivkey "address"

Displays the private key for a given address in WIF (Wallet Import Format). The wallet must be unlocked (and not for "staking only") for this command to work.
1
dumpprivkey "HXfSbN8DaT21Z6L3Pw52UexuP8zW4mY6h"
2
3
L3vaEHms4VpciP85UsufQf3Gfa9p5gatBGm6Z4rD8FxzFLdXE5V
Copied!

dumpwallet "filename"

Writes all the wallet private keys to a file in clear text (unencrypted) format. The wallet must be fully decrypted (not just for staking only) for this command to work. Returns the filename. Dumpwallet will save all the private keys and their addresses; it will not save watchonly addresses (which do not have private keys in the wallet). This file contains all the private keys in the wallet (1,000 or more), be very careful and do not store the dump file online.
On PC:
1
dumpwallet "C:\Users\\Desktop\Backups\dump 2018-10-30.txt"
2
3
{
4
"filename": "C:\\Users\\\\Desktop\\Backups\\dump 2018-10-30.txt"
5
}
Copied!
File:
1
Wallet dump created by Hydra v0.16.1.0-0806c12c4-dirty
2
* Created on 2018-10-31T01:56:32Z
3
* Best block at time of backup was 241161 (b11d5169d66d39cbcd848e2ea3f9adfcee1c22af945f100aec9e762d88609e2e),
4
mined on 2018-10-31T01:55:28Z
5
6
extended private masterkey:
Copied!
On Mac:
1
dumpwallet /Users//Desktop/dump_2018-12-15.txt
2
3
{
4
5
"filename": "/Users//Desktop/dump_2018-12-15.txt"
6
7
}
Copied!
File:
1
Wallet dump created by Hydra v0.16.2.0-47a30461d-dirty
2
* Created on 2018-12-16T02:22:59Z
3
* Best block at time of backup was 148510
4
(ca8a9457a69882b395bf56671e3661e148d3aca4a7b6c77398804229e7fb58f4),
5
mined on 2018-05-06T02:45:52Z
6
7
extended private masterkey:
Copied!

encryptwallet [passphrase]

Encrypts the wallet with "passphrase" for first-time encryption. After encryption, any calls that interact with private keys such as sending or signing will require passphrase entry to enable these functions. See also walletpassphrase, walletlock and walletpassphrasechange. After this command runs, the wallet will shut down.
1
encryptwallet [you should always use a long and strong passphrase]
Copied!
(wallet exits)

echo "message"

Hidden command. Simply echo back the input arguments. This command is for testing.
The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in Hydra-cli and the GUI. There is no server-side difference. Here we echo the parameters used to setup a multisig address.
1
echo "[\"hghwDvb1pyJoqoAD2ESMTevvvjUfNvReDn\",\"hfKr7vXdmroHi61XUUHedXvgV2mDx9Kudb\"]"
2
3
[
4
"[\"hghwDvb1pyJoqoAD2ESMTevvvjUfNvReDn\",\"hfKr7vXdmroHi61XUUHedXvgV2mDx9Kudb\"]"
5
]
Copied!

echojson "message"

Hidden command. Simply echo back the input arguments. This command is for testing.
The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in Hydra-cli and the GUI. There is no server-side difference. Here we echo the parameters used to setup a multisig address.
1
echojson
2
"[\"hghwDvb1pyJoqoAD2ESMTevvvjUfNvReDn\",\"qfKr7vXdmroHi61XUUHedXvgV2mDx9Kudb\"]"
3
4
[
5
[
6
"hghwDvb1pyJoqoAD2ESMTevvvjUfNvReDn",
7
"hfKr7vXdmroHi61XUUHedXvgV2mDx9Kudb"
8
]
9
]
Copied!

estimatefee nblocks

DEPRECATED. Please use estimatesmartfee for better estimates. Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks.
1
estimatefee 10
2
3
estimatefee is deprecated and will be fully removed in v0.17.
Copied!

estimaterawfee conf_target (threshold)

Hidden command. WARNING: This command is unstable and may disappear or change, and the results are tightly coupled to the calling parameters.
Gives fee estimates for short, medium, and long term confirmations, and gives mempool statistics for transactions with those fees. Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks.
1
estimaterawfee 6
2
3
{
4
"short": {
5
"feerate": 0.01000002,
6
"decay": 0.962,
7
"scale": 1,
8
"pass": {
9
"startrange": 490954,
10
"endrange": 1e+099,
11
"withintarget": 14.31,
12
"totalconfirmed": 14.31,
13
"inmempool": 0,
14
"leftmempool": 0
15
},
16
"fail": {
17
"startrange": 0,
18
"endrange": 490954,
19
"withintarget": 3.57,
20
"totalconfirmed": 3.57,
21
"inmempool": 0,
22
"leftmempool": 0
23
}
24
},
25
"medium": {
26
"feerate": 0.00419464,
27
"decay": 0.9952,
28
"scale": 2,
29
"pass": {
30
"startrange": 403909,
31
"endrange": 490954,
32
"withintarget": 28.94,
33
"totalconfirmed": 28.94,
34
"inmempool": 0,
35
"leftmempool": 0
36
},
37
"fail": {
38
"startrange": 0,
39
"endrange": 403909,
40
"withintarget": 2.45,
41
"totalconfirmed": 2.45,
42
"inmempool": 0,
43
"leftmempool": 0
44
}
45
},
46
"long": {
47
"feerate": 0.00420764,
48
"decay": 0.99931,
49
"scale": 24,
50
"pass": {
51
"startrange": 403909,
52
"endrange": 626596,
53
"withintarget": 190,
54
"totalconfirmed": 190,
55
"inmempool": 0,
56
"leftmempool": 0
57
},
58
"fail": {
59
"startrange": 0,
60
"endrange": 403909,
61
"withintarget": 12.93,
62
"totalconfirmed": 12.93,
63
"inmempool": 0,
64
"leftmempool": 0
65
}
66
}
67
}
Copied!

estimatesmartfee conf_target ("estimate_mode")

Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks.
1
estimatesmartfee 10
2
3
{
4
"feerate": 0.00420597,
5
"blocks": 10
6
}
Copied!

fromhexaddress "hexaddress"

Converts a raw hex address to a base 58 pubkeyhash address. Returns the base58 pubkeyhash address.
1
fromhexaddress 9467c4cbd6c4bb736cf4724de25a298bc529bfa3
2
3
HXvN7L3D2NkdPgt20rYrGkSPCggwkKbqa
Copied!
See gethexaddress to convert a base58 pubkeyhash to a hex address.

fundrawtransaction "hexstring" ( options iswitness )

Select and add inputs to a transaction until it has enough in value to meet its out value. Collects one or more unspent transactions as inputs, and computes and specifies the change amount. Note that inputs which were signed may need to be resigned after completion since in/outputs have been added. The inputs added will not be signed, use signrawtransaction for that.
1
fundrawtransaction "02000000000140620b00000000001875c9289dc9ffac451edb8229dd6e95221cd3b5c23af2698ec00000000"
2
3
{
4
"hex": "020000000150c3fb7a7636798bd00000000",
5
"changepos": 1,
6
"fee": 0.00090400
7
}
Copied!

generate nblocks ( maxtries )

Mine up to nblocks blocks immediately to an address in the wallet. Used with the regression test "regtest" private test blockchain. Can use generate 1 to publish waiting transactions in the next block, or generate 600 to initialize a new regtest blockchain.
1
docker exec myapp qcli generate 600
2
3
[
4
"5476f8f1c5feb8dd0eaecb113715337a418ae2538f478bb2e5454a801e2aec15",
5
"465b21528a217250ed300d0636e7838f8eb2539afec2a87e7052e2f901e31c03",
6
7
"5716637b80c70d3b0f6cb338fc772ac952c535fa19be086ee2e9c2e97d5ef396",
8
"59cde5be7929118bfc3239a93226eb35b7e0093fe9b6b7007b126365ab04901a"
9
]
Copied!

generatetoaddress nblocks address (maxtries)

Mine up to nblocks immediately to a specified address. Used with the regression test "regtest" private test blockchain. Here we generate 10 genesis blocks on regtest with 20,000 Test Hydra each, plus an initial block, and listaddressgroupings shows the result:
1
PS C:\Users\Test> docker exec myapp qcli generatetoaddress 10 "qNe5aDdubCGRaTp7vDYL4BASjzVH7c7Yc"
2
[
3
"7994c09b3c5a4f31976144a429695140ee4e0747de36a5eae4aefb169a8f558",
4
"79cd57805f061d964428dff08b03a91a3a7245bc6d6ea01f3bb735bac62decf",
5
"38cfab367ece8f34d4f48838ca9c43fc87873919dbe5113302e316890304adc",
6
"41d8f6276e7544d0992e95c216d42be391a3cdf72cd8ba128f7c8b879d7a1b8",
7
"3d270dfae9927870f342c6056adfdb3c6b121b6d38fc1a60e965deb33207035",
8
"5fb82e9978f83afc7c30bbdb6d195f5a26e8beace00a57e7581b1b4376f1351",
9
"65bce2a9f180246245944e235fa0c86fba2502e279b846f7e14e3265d620031",
10
"7d676d46c2c4008051cb4660a74ff0899ac647d8c1afedeabbe6a7fe935b7be",
11
"35482c05e5b5b173cd5ae3e1665d9b33811a4358249d566fded891b9d772ac5",
12
"06d5849f0b3c91ad215e364d183b39c4e156ea4024cb5337cadc47fb2a54cca"
13
]
14
15
PS C:\Users\Test> docker exec myapp qcli listaddressgroupings
16
17
[
18
[
19
[
20
"hNe5aDdubCGRaTp7vDYL4BASjzVH7c7Yc",
21
2200000.00000000
22
]
23
]
24
]
Copied!

getaccount "address"

DEPRECATED. Returns the account name for a given address.
1
getaccount "H5ytvGW47jcS38NGz9cV6WtK2d3JqhQv5"
2
3
My trading Acct 101
Copied!

getaccountaddress "account"

DEPRECATED. Returns the current Hydra address for an account. Use the null account "" for the default address.
1
getaccountaddress "My trading Acct 101"
2
3
H5ytvGW47jcS38NGz9cV6WtK2d3JqhQv5
Copied!

getaccountinfo "contract address hash"

Returns information about a contract including storage (the QRC20 balance for every address) and the code. The command may take several minutes to return, depending on the size of the storage (number of token holders). Here is the INK contract.
1
getaccountinfo fe59cbc1704e89a698571413a81f0de9d8f00c69
2
3
{
4
"address": "fe59cbc1704e89a698571413a81f0de9d8f00c69",
5
"balance": 0,
6
"storage": {
7
"00009fe46099bb10054d8b89985c4729a9e8e06539e462e9d250f6afc80ac616": {
8
"50e4c63c65830a6709ce0dbc387bbdcef75805769b71841b8d401049e77a64a2":
9
"0000000000000000000000000000000000000000000000000000000000000064"
10
},
11
"0000dd359df16177c5a00a2155979a1ca105df754abbe99bb09af5abc84d4aa4": {
12
"896176e7c566fd067c483861fcad197b31e0f9206ee19b71aa704d8978eb2bdc":
13
"0000000000000000000000000000000000000000000000000000000000000001"
14
},
15
16
"fffd29bb4ec023344772b5c3cda826cba78eed7cc88791357ee4ae9fdee2f0aa": {
17
"3f2cc887dcd9aaf8b642c415b8201a833f08695db6e6dbc3f41b6376a8467452":
18
"000000000000000000000000000000000000000000000000000000006e44c280"
19
}
20
},
21
"code": "606060405236 c62c0029"
22
}
Copied!

getaddednodeinfo ( "node" )

Returns information about nodes that have been manually added using the addnode command.
1
getaddednodeinfo
2
[
3
{
4
"addednode": "35.200.159.68:3888",
5
"connected": true,
6
"addresses": [
7
{
8
"address": "35.200.159.68:3888",
9
"connected": "outbound"
10
}
11
]
12
},
13
{
14
"addednode": "35.231.140.221:3888",
15
"connected": true,
16
"addresses": [
17
{
18
"address": "35.231.140.221:3888",
19
"connected": "outbound"
20
}
21
]
22
}
23
]
Copied!

getaddressesbyaccount "account"

DEPRECATED. Returns the list of addresses for the given account.
1
getaddressesbyaccount "MyAccount1"
2
3
[
4
"HDmZ3dx13suFL53hjRyLSmfpYc87CQ6m",
5
"H4FtdG46MkSW7N6gzJcv3Wt8Sd32qaPce"
6
]
Copied!

getbalance ( "account" minconf include_watchonly )

Get the balance in Hydra for a wallet.
1
getbalance
2
3
1.53160855
Copied!

getbestblockhash

Returns the block hash of the most recent block.
1
getbestblockhash
2
3
a18adc4fb204fe1818c30e3003fa8c8bf1833692d6df7dbb66d1569d27b18f8e
Copied!

getblock "blockhash" ( verbosity )

Returns information about a block.
1
getblock a18adc4fb204fe1818c30e3003fa8c8bf1833692d6df7dbb66d1569d27b18f8e
2
3
{
4
"hash": "a18adc4fb204fe1818c30e3003fa8c8bf1833692d6df7dbb66d1569d27b18f8e",
5
"confirmations": 1,
6
"strippedsize": 1642,
7
"size": 1678,
8
"weight": 6604,
9
"height": 244847,
10
"version": 536870912,
11
"versionHex": "20000000",
12
"merkleroot": "8b5bc1b8201c483b3d2a8ea528429c73755cd4d026f4ea9ec000a8b9ff4d6913",
13
"hashStateRoot": "8c72ed6a22f205a31965acc8deb4e5a83aa1b3e9c2eb72b41fb966c244bbf7ae",
14
"hashUTXORoot": "a4a9138f1c02a7a8f2948cf255be5c85a774f0c58e55e754eeed83e41e44b0e3",
15
"tx": [
16
"be6f9a76ea5e495102504bcd4e0975006f9287421535eb830812bf225fd85a81",
17
"ef1153d23cbf664ddf37e93ad3995c77faba5f9425c9a8edf07173d10d68cc7d",
18
"28368d7c9afe354ee47322a21943191f41adef227b4cd28f808672a5fd6502ca",
19
"287ba39ef4b2f08dcf94bca8390749440fa3ef955c7270dc13ceff63d5a547a0",
20
"d9454d185072e44b7eedfd7d99d547af715e7966b774cc58c4378cd21404b6c1"
21
],
22
"time": 1539478304,
23
"mediantime": 1539478016,
24
"nonce": 0,
25
"bits": "1a06ff51",
26
"difficulty": 2397623.192092059,
27
"chainwork": "0000000000000000000000000000000000000000000000ae38c2396a362a5cad",
28
"previousblockhash": "4844ea8b549bda9a1d95050d68846f5943f07fbb39709cdd0c386efea193582d",
29
"flags": "proof-of-stake",
30
"proofhash": "00018df67d4d91255e3ccc6256ec894267aedddb0b17addc27984d33bbda0163",
31
"modifier": "a7d1d4fd5670a282ae5c8f231d3473eaa21ae89fe344f8101847fc11da8e6262",
32
"signature": "3044022019ef654d26e49f7bfa8cd2793fb4db7ab9017f82ec480f723230633a68757fb0022006d9137a72b61faf249587dcc323c1b097bfd1c923fba6be543d4d5227d4fc15"
33
}
Copied!

getblockchaininfo

Returns information about the blockchain. Here "blocks" equals "headers", so this wallet is synced to the latest blocks. "moneysupply" gives the total Hydra created (genesis blocks + all block rewards). "size_on_disk" gives the local storage size for blocks.
1
getblockchaininfo
2
3
{
4
"chain": "main",
5
"blocks": 299495,
6
"headers": 299495,
7
"bestblockhash": "5a414f062b69ed29b50decd5b06a810b6c9d7970e1596386447f89798fa3ca7e",
8
"difficulty": 3024079.571373563,
9
"moneysupply": 101177980,
10
"mediantime": 1547361808,
11
"verificationprogress": 0.9999963369857782,
12
"initialblockdownload": false,
13
"chainwork": "0000000000000000000000000000000000000000000000d32917f4beda97dea",
14
"size_on_disk": 1533747593,
15
"pruned": false,
16
"softforks": [
17
{
18
"id": "bip34",
19
"version": 2,
20
"reject": {
21
"status": true
22
}
23
},
24
{
25
"id": "bip66",
26
"version": 3,
27
"reject": {
28
"status": true
29
}
30
},
31
{
32
"id": "bip65",
33
"version": 4,
34
"reject": {
35
"status": true
36
}
37
}
38
],
39
"bip9_softforks": {
40
"csv": {
41
"status": "active",
42
"startTime": 0,
43
"timeout": 999999999999,
44
"since": 6048
45
},
46
"segwit": {
47
"status": "active",
48
"startTime": 0,
49
"timeout": 999999999999,
50
"since": 6048
51
}
52
},
53
"warnings": ""
54
}
Copied!
Figure 7. The getblockchaininfo command

getblockcount

Returns the number of blocks in the main (longest with most difficulty) blockchain.
1
getblockcount
2
3
244848
Copied!

getblockhash height

Returns the hash of the main blockchain for the given block height (not an orphan block).
1
getblockhash 244848
2
3
8c0a43d58e96bd081209243eb9406c98ab3771c900cc05d793a62c48f3b1c03f
Copied!
Returns hex or decoded data for the header of the given block hash.
1
getblockheader 8c0a43d58e96bd081209243eb9406c98ab3771c900cc05d793a62c48f3b1c03f
2
3
{
4
"hash": "8c0a43d58e96bd081209243eb9406c98ab3771c900cc05d793a62c48f3b1c03f",
5
"confirmations": 1,
6
"height": 244848,
7
"version": 536870912,
8
"versionHex": "20000000",
9
"merkleroot": "55e9df47918882e9da67fca364102785f95f630277251e0f02c5a999a5ad7222",
10
"time": 1539478576,
11
"mediantime": 1539478048,
12
"nonce": 0,
13
"bits": "1a057777",
14
"difficulty": 3068960.095125648,
15
"chainwork": "0000000000000000000000000000000000000000000000ae38f10db922d370e0",
16
"hashStateRoot": "8c72ed6a22f205a31965acc8deb4e5a83aa1b3e9c2eb72b41fb966c244bbf7ae",
17
"hashUTXORoot": "a4a9138f1c02a7a8f2948cf255be5c85a774f0c58e55e754eeed83e41e44b0e3",
18
"previousblockhash": "a18adc4fb204fe1818c30e3003fa8c8bf1833692d6df7dbb66d1569d27b18f8e",
19
"flags": "proof-of-stake",
20
"proofhash": "00001121392ae309cf450c96f461cc4dcbaab48a07da28b3c391774a5051ea13",
21
"modifier": "d48db9884b7fd19852db420ad8faee6a51ca122574c041155965ac7de4cfe10c"
22
}
Copied!

getblocktemplate ( TemplateRequest )

Returns data needed to construct a block, and has a number of TemplateRequst parameters. The default (no TemplateReqest) gives:
1
getblocktemplate
2
3
{
4
"capabilities": [
5
"proposal"
6
],
7
"version": 536870912,
8
"rules": [
9
"csv",
10
"segwit"
11
],
12
"vbavailable": {
13
},
14
"vbrequired": 0,
15
"previousblockhash": "584350297b043c72e04afc9a5b5e61d5067b1c478554927dffb3101ccf681925",
16
"transactions": [
17
{
18
"data": "0200000000020000000000000000000084d71700000000015100000000",
19
"txid": "65b1a6eb24a3e0833a986eb88f969784811e2143ffce51d630873c1a49a2b596",
20
"hash": "65b1a6eb24a3e0833a986eb88f969784811e2143ffce51d630873c1a49a2b596",
21
"depends": [
22
],
23
"fee": -9223335579943919278,
24
"sigops": -8646875390281014959,
25
"weight": 116
26
}
27
],
28
"coinbaseaux": {
29
"flags": ""
30
},
31
"coinbasevalue": 0,
32
"longpollid": "584350297b043c72e04afc9a5b5e61d5067b1c478554927dffb3101ccf681925654",
33
"target": "000000000000052f650000000000000000000000000000000000000000000000",
34
"mintime": 1542420161,
35
"mutable": [
36
"time",
37
"transactions",
38
"prevblock"
39
],
40
"noncerange": "00000000ffffffff",
41
"sigoplimit": 80000,
42
"sizelimit": 8000000,
43
"weightlimit": 8000000,
44
"curtime": 1542420909,
45
"bits": "1a052f65",
46
"height": 265308
47
}
Copied!

getchaintips

Return information about all known tips in the block tree, including the main chain as well as orphaned branches. Will display chain tips since the wallet launched because only the main chain will be synced from other peers when this wallet launched. The status "active" is the mainchain, "valid-fork" are orphan blocks, and "valid headers" are not on the blockchain.
1
getchaintips
2
3
[
4
{
5
"height": 244849,
6
"hash": "87458fe59d6f0e7957030d1a30029dad1ef94782d747db46e5e83effa45caa4c",
7
"branchlen": 0,
8
"status": "active"
9
},
10
{
11
"height": 244315,
12
"hash": "7689474e181547e41c4ffc0afbbcb037b2a680bca52f93d186fe58a849cecc0f",
13
"branchlen": 1,
14
"status": "valid-fork"
15
},
16
{
17
"height": 242324,
18
"hash": "7da31893bf1e531b67711d7e831dd799b753503109e04ea0d96ff028acbee313",
19
"branchlen": 1,
20
"status": "valid-headers"
21
},
22
{
23
"height": 240795,
24
"hash": "b5ddb716d5d0a50e38e948c30d51a03e8982584a0c896a216ddf5d46c0630101",
25
"branchlen": 1,
26
"status": "valid-fork"
27
},
28
Copied!

getchaintxstats ( nblocks blockhash )

Compute statistics about the total number and rate of transactions in the chain, where the default "window" is the last one month.
    "time" gives the Unix timestamp for the last block in the window
    "txcount" gives the total transactions from the launch of the blockchain
    "window_block_count" gives the number of blocks in the window (675 TX/day * 30 days)
    "window_interval" gives the window length in seconds
    "txrate" gives the average transactions per second (TPS) in the window
1
getchaintxstats
2
3
{
4
"time": 1540774144,
5
"txcount": 2361329,
6
"window_block_count": 20250,
7
"window_tx_count": 135311,
8
"window_interval": 2928224,
9
"txrate": 0.046209238091075
10
}
Copied!

getconnectioncount

Get the peer connection count for the wallet, typically 8 for outgoing only peer connections, or up to 125 for outgoing + incoming connections.
1
getconnectioncount
2
3
8
Copied!

getdifficulty

Proof-of-stake difficulty gives the Proof of Stake consensus target from the most recent block (proof-of-work is not used after the genesis blocks).
1
getdifficulty
2
3
{
4
"proof-of-work": 1.52587890625e-005,
5
"proof-of-stake": 1671018.148846696
6
}
Copied!

gethexaddress "address"

Converts a base58 pubkeyhash address to a hex address for use in smart contracts, returns the hex address.
1
gethexaddress HXvN7L3D2NkdPgt20rYrGkSPCggwkKbqa
2
3
9467c4cbd6c4bb736cf4724de25a298bc529bfa3
Copied!
See fromhexaddress to convert a hex address to base58 pubkeyhash.

getinfo

Hidden command. DEPERCATED. Command line interfaces (but not the hydra-qt GUI wallet) may invoke this command using -getinfo. The wallet below has 8 peer connections, and is unlocked for a long time ("unlocked until" is Unix epoch time in seconds). Use getpeerinfo to check computer clock compared to "timeoffset" for other peers in the network.
1
hydra-cli -getinfo
2
3
{
4
"version": 160200,
5
"protocolversion": 70016,
6
"walletversion": 130000,
7
"balance": 2.00000000,
8
"stake": 0.00000000,
9
"blocks": 281989,
10
"timeoffset": 0,
11
"connections": 8,
12
"proxy": "",
13
"difficulty": {
14
"proof-of-work": 1.52587890625e-005,
15
"proof-of-stake": 1928119.729097471
16
},
17
"testnet": false,
18
"moneysupply": 101107956,
19
"keypoololdest": 1507071638,
20
"keypoolsize": 1000,
21
"unlocked_until": 1644835797,
22
"paytxfee": 0.00000000,
23
"relayfee": 0.00400000,
24
"warnings": ""
25
}
Copied!

getmemoryinfo ("mode")

Gives information about memory usage.
1
getmemoryinfo
2
3
{
4
"locked": {
5
"used": 32,
6
"free": 262112,
7
"total": 262144,
8
"locked": 0,
9
"chunks_used": 1,
10
"chunks_free": 2
11
}
12
}
Copied!

getmempoolancestors txid (verbose)

If the given transaction is in the mempool, returns all its in-mempool ancestors.
1
getmempoolancestors 31d44105e8c71234f2c1ef3c3104c2a5d34fd47134207bb2a293dc37361debb7
2
3
[
4
"fa8354c63c87b631c70ca6edaac60055fcd2e9759a89161af4fc09532085ca10",
5
"9d28428b5867c0257c30262bb23569e7ef819ff00bb7563e8c90cee53b0ae83b",
6
"95bf14c60e6ec50a2a0c04e70bdc5be0f6b2bc984194b8afaf648181233d3c49",
7
"c7e93a793a9e63152bc95f060af14f7741bf1fe7f4d52284815798fe5518de56"
8
]
Copied!

getmempooldescendants txid (verbose)

If the given transaction is in the mempool, returns all its in-mempool descendants.
1
getmempooldescendants 95bf14c60e6ec50a2a0c04e70bdc5be0f6b2bc984194b8afaf648181233d3c49
2
3
[
4
"fa8354c63c87b631c70ca6edaac60055fcd2e9759a89161af4fc09532085ca10",
5
"9d28428b5867c0257c30262bb23569e7ef819ff00bb7563e8c90cee53b0ae83b",
6
"c7e93a793a9e63152bc95f060af14f7741bf1fe7f4d52284815798fe5518de56",
7
"31d44105e8c71234f2c1ef3c3104c2a5d34fd47134207bb2a293dc37361debb7"
8
]
Copied!

getmempoolentry txid

Get mempool data for a given transaction in the mempool.
1
getmempoolentry "0cc99a30bc2064041ea4263835b4ed594ff500c56d6b14e4970aeee548e71389"
2
3
{
4
"size": 373,
5
"fee": 0.00149600,
6
"modifiedfee": 0.00149600,
7
"time": 1539823932,
8
"height": 221206,
9
"descendantcount": 1,
10
"descendantsize": 373,
11
"descendantfees": 149600,
12
"ancestorcount": 1,
13
"ancestorsize": 373,
14
"ancestorfees": 149600,
15
"wtxid": "0cc99a30bc2064041ea4263835b4ed594ff500c56d6b14e4970aeee548e71389",
16
"depends": [
17
]
18
}
Copied!

getmempoolinfo

Returns details on the active state of the memory pool. Here a single transaction is waiting in the memory pool:
1
getmempoolinfo
2
3
{
4
"size": 1,
5
"bytes": 223,
6
"usage": 1072,
7
"maxmempool": 300000000,
8
"mempoolminfee": 0.00400000,
9
"minrelaytxfee": 0.00400000
10
}
Copied!

getmininginfo

Gives mining information including network weight ("netstakeweight" of 12.27 million shown below) and wallet weight ("stakeweight" of 107.6).
1
getmininginfo
2
3
{
4
"blocks": 453656,
5
"currentblockweight": 4000,
6
"currentblocktx": 0,
7
"difficulty": {
8
"proof-of-work": 1.62587890625e-005,
9
"proof-of-stake": 5785501.473223674,
10
"search-interval": 34847
11
},
12
"blockvalue": 400000000,
13
"netmhashps": 0,
14
"netstakeweight": 1226715419614939,
15
"errors": "",
16
"networkhashps": 80603867856378.4,
17
"pooledtx": 4,
18
"stakeweight": {
19
"minimum": 10759890919,
20
"maximum": 0,
21
"combined": 10759890919
22
},
23
"chain": "main",
24
"warnings": ""
25
}
Copied!

getnettotals

Gives the network traffic statistics since the wallet launched.
1
getnettotals
2
3
{
4
"totalbytesrecv": 923333,
5
"totalbytessent": 279356,
6
"timemillis": 1539478945470,
7
"uploadtarget": {
8
"timeframe": 86400,
9
"target": 0,
10
"target_reached": false,
11
"serve_historical_blocks": true,
12
"bytes_left_in_cycle": 0,
13
"time_left_in_cycle": 0
14
}
15
}
Copied!

getnetworkhashps ( nblocks height )

DEPRECATED. Returns a network hash value related to block mining difficulty, which is not relevant to Hydra Proof of Stake, for which the network hashes per second is the total number of nodes divided by 16 seconds.
1
getnetworkhashps
2
3
78300177154693.26
Copied!

getnetworkinfo

Gives the parameters for IPv4, IPv6 and Tor (Onion) network connections. Use getpeerinfo to check computer clock "timeoffset" to other peers in the network, not this value from getnetworkinfo.
1
getnetworkinfo
2
3
{
4
"version": 160100,
5
"subversion": "/Satoshi:0.16.1/",
6
"protocolversion": 70016,
7
"localservices": "000000000000040d",
8
"localrelay": true,
9
"timeoffset": 0,
10
"networkactive": true,
11
"connections": 8,
12
"networks": [
13
{
14
"name": "ipv4",
15
"limited": false,
16
"reachable": true,
17
"proxy": "",
18
"proxy_randomize_credentials": false
19
},
20
{
21
"name": "ipv6",
22
"limited": false,
23
"reachable": true,
24
"proxy": "",
25
"proxy_randomize_credentials": false
26
},
27
{
28
"name": "onion",
29
"limited": true,
30
"reachable": false,
31
"proxy": "",
32
"proxy_randomize_credentials": false
33
}
34
],
35
"relayfee": 0.00400000,
36
"incrementalfee": 0.00010000,
37
"localaddresses": [
38
],
39
"warnings": ""
40
}
Copied!

getnewaddress ( "account" "address_type" )

Get a new receiving address, with types "legacy", "p2sh-segwit" or "bech32". Hydra Mainnet legacy addresses start with an "H", and SegWit addresses will start with an "M" for p2sh-segwit and "qc1" for bech32. Hydra Testnet legacy addresses start with a "h", and SegWit addresses will start with an "m" for p2sh-segwit and "th1" for bech32. Here we get a new Mainnet SegWit bech32 address:
1
getnewaddress "" "bech32"
2
3
hc1q52g2c283225pfdm2wqdsk45aufm4urtcdp9d5
Copied!

getpeerinfo

Gives information about the wallet peer connections. "timeoffset" values of mostly zero means the computer clock is set correctly for network time.
1
getpeerinfo
2
3
[
4
{
5
"id": 1,
6
"addr": "35.198.108.56:3888",
7
"addrlocal": "168.252.32.120:63648",
8
"addrbind": "172.21.42.106:63648",
9
"services": "000000000000040d",
10
"relaytxes": true,
11
"lastsend": 1539479080,
12
"lastrecv": 1539479084,
13
"bytessent": 28109,
14
"bytesrecv": 90334,
15
"conntime": 1539467479,
16
"timeoffset": 0,
17
"pingtime": 0.375712,
18
"minping": 0.286454,
19
"version": 70016,
20
"subver": "/Satoshi:0.16.1/",
21
"inbound": false,
22
"addnode": false,
23
"startingheight": 244769,
24
"banscore": 0,
25
"synced_headers": 244853,
26
"synced_blocks": 244853,
27
"inflight": [
28
],
29
"whitelisted": false,
30
"bytessent_per_msg": {
31
"addr": 165,
32
"feefilter": 32,
33
"getaddr": 24,
34
"getblocktxn": 58,
35
"getdata": 2681,
36
"getheaders": 989,
37
"headers": 6660,
38
"inv": 10986,
39
"ping": 3104,
40
"pong": 3104,
41
"sendcmpct": 132,
42
"sendheaders": 24,
43
"verack": 24,
44
"version": 126
45
},
46
"bytesrecv_per_msg": {
47
"addr": 30192,
48
"blocktxn": 540,
49
"cmpctblock": 1780,
50
"feefilter": 32,
51
"getheaders": 989,
52
"headers": 22474,
53
"inv": 9137,
54
"ping": 3104,
55
"pong": 3104,
56
"sendcmpct": 66,
57
"sendheaders": 24,
58
"tx": 18742,
59
"verack": 24,
60
"version": 126
61
}
62
},
63
{
64
"id": 14,
65
"addr": "35.225.188.93:3888",
66
"addrlocal": "168.252.32.120:58535",
67
"addrbind": "172.21.42.106:58535",
68
"services": "000000000000040d",
69
"relaytxes": true,
70
"lastsend": 1539479090,
71
"lastrecv": 1539479088,
72
"bytessent": 22785,
73
"bytesrecv": 147958,
74
"conntime": 1539467555,
75
"timeoffset": 0,
76
"pingtime": 0.27101,
77
"minping": 0.169899,
78
"version": 70016,
79
"subver": "/Satoshi:0.16.1/",
80
"inbound": false,
81
"addnode": false,
82
"startingheight": 244770,
83
"banscore": 0,
84
"synced_headers": 244853,
85
"synced_blocks": 244853,
86
"inflight": [
87
],
88
"whitelisted": false,
89
"bytessent_per_msg": {
90
"addr": 110,
91
"feefilter": 32,
92
"getaddr": 24,
93
"getblocktxn": 522,
94
"getdata": 2656,
95
"getheaders": 989,
96
"headers": 554,
97
"inv": 11186,
98
"ping": 3104,
99
"pong": 3104,
100
"sendcmpct": 330,
101
"sendheaders": 24,
102
"verack": 24,
103
"version": 126
104
},
105
"bytesrecv_per_msg": {
106
"addr": 30082,
107
"blocktxn": 4943,
108
"cmpctblock": 30125,
109
"feefilter": 32,
110
"getheaders": 989,
111
"headers": 6657,
112
"inv": 8641,
113
"ping": 3104,
114
"pong": 3104,
115
"sendcmpct": 66,
116
"sendheaders": 24,
117
"tx": 60041,
118
"verack": 24,
119
"version": 126
120
}
121
},
122
Copied!

getrawchangeaddress ( "address_type" )

Returns a new address for receiving change with raw transactions, used for composing raw transactions. The address type may be "legacy", "p2sh-segwit" or "bech32".
1
getrawchangeaddress "p2sh-segwit"
2
3
MBncZ4Z8a71UrgsS5QqJfxkDbun5wHy6d
Copied!

getrawmempool ( verbose )

Get all the transactions waiting in the mempool.
1
getrawmempool
2
3
[
4
"d3139ba01a161eb35d40bbfe7cd78062c8ab1d6c57151a61f5d8f703996666f4",
5
"95bf14c60e6ec50a2a0c04e70bdc5be0f6b2bc984194b8afaf648181233d3c49",
6
"a66bc1d79da79b0939f03c96bb323a0b4a5a5d1f81fa13110e6cc741884e37f1",
7
8
]
Copied!

getrawtransaction "txid" ( verbose "blockhash" )

Get the data from a transaction, either as raw hex data or formatted (use "true"). Here formatted data is shown.
1
getrawtransaction cbd113e947d5c1b3fccae149d0d16c82e3bfe05c4f2c204c8bc65ae0697bbd64 true
2
3
{
4
"txid": "cbd113e947d5c1b3fccae149d0d16c82e3bfe05c4f2c204c8bc65ae0697bbd64",
5
"hash": "cbd113e947d5c1b3fccae149d0d16c82e3bfe05c4f2c204c8bc65ae0697bbd64",
6
"version": 1,
7
"size": 225,
8
"vsize": 225,
9
"locktime": 0,
10
"vin": [
11
{
12
"txid": "585c69575402000d74bb3ab75d2f6d3f63c78b4d9ef49f604f93d58a9c9a17fa",
13