--- title: "Gridcoin - RPC Reference" description: "" ---

Gridcoin RPC Reference

This page provides the commands available within the Gridcoin-Research client.

Wallet commands

addmultisigaddress <nrequired> <'["key","key"]'> [account]

Add a nrequired-to-sign multisignature address to the wallet. Each key is a Gridcoin address or hex-encoded public key. If [account] is specified, assign address to [account].

Doesn't require an unlocked wallet

backupprivatekeys <destination>

Backup wallet private keys to a file.

Requires unlocked wallet

backupwallet <destination>

Safely copies wallet.dat to destination, which can be a directory or a path with filename.

Requires unlocked wallet

burn <amount> [hex string]

Burns coins to the network.

Requires unlocked wallet

checkwallet

Checks wallet.dat file to ensure it is not missing any coins.

Doesn't require an unlocked wallet

createrawtransaction [{'txid' : 'id', 'vout' : n},....] {'address' : amount, 'data' : 'hex', ....}

Creates a raw transaction spending given inputs.

Doesn't require an unlocked wallet

decoderawtransaction <hex string>

Produces a human-readable JSON object for a raw transaction.

Doesn't require an unlocked wallet

decodescript <hex string>

Decode a hex-encoded script.

Doesn't require an unlocked wallet

dumpprivkey <gridcoinaddress>

Reveals the private key corresponding to <gridcoinaddress>.

Requires unlocked wallet

dumpwallet <filename>

Dumps wallet to a specified filename.

Requires unlocked wallet

encryptwallet <passphrase>

Encrypts the wallet with <passphrase>.

Doesn't require an unlocked wallet

getaccount <gridcoinaddress>

Returns the account associated with the given address.

Doesn't require an unlocked wallet

getaccountaddress <account>

Returns the current Gridcoin address for receiving payments to this account. If <account> does not exist, it will be created along with an associated new address that will be returned.

Doesn't require an unlocked wallet

getaddressbyaccount <account>

Returns the list of addresses for the given account.

Doesn't require an unlocked wallet

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.

Doesn't require an unlocked wallet

getnewaddress [account]

Returns a new Gridcoin address for receiving payments. If [account] is specified payments received with the address will be credited to [account].

Doesn't require an unlocked wallet

getrawtransaction <txid> [verbose=0]

Returns raw transaction representation for given transaction id.

Doesn't require an unlocked wallet

getreceivedbyaccount <account> [minconf=1]

Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations. If [account] not provided return will include all transactions to all accounts.

Doesn't require an unlocked wallet

getreceivedbyaddress <gridcoinaddress> [minconf=1]

Returns the amount received by <gridcoinaddress> in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0.

Doesn't require an unlocked wallet

gettransaction <txid>

Adds signatures to a raw transaction and returns the resulting raw transaction.

Doesn't require an unlocked wallet

getwalletinfo

Returns useful information about current wallet state.

Doesn't require an unlocked wallet

importprivkey <gridcoinprivkey> [label] [rescan=true]

Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, if a rescan is done looking for existing transactions.

Requires unlocked wallet

importwallet <filename>

Imports an existing wallet.dat file.

Doesn't require an unlocked wallet

keypoolrefill

Fills the keypool, requires wallet passphrase to be set.

Requires unlocked wallet

listaccounts [minconf=1]

Returns Object that has account names as keys, account balances as values.

Doesn't require an unlocked wallet

listaddressgroupings

Returns all addresses in the wallet and info used for coincontrol.

Doesn't require an unlocked wallet

listreceivedbyaccount [minconf=1] [includeempty=false]

Returns an array of objects containing: account, amount, confirmations

Doesn't require an unlocked wallet

listreceivedbyaddress [minconf=1] [includeempty=false]

Returns an array of objects containing: address, account, amount, confirmations. To get a list of accounts on the system, gridcoind listreceivedbyaddress 0 true.

Doesn't require an unlocked wallet

listsinceblock [blockhash] [target-confirmations]

Get all transactions in blocks since block [blockhash], or all transactions if omitted.

Doesn't require an unlocked wallet

listtransactions [account] [count=10] [from=0]

Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] not provided will return recent transaction from all accounts.

