Difference between revisions of "RPC Commands"

From HoboNickels Wiki
Jump to: navigation, search
(getinfo)
(getrawtransaction)
Line 225: Line 225:
 
==== getrawtransaction ====
 
==== getrawtransaction ====
 
| <txid> [verbose=0]  
 
| <txid> [verbose=0]  
| f verbose=0, returns a string that is serialized, hex-encoded data for <txid>.
+
| 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 23:12, 7 December 2014

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