Difference between revisions of "RPC Commands"

From HoboNickels Wiki
Jump to: navigation, search
(Created page with "== 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 "./hobonickel...")
 
Line 15: Line 15:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! header 1
+
! '''Command'''
! header 2
+
! '''Parameters'''
! header 3
+
! '''Description'''
 +
! '''Example'''
 
|-
 
|-
| row 1, cell 1
+
|  
| row 1, cell 2
+
==== addmultisigaddress ====
| row 1, cell 3
+
| <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 ====
 +
| <node> <add|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 [https://en.bitcoin.it/wiki/BIP_0022 for full specification].
 +
|
 +
|
 +
|-
 +
|
 +
==== getcheckpoint ====
 +
|
 +
| Returns the sync checkpoint, height (last block), and timestamp.
 +
|
 +
|
 +
|-
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 +
|
 
| row 2, cell 1
 
| row 2, cell 1
 
| row 2, cell 2
 
| row 2, cell 2
 
| row 2, cell 3
 
| row 2, cell 3
 +
| row 2 , cell 4
 +
|
 
|}
 
|}

Revision as of 22:57, 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.
row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4 row 2, cell 1 row 2, cell 2 row 2, cell 3 row 2 , cell 4