Doesn't require an unlocked wallet

listunspent [minconf=1] [maxconf=9999999] ['address',...]

Returns array of unspent transaction inputs in the wallet.

Doesn't require an unlocked wallet

makekeypair [prefix]

Make a public/private key pair.

Doesn't require an unlocked wallet

move <fromaccount> <toaccount> <amount> [minconf=1] [comment]

Move from one account in your wallet to another

Doesn't require an unlocked wallet

rain {'address':amount, 'address':amount}

Rain on specific addresses with specific amounts.

Requires unlocked wallet

repairwallet

Check wallet.dat for missing coins. If any are found, attempt recovery.

Doesn't require an unlocked wallet

resendtx

Resend any failed or unsent transactions.

Requires unlocked wallet

reservebalance <reserve=bool> <amount>

Reserve an amount of coins that do not participate in staking.

Doesn't require an unlocked wallet

sendfrom <fromaccount> <togridcoinaddress> <amount> [minconf=1] [comment] [comment-to]

<amount> is a real and is rounded to 8 decimal places. Will send the given amount to the given address, ensuring the account has a valid balance using [minconf] confirmations. Returns the transaction ID if successful (not in JSON object).

Requires unlocked wallet

sendrawtransaction <hex string>

Submits raw transaction (serialized, hex-encoded) to local node and network.

Doesn't require an unlocked wallet

sendtoaddress <gridcoinaddress> <amount> [comment] [comment-to]

<amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful.

Requires unlocked wallet

setaccount <gridcoinaddress> <account>

Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account.

Doesn't require an unlocked wallet

settxfee <amount>

<amount> is a real and is rounded to the nearest 0.00000001

Doesn't require an unlocked wallet

signmessage <gridcoinaddress> <message>

Sign a message with the private key of an address.

Requires unlocked wallet

signrawtransaction <hex string> [{'txid':txid,'vout':n,'scriptPubKey':hex,'redeemScript':hex},...] [<privatekey1>,...] [sighashtype='ALL']

Adds signatures to a raw transaction and returns the resulting raw transaction.

Requires unlocked wallet

unspentreport

Display a report on unspent coins in the wallet.

Doesn't require an unlocked wallet

validateaddress <gridcoinaddress>

Return information about <gridcoinaddress>.

Doesn't require an unlocked wallet

validatepubkey <gridcoinpubkey>

Return information about <gridcoinpubkey>.

Doesn't require an unlocked wallet

verifymessage <gridcoinaddress> <signature> <message>

Verify a signed message.

Doesn't require an unlocked wallet

walletlock

Lock an encrypted wallet.

Requires unlocked wallet

walletpassphrase <passphrase> <timeout> [stakingonly=bool]

Encrypt your wallet with a passphrase.

Doesn't require an unlocked wallet

walletpassphrasechange <oldpassphrase> <newpassphrase>

Change an encrypted wallet's passphrase.

Requires unlocked wallet

Mining commands

advertisebeacon

Send a beacon to the Neural Network for your CPID to claim POR rewards.

Requires unlocked wallet

beaconreport

Displays beacons and associated addresses.

Wallet unlock unneccessarry

beaconstatus [cpid]

Display beaconstatus on own or specified beacon.

Wallet unlock unneccessarry

cpids

Display project CPIDs for your BOINC account.

Wallet unlock unneccessarry

currentneuralhash

Displays current Neural Network contract hash.

Wallet unlock unneccessarry

currentneuralreport

Displays current Neural Network quorum hashes.

Wallet unlock unneccessarry

explainmagnitude [force=bool]

Request current information from the Neural Network about your magnitude by project.

Wallet unlock unneccessarry

getmininginfo

Displays mining-related information.

Wallet unlock unneccessarry

lifetime

Display lifetime payments for CPID as well as lifetime average magnitude.

Wallet unlock unneccessarry

magnitude [cpid]

Displays information for the magnitude of all cpids or the one specified.

Wallet unlock unneccessarry

neuralhash

Displays information about the popular neural hash.

Wallet unlock unneccessarry

neuralreport

