Difference between revisions of "RPC Commands"
(→getinfo) |
(→getrawtransaction) |
||
Line 225: | Line 225: | ||
==== getrawtransaction ==== | ==== getrawtransaction ==== | ||
| <txid> [verbose=0] | | <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>. | If verbose is non-zero, returns an Object with information about <txid>. | ||
| | | | ||
|- | |- | ||
− | | | + | | |
+ | |||
==== getreceivedbyaccount ==== | ==== getreceivedbyaccount ==== | ||
| <account> [minconf=1] | | <account> [minconf=1] |
Revision as of 22:12, 7 December 2014
Contents
- 1 How To Use RPC Commands
- 2 List of RPC Commands
- 2.1 addmultisigaddress
- 2.2 addnode
- 2.3 backupwallet
- 2.4 checkwallet
- 2.5 createmultisig
- 2.6 createrawtransaction
- 2.7 decoderawtransaction
- 2.8 dumpprivkey
- 2.9 encryptwallet
- 2.10 getaccount
- 2.11 getaccountaddress
- 2.12 getaddednodeinfo
- 2.13 getaddressesbyaccount
- 2.14 getbalance
- 2.15 getbestblockhash
- 2.16 getblock
- 2.17 getblockbynumber
- 2.18 getblockcount
- 2.19 getblockhash
- 2.20 getblocktemplate
- 2.21 getcheckpoint
- 2.22 getconnectioncount
- 2.23 getdifficulty
- 2.24 getgenerate
- 2.25 gethashespersec
- 2.26 getinfo
- 2.27 getmininginfo
- 2.28 getnewaddress
- 2.29 getnewpubkey
- 2.30 getrawmempool
- 2.31 getrawtransaction
- 2.32 getreceivedbyaccount
- 2.33 getreceivedbyaddress
- 2.34 gettransaction
- 2.35 getwork
- 2.36 getworkex
- 2.37 help
- 2.38 importprivkey
- 2.39 importwallet
- 2.40 MORE
How To Use RPC Commands
Wallet GUI
Open up the debug window, simply type the RPC command.
Linux
Navigate to the proper directory and type "./hobonickelsd" followed by the command.
List of RPC Commands
Required arguments are denoted inside < and >. Optional arguments are inside [ and ].
Usage is Command Parameters.
Command | Parameters | Description | Example |
---|---|---|---|
addmultisigaddress |
<nrequired> <'["key","key"]'> [account] | Add a nrequired-to-sign multisignature address to the wallet. Each key is a HoboNickels address or hex-encoded public key. If [account] is specified, assign address to [account]. | |
addnode |
remove|onetry> | Attempts add or remove <node> from the addnode list or try a connection to <node> once. | |
backupwallet |
<destination> | Safely copies wallet.dat to destination, which can be a directory or a path with filename. | |
checkwallet |
Check wallet for integrity. | ||
createmultisig |
<nrequired> <'["key","key"]'> | Creates a multi-signature address and returns a json object with keys:
address : hobonickels address redeemScript : hex-encoded redemption script |
|
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. | |
dumpprivkey |
<HoboNickelsaddress> | Reveals the private key corresponding to <HoboNickelsaddress>. | |
encryptwallet |
<passphrase> | Encrypts your wallet so that coins can only be sent if you enter a password. | |
getaccount |
<HoboNickelsaddress> | Returns the account associated with the given address. | |
getaccountaddress |
<account> | Returns the current HoboNickels address for receiving payments to this account. | |
getaddednodeinfo |
<dns> [node] | Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here). If dns is false, only a list of added nodes will be provided, otherwise connected information will also be available. | |
getaddressesbyaccount |
<account> | Returns the list of addresses for the given account. | |
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. |
|
getbestblockhash |
Returns the hash of the best block in the longest block chain. | ||
getblock |
<hash> [txinfo] | txinfo optional to print more detailed tx info. Returns details of a block with given block-hash. | |
getblockbynumber |
<number> [txinfo] | txinfo optional to print more detailed tx info. Returns details of a block with given block-number. | |
getblockcount |
Returns the block # that the client is synced to. | ||
getblockhash |
<index> | Returns hash of block in best-block-chain at <index>. | |
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 for full specification. |
|
getcheckpoint |
Returns the sync checkpoint, height (last block), and timestamp. | ||
getconnectioncount |
Returns the amount of peers that the wallet client is connected to. | ||
getdifficulty |
Returns the Proof of Work difficulty and the Proof of Stake difficulty. | ||
getgenerate |
Returns true or false. | ||
gethashespersec |
Returns a recent hashes per second performance measurement while generating. setgenerate needs to be true. | ||
getinfo |
[extended] | Returns several informative variables such as software version, blocks, total money supply, connections, wallets, ip address, PoW difficulty, and more.
The [extend] parameters is available from version 1.4. Setting it to true will give extended information |
|
getmininginfo |
returns mining information such as Proof of Work difficulty, network stake weight, and a few other variables. | ||
getnewaddress |
[account] | Adds a new HoboNickels address to your default wallet, labelled [account]. | |
getnewpubkey |
Returns information about peers the wallet client is connected to. IP address, connection time, and more. | ||
getrawmempool |
Returns all transaction ids in memory pool. | ||
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>. |
|
getreceivedbyaccount |
<account> [minconf=1] | Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations. | |
getreceivedbyaddress |
<HoboNickelsaddress> [minconf=1] | Returns the total amount received by <HoboNickelsaddress> in transactions with at least [minconf] confirmations. | |
gettransaction |
<txid> | Returns the details about a given transaction ID. Returns confirmations, addresses, and more. | |
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. | |
help |
[command] | Lists available RPC commands. Or more information about a [command] | |
importprivkey |
<HoboNickelsprivkey> [label] | Adds a private key (as returned by dumpprivkey) to your wallet. | |
importwallet |
<filename> | Imports keys from a wallet dump file (see dumpwallet). | |
MORE |
MORE | MORE |