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:
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:
and on the command line itself with "Hydra -?":
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.
abandontransaction "0cc99a30bc2064041ea4263835b4ed594ff500c56d6b14e4970aeee548e71389"
Transaction not eligible for abandonment (code -5)
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".
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.
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:
Hydra-qt returns "null" after each (see Figure 6).
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:
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:
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.
address (string, optional) The sender address hex string
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.
clearbanned
null
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:
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.
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 VERY HIGH transaction fee!
Disconnects a peer (node) using either the IP address or node number. Hydra-qt will return "null", Hydra will return nothing.
disconnectnode "35.198.0.76:3888"
null
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.
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.
Wallet dump created by Hydra v0.16.1.0-0806c12c4-dirty
* Created on 2018-10-31T01:56:32Z
* Best block at time of backup was 241161 (b11d5169d66d39cbcd848e2ea3f9adfcee1c22af945f100aec9e762d88609e2e),
mined on 2018-10-31T01:55:28Z
extended private masterkey:
Wallet dump created by Hydra v0.16.2.0-47a30461d-dirty
* Created on 2018-12-16T02:22:59Z
* Best block at time of backup was 148510
(ca8a9457a69882b395bf56671e3661e148d3aca4a7b6c77398804229e7fb58f4),
mined on 2018-05-06T02:45:52Z
extended private masterkey:
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.
encryptwallet [you should always use a long and strong passphrase]
(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.
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.
DEPRECATED. Please use estimatesmartfee for better estimates. Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks.
estimatefee 10
estimatefee is deprecated and will be fully removed in v0.17.
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.
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.
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.
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:
DEPRECATED. Returns the account name for a given address.
getaccount "H5ytvGW47jcS38NGz9cV6WtK2d3JqhQv5"
My trading Acct 101
getaccountaddress "account"
DEPRECATED. Returns the current Hydra address for an account. Use the null account "" for the default address.
getaccountaddress "My trading Acct 101"
H5ytvGW47jcS38NGz9cV6WtK2d3JqhQv5
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.
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.
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.
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.
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.
getnetworkhashps
78300177154693.26
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.
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:
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".
The transaction above has one "vin" UTXO input which provides the previous transaction to be spent and two outputs "vout". The first output "vout" sends 300.685401 to a receiving address, the second sends 11769.78668720 Hydra to a change address. The difference in value between the inputs and outputs is the transaction fee.
getreceivedbyaccount "account" ( minconf )
DEPRECATED. Returns the total amount received for an account name, which could be spent or unspent transactions, for transactions with at least minconf confirmations (default is 1 confirmation).
getreceivedbyaccount "MyAccount1"
14.21655439
getreceivedbyaddress "address" ( minconf )
Returns the total amount received by an address, including transactions that are spent or unspent.
"enabled": true means the wallet was launched with staking allowed (command line option -staking=false was not used)
"staking": true means the wallet is staking (decrypted, mature coins, blockchain synced)
"errors" gives various errors (rare)
"currentblocktx" gives the number of transactions in a block mined by the wallet
"pooledtx" gives the number of transactions waiting in the mempool
"difficulty" gives the PoS target difficulty for the current block
"search-interval" gives either the time in seconds since the wallet began staking or the time since the wallet's most recent block reward, here one day and one minute
"weight" gives the wallet weight in Satoshis, move the decimal point eight digits to the left to give these weights in units, here wallet weight is 148 Hydra and the network weight is 12.23 million
"netstakeweight" gives the estimated network weight
"expected time" gives an estimate of the average expected time to a block reward in seconds, here 4.59 months
Get the storage used by a smart contract, may take 5 to 10 minutes to return. Here is the result for the Bodhi token contract. getaccountinfo also returns smart contract storage, plus address, balance, and code.
Returns details for a contract call transaction given the transaction ID (hash), requires -logevents to be enabled for the wallet. Here is a contract call token transfer for Ocash:
Returns a hex-encoded proof that a transaction ID was included in a block, if there are unspent outputs in that transaction. See verifytxoutproof for the reciprocal.
Returns statistics about the whole blockchain unspent UTXOs, may take some time to return. "total_amount" gives the current total supply (genesis blocks + total block rewards)
Get the unconfirmed balance for the wallet, which is the amount in transactions received by the wallet that haven't yet been published in blocks. Here the wallet has received 7.0 Hydra that haven't been confirmed in a block:
getunconfirmedbalance
7.00000000
getwalletinfo
Returns information about the wallet:
"walletname" - the name of the wallet.dat file currently loaded
"walletversion" - not the software client version, use getnetworkinfo to check this
"balance" - balance in Hydra
"stake" - any balance currently committed to a stake
"unconfirmed_balance" - any balance that hasn't been published in the next blocks
"immature_balance" - any coinbase (Proof of Work) balance that does not have 500 confirmations, seen only for regtest.
"txcount" - the total number of transactions in the wallet
"keypoololdest" - the Unix epoch timestamp in seconds for the oldest key in the key pool
"keypoolsize" - how many new keys are pre-generated
"keypoolsize_hd_internal" - how many new keys are pre-generated for internal use (used for change addresses)
"unlocked_until" - the Unix epoch time in seconds that the wallet is unlocked, or 0 if the wallet is locked, this field is omitted for unencrypted wallets.
"paytxfee" - the transaction fee in Hydra per 1,000 bytes
"hdmasterkeyid" - a Hash 160 of the hierarchical deterministic (HD) master public key, this field is omitted if HD is not enabled
Gives help and examples for a specific command or lists all the commands (without a parameter). The examples are formatted so you can copy and paste them for giving the command (replacing the parameters as appropriate).
Adds a 34-character Hydra address or 66 hex character public key address that can be watched as if it were in your wallet but cannot be used to spend. The wallet will rescan after entering this command and should be backed up after adding addresses. Hydra-qt returns "null" and displays the "Watch-only" balance, Hydrad returns nothing.
Import multiple addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning the blockchain for all the new addresses in a single pass. Optional time stamps can control how far back the scanning begins for each address. Requires a new wallet backup after addition of the addresses.
Here we import two watch only addresses and scan the blockchain from 00:00:00 hours GMT on June 1, 2018 (timestamp 1527811200). After entering the command, the wallet will take several minutes to rescan the blockchain for the new addresses:
Adds a WIF private key to your wallet, for example as returned by dumpprivkey or from another Hydra wallet. The wallet must be unlocked and requires a new wallet backup afterwards. The wallet will rescan for a few minutes to add any balance from the new address, and return "null" if successful.
Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.
Example TO COME.
importpubkey "pubkey" ( "label" rescan )
Adds a public key that can be watched as if it were in your wallet but cannot be used to spend. The public key is 66 characters hex, and can be obtained using the validateaddress command. After entering this command, the wallet will rescan for a few minutes, Hydra-qt returns "null" and hydrad returns nothing. The wallet should be backed up after importing a public key.
Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup after this command. Use the full path to the dump file. Hydra-qt will show a status of "Importing" for a while, then "Scanning" as it rescans the blockchain. This command may take five minutes or more to return, and the wallet may appear to freeze during this time.
On a PC with the dump file in a folder "Backups" on the Desktop:
Hidden command. Permanently marks a block as invalid, as if it violated a consensus rule. Used for software testing or in some rare manual blockchain forking scenarios. Use reconsiderblock to reverse this command. Returns "null" if successful.
Refills the key pool with new private keys, with a default size of 100. The normal size of the keypool is 1,000 and the wallet opportunistically fills the keypool as addresses are used, so this command should use a 1,100 size, etc., to be meaningful. The wallet must be unlocked. Hydra-qt returns "null", Hydrad returns nothing.
keypoolrefill 1100
null
listaccounts ( minconf include_watchonly)
DEPRECATED. Returns information about account names and account balances. Gives the balance in Satoshis (Hydra x 0.00000001), including the default undefined account.
This "account" was an attempt to manually track balances from bitcoin which will be removed by version 0.17, because it doesn't work well, for example, returning negative values:
Returns a list of temporarily locked (unspendable) outputs. See also the lockunspent and unlock commands. If the wallet is restarted all the locks are cleared.
List all the transactions for your wallet since the given blockhash, or a list all the transactions since block 1 if blockhash is not given. The transactions below show a send and a receive transaction.
Updates list of temporarily unspendable outputs. Temporarily lock (unlock=false as shown below) or unlock (unlock=true) the specified transaction outputs. If no transactions are specified when unlocking then all current locked transactions are unlocked.
A locked transaction output will not be chosen by automatic coin selection when spending Hydra.
Locks are stored in memory only. Wallets launch with zero locked outputs and the locked output list is always cleared (by virtue of process exit) when a wallet stops or fails. Also see the listunspent call.
Gets and sets the logging configuration for the debug.log file. When called without an argument, returns the list of categories with status that are currently being debug logged or not. When called with arguments, adds or removes categories from debug logging. The arguments are evaluated in order "include" then "exclude". If an item is both included and excluded, it will thus end up being excluded.
Here we turn on logging for "mempool" and "mempoolrej" (they are listed first for "include") and turn off "http". Returns the current debug logging status.
DEPRECATED. Move a specified amount from one account in your wallet to another. Returns "true" if the command can be parsed, whether or not the accounts exist or the movement took place.
move "Test Addr" "LTCp2shsegwit" 1.1
true
ping
Requests that a ping be sent to other peers, to measure ping time. Results are provided in getpeerinfo, "pingtime" and "pingwait" fields are decimal seconds (does not provide a direct result like using "ping" from a system command prompt). The ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
ping
null
preciousblock "blockhash"
Prioritizes a block with an earlier time for blocks at the same height. Used in hard fork situations. See also invalidateblock. Hydra-qt returns "null" if successful, Hydrad returns nothing if successful.
Accepts the transaction into mined blocks at a higher (or lower) priority. A higher fee is not actually paid, the algorithm for selecting transactions into a block (which is trying to maximize fees) considers the transaction as having paid a higher fee. Hydra-qt and Hydrad return "true":
Prune the blockchain up to a given block. Pruning removes spent transactions to reduce the storage size for the blockchain. Returns the last block pruned. The wallet must be launched in prune mode with disk working space reserved, at least 550 MB, here with 2 GB of working space:
Hydra-qt.exe -prune=2000
Then you can give the command
pruneblockchain 125000
125000
Don't prune the blockchain if your wallet accepts incoming connections (over 8 peers) because your wallet needs to be able to send all the blocks to bootstrap new peers coming online.
reconsiderblock "blockhash"
Hidden command. Removes invalidity status of a block and its descendants, used for code testing or in manual blockchain reorganization. This command can reverse the effects of invalidateblock. Returns "null" if successful:
Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances. Hydra-cli returns "null".
Rescan the local blockchain for wallet transactions. An optional start height and stop height can be used, or by default scan the entire blockchain. This command will scan the blockchain for transactions of your wallet, and can be used if the wallet balance doesn't appear to be correct after a wallet restore or adding private keys. Returns the start and top height scanned.
Hidden command. Immediately re-broadcast unconfirmed wallet transactions to all peers. The wallet periodically re-broadcasts automatically, so this can be used for testing. Here two transactions were resent after being stuck in the local mempool after restarting the wallet.
Sets the amount of coins that will not be used for staking and can be sent immediately vs. waiting 500 confirmations after staking is turned off. Returns the reserve status and amount.
Writes the memory pool to disk in the mempool.dat file. Hydra-qt returns "null", Hydrad has no response.
savemempool
null
searchlogs (address) (topics)
Return the smart contract log events between two blocks (inclusive). The command requires -logevents to be enabled on wallet startup. Use the contract address hash if desired.
DEPRECATED (use sendtoaddress). Send an amount to a Hydra address, requires the wallet to be unlocked. The "account" is for notation, it does not control the source of UTXOs. If successful, returns the transaction ID.
Send to multiple addresses, requires the wallet to unlocked. Amounts are floating point in Hydra. Don't put blank spaces betweeen the parameters. If successful, returns a single transaction ID containing all the outputs. Here we send to two different addresses:
Send to multiple addresses, requires the wallet to be unlocked. Amounts are floating point in Hydra. Can send to duplicate addresses which sendmany can't do. If successful, returns a single transaction ID containing all the outputs. Here we send two transactions to the same address:
Transmits a raw hex-encoded transaction to the network. Also see createrawtransaction and signrawtransaction. Returns the transaction hash in hex, which is the transaction ID.
Sends to an address, with options for various comments and specifying the address to send the coins from. The wallet must be unlocked. If successful, returns the transaction ID.
DEPRECATED. Assigns and account name to the given address. Hydra-qt will return "null" if successful.
setaccount "HJv3YhWxG6EC2cpqZM5E3fjGzXYgakezm" "My New Account"
null
setban "subnet" "add|remove" (bantime) (absolute)
Attempts to add or remove an IP address from the banned list. Use "add" to add a ban, and give the duration of the ban in seconds. Returns "null" if successful. Here we add a ban for one day and confirm the result with listbanned:
Hidden command. Set the local time to given timestamp, only works for regtest. Give an epoch time in seconds, or 0 to go back to system time. The command line interface has no return.
docker exec myapp qcli setmocktime 1547319783
setnetworkactive true|false
Use to enable/disable peer network connections. Returns the network connection status. To disable the network connections:
setnetworkactive false
false
settxfee amount
Set the transaction fee per kilobyte of the transaction message. Overwrites the paytxfee parameter seen in getwalletinfo. The default minimum fee per 1,000 bytes is 0.004 Hydra. Returns true if successful.
settxfee 0.01
true
getwalletinfo would show "paytxfee": 0.01000000,
signmessage "address" "message"
Sign a message using the private key of an address, the wallet must be unlocked. Returns a base 64 signature hash.
Shuts down and exits the wallet. No return value - the wallet exits.
stop
submitblock "hexdata" ( "dummy" )
Attempts to submit new block to network. See https://en.bitcoin.it/wiki/BIP_0022 for full specification. Use getblocktemplate to construct a block along with the block header and transactions.
Arguments
"hexdata" (string, required) the hex-encoded block data to submit
"dummy" (optional) dummy value, for compatibility with BIP22. This value is ignored.
Example TO COME.
syncwithvalidationinterfacequeue
Hidden command. Waits for all the asynchronous validation queues (for the blockchain, mempool, etc.) to complete. For use by developers. Hydra-qt returns "null", Hydrad returns nothing.
syncwithvalidationinterfacequeue
null
uptime
Gives the wallet uptime (since starting) in seconds.
uptime
12592
validateaddress "address"
Return detailed information about an address, here the multisig address from addmultisigaddress:
Verifies that a proof points to a transaction in a block, returning the transaction if found or giving an empty tring or error not found in the best chain. The "proof" is the hex string from gettxoutproof.
Hidden command. Used to monitor when blockchain reloading has reached a given block. For command line interfaces like Hydrad (not for the Hydra-qt GUI wallet), the command returns after the given block is loaded. This example waits for Mainnet block 150,000:
Hidden command. Waits for (at least) block height and returns the height and blockhash of the current tip (highest block). Returns the current block on timeout or exit. Timeout is given in milliseconds, 0 or default is no timeout. This command only works from the command line (not with the Hydra-qt GUI wallet) and is used for development.
Waits for a new logs and returns matching log entries. When the call returns, it also specifies the next block number to start waiting for new logs. By calling waitforlogs repeatedly using the returned nextBlock number, a client can receive a stream of up-to-date log entries.
This call is different from the similarly named searchlogs. This call returns individual matching log entries, searchlogs returns a transaction receipt if one of the log entries of that transaction matches the filter conditions.
Arguments:
fromBlock (int | "latest", optional, default=null) The block number to start looking for logs. ()
toBlock (int | "latest", optional, default=null) The block number to stop looking for logs. If null, will wait indefinitely into the future.
filter ({ addresses?: Hex160String[], topics?: Hex256String[] }, optional default={}) Filter conditions for logs. Addresses and topics are specified as array of hexadecimal strings
minconf (uint, optional, default=6) Minimal number of confirmations before a log is returned
Example TO COME.
waitfornewblock (timeout)
Hidden command. Waits for a new block and returns the blockhash and height. Returns the current block on timeout or exit. This command works on command line only (not with the Hydra-qt GUI wallet) and is used for development. The timeout parameter is given in milliseconds and 0 indicates no timeout.
Hydra-cli returns no response, but you can check with getwalletinfo for "unlocked_until": 0 and check the padlock icon on Hydra-qt.
walletpassphrase [passphrase] timeout ( true )
Unlock an encrypted wallet for transactions which require use of a private key, such as sending coins, staking, or exporting private keys. Timeout gives the time in seconds to unlock and the optional Boolean "true" allows unlocking for staking only.
This command would unlock the wallet for 10 minutes:
walletpassphrase [you should always use a long and strong passphrase] 600
This command would unlock the wallet for staking only for a long time:
walletpassphrase [you should always use a long and strong passphrase] 99999999 true
The Hydra-qt wallet will show lock status with the padlock icon and the Console returns "null". Hydra-cli returns no status but you can check the unlock status with getwalletinfo for "unlocked_until":