Displays neural report for the network.

Wallet unlock unneccessarry

resetcpids

Reloads CPIDs from BOINC.

Wallet unlock unneccessarry

rsa

Displays RSA (Research Savings Account) report for your CPID

Wallet unlock unneccessarry

staketime

Display estimated time to stake.

Wallet unlock unneccessarry

superblockage

Display time since last superblock.

Wallet unlock unneccessarry

superblocks [cpid]

Display data on recent superblocks. Optional: Shows magnitude for a cpid for recent superblocks.

Wallet unlock unneccessarry

syncdpor2

Synchronize with the neural network

Wallet unlock unneccessarry

upgradedbeaconreport

Display upgraded beacon report of the network.

Wallet unlock unneccessarry

validcpids

Displays information about valid CPIDs (on team Gridcoin, same CPID) collected from BOINC.

Wallet unlock unneccessarry

Network commands

addnode <node> <add|remove|onetry>

Attempts add or remove <node> from the addnode list or try a connection to <node> once.

Wallet unlock unneccessarry

addpoll <title> <days> <question> <answers> <sharetype> <url>

Add a poll to the network. Requires 100K GRC balance

Requires unlocked wallet

askforoutstandingblocks

Force ask for outstandingblocks from network.

Wallet unlock unneccessarry

currenttime

Displays UTC Unix time as well as date and time in UTC.

Wallet unlock unneccessarry

decryptphrase

Decrypts phrase encrypted by encryptphrase.

Wallet unlock unneccessarry

encryptphrase

Encrypts phrase to be decryptable by decryptphrase.

Wallet unlock unneccessarry

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.

Wallet unlock unneccessarry

getbestblockhash

Returns the hash of the best (tip) block in the longest block chain.

Wallet unlock unneccessarry

getblock <hash> [verbose=true]

Returns information about the block with the given hash.

Wallet unlock unneccessarry

getblockbynumber <hash>

Returns information about the block with the given block number.

Wallet unlock unneccessarry

getblockchaininfo

Displays current state of the blockchain.

Wallet unlock unneccessarry

getblockcount

Returns the number of blocks in the longest block chain.

Wallet unlock unneccessarry

getblockhash <index>

Returns hash of block in best-block-chain at <index>; index 0 is the genesis block

Wallet unlock unneccessarry

getcheckpoint

Show info of synchronized checkpoint.

Wallet unlock unneccessarry

getconnectioncount

Returns the number of connections to other nodes.

Wallet unlock unneccessarry

getdifficulty

Returns the current network difficulty.

Wallet unlock unneccessarry

getinfo

Returns an object containing various state info.

Wallet unlock unneccessarry

getnettotals

Returns information about network traffic, including bytes in, bytes out, and current time.

Wallet unlock unneccessarry

getnetworkinfo

Displays network related information.

Wallet unlock unneccessarry

getpeerinfo

Returns data about each connected node.

Wallet unlock unneccessarry

getrawmempool

Display all transactions waiting in the mempool.

Wallet unlock unneccessarry

listallpolldetails

Lists all polls with details.

Wallet unlock unneccessarry

listallpolls

Lists all polls.

Wallet unlock unneccessarry

listpolldetails

Lists poll details.

Wallet unlock unneccessarry

listpollresults <pollname> [showexpired=bool]

Displays results for specified poll.

Wallet unlock unneccessarry

listpolls

Lists all polls.

Wallet unlock unneccessarry

memorypool

Displays included and excluded memory pool transactions.

Wallet unlock unneccessarry

networktime

Displays current network time.

Wallet unlock unneccessarry

ping

Requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.

Wallet unlock unneccessarry

reindex

Re-index the block chain.

Wallet unlock unneccessarry

restart

Restarts the wallet.

Wallet unlock unneccessarry

showblock <blocknumber>

Returns all information about the block at <index>.

Wallet unlock unneccessarry

stop

Stop Gridcoin server.

Wallet unlock unneccessarry

vote <title> <answers>

Vote on a specific poll with specified answers.

Requires unlocked wallet

votedetails <pollname>

Displays vote details of a specified poll.

Wallet unlock unneccessarry