Difference between revisions of "RPC Commands"
From Sexcoin Wiki
Lavajumper (talk | contribs) (Summary of rpc commands in table format with description) |
Lavajumper (talk | contribs) (→Related articles) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 45: | Line 45: | ||
!colspan="6"|Control | !colspan="6"|Control | ||
|- | |- | ||
− | |getinfo | + | |getinfo || Returns an object containing various state info. |
− | | Returns an object containing various state info. | ||
|{ | |{ | ||
"version": xxxxx, (numeric) the server version | "version": xxxxx, (numeric) the server version | ||
Line 67: | Line 66: | ||
|- | |- | ||
− | |help ( "command" ) | + | |help ( "command" )||List all commands, or get help for a specified command.|| |
− | |List all commands, or get help for a specified command. | ||
|- | |- | ||
− | |stop | + | |stop || Stop Sexcoin server.|| |
|} | |} | ||
+ | |||
== Generating == | == Generating == | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 101: | Line 100: | ||
!colspan="6"|Network | !colspan="6"|Network | ||
|- | |- | ||
− | |addnode "node" "add | + | |addnode "node" "add/remove/onetry" || Attempts add or remove a node from the addnode list. Or try a connection to a node once.|| |
− | | | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | |getaddednodeinfo dummy ( "node" ) | + | |getaddednodeinfo dummy ( "node" ) || || |
|- | |- | ||
− | |getconnectioncount | + | |getconnectioncount || || |
|- | |- | ||
− | |getnettotals | + | |getnettotals || || |
|- | |- | ||
− | |getnetworkinfo | + | |getnetworkinfo || Returns an object containing various state info regarding P2P networking || |
|- | |- | ||
|getpeerinfo||Returns data about each connected network node as a json array of objects. | |getpeerinfo||Returns data about each connected network node as a json array of objects. | ||
Line 142: | Line 137: | ||
|- | |- | ||
− | | | + | |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. | |
|- | |- | ||
− | |setban "ip(/netmask)" "add/remove" (bantime) (absolute) | + | |setban "ip(/netmask)" "add/remove" (bantime) (absolute) || || |
|} | |} | ||
+ | |||
== Rawtransactions == | == Rawtransactions == | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 184: | Line 180: | ||
|signmessagewithprivkey "privkey" "message" | |signmessagewithprivkey "privkey" "message" | ||
|- | |- | ||
− | |validateaddress " | + | |validateaddress "sexcoinaddress" |
|- | |- | ||
− | |verifymessage " | + | |verifymessage "sexcoinaddress" "signature" "message" |
|} | |} | ||
Line 202: | Line 198: | ||
|backupwallet "destination" | |backupwallet "destination" | ||
|- | |- | ||
− | |dumpprivkey " | + | |dumpprivkey "sexcoinaddress" |
|- | |- | ||
|dumpwallet "filename" | |dumpwallet "filename" | ||
|- | |- | ||
− | |getaccount " | + | |getaccount "sexcoinaddress" |
|- | |- | ||
|getaccountaddress "account" | |getaccountaddress "account" | ||
Line 220: | Line 216: | ||
|getreceivedbyaccount "account" ( minconf ) | |getreceivedbyaccount "account" ( minconf ) | ||
|- | |- | ||
− | |getreceivedbyaddress " | + | |getreceivedbyaddress "sexcoinaddress" ( minconf ) |
|- | |- | ||
|gettransaction "txid" ( includeWatchonly ) | |gettransaction "txid" ( includeWatchonly ) | ||
Line 229: | Line 225: | ||
|- | |- | ||
|importaddress "address" ( "label" rescan p2sh ) | |importaddress "address" ( "label" rescan p2sh ) | ||
+ | |Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend | ||
|- | |- | ||
− | |importprivkey " | + | |importprivkey "sexcoinprivkey" ( "label" rescan ) |
|- | |- | ||
|importprunedfunds | |importprunedfunds | ||
Line 282: | Line 279: | ||
|} | |} | ||
+ | |||
+ | == Related articles == | ||
+ | * [[sexcoin.conf]] | ||
+ | * [[RPC Commands 0.6.4.6]] | ||
+ | |||
+ | [[Category:Technical]] | ||
+ | [[Category:Developer]] | ||
+ | |||
+ | Please note that all contributions to Sexcoin Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Sexcoin Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here. | ||
+ | You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission! |
Latest revision as of 11:37, 7 August 2017
Contents
Blockchain
Blockchain | |||||
---|---|---|---|---|---|
getbestblockhash | |||||
getblock "hash" ( verbose ) | |||||
getblockchaininfo | |||||
getblockcount | |||||
getblockhash index | |||||
getblockheader "hash" ( verbose ) | |||||
getchaintips | |||||
getdifficulty | |||||
getmempoolancestors txid (verbose) | |||||
getmempooldescendants txid (verbose) | |||||
getmempoolentry txid | |||||
getmempoolinfo | |||||
getrawmempool ( verbose ) | |||||
gettxout "txid" n ( includemempool ) | |||||
gettxoutproof ["txid",...] ( blockhash ) | |||||
gettxoutsetinfo | |||||
verifychain ( checklevel numblocks ) | |||||
verifytxoutproof "proof" |
Control
Control | |||||
---|---|---|---|---|---|
getinfo | Returns an object containing various state info. | {
"version": xxxxx, (numeric) the server version "protocolversion": xxxxx, (numeric) the protocol version "walletversion": xxxxx, (numeric) the wallet version "balance": xxxxxxx, (numeric) the total sexcoin balance of the wallet "blocks": xxxxxx, (numeric) the current number of blocks processed in the server "timeoffset": xxxxx, (numeric) the time offset "connections": xxxxx, (numeric) the number of connections "proxy": "host:port", (string, optional) the proxy used by the server "difficulty": xxxxxx, (numeric) the current difficulty "testnet": true|false, (boolean) if the server is using testnet or not "keypoololdest": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool "keypoolsize": xxxx, (numeric) how many new keys are pre-generated "unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked "paytxfee": x.xxxx, (numeric) the transaction fee set in sxc/kb "relayfee": x.xxxx, (numeric) minimum relay fee for non-free transactions in sxc/kb "errors": "..." (string) any error messages } | |||
help ( "command" ) | List all commands, or get help for a specified command. | ||||
stop | Stop Sexcoin server. |
Generating
Generating | |||||
---|---|---|---|---|---|
generate numblocks ( maxtries ) | |||||
generatetoaddress numblocks address (maxtries) |
Mining
Mining | |||||
---|---|---|---|---|---|
getblocktemplate ( TemplateRequest ) | |||||
getmininginfo | |||||
getnetworkhashps ( blocks height ) | |||||
prioritisetransaction <txid> <priority delta> <fee delta> | |||||
submitblock "hexdata" ( "jsonparametersobject" ) |
Network
Network | |||||
---|---|---|---|---|---|
addnode "node" "add/remove/onetry" | Attempts add or remove a node from the addnode list. Or try a connection to a node once. | ||||
getaddednodeinfo dummy ( "node" ) | |||||
getconnectioncount | |||||
getnettotals | |||||
getnetworkinfo | Returns an object containing various state info regarding P2P networking | ||||
getpeerinfo | Returns data about each connected network node as a json array of objects. | {
"id": n, (numeric) Peer index "addr":"host:port", (string) The ip address and port of the peer "addrlocal":"ip:port", (string) local address "services":"xxxxxxxxxxxxxxxx", (string) The services offered "lastsend": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send "lastrecv": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive "bytessent": n, (numeric) The total bytes sent "bytesrecv": n, (numeric) The total bytes received "conntime": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT) "pingtime": n, (numeric) ping time "pingwait": n, (numeric) ping wait "version": v, (numeric) The peer version, such as 7001 "subver": "/Satoshi:0.8.5/", (string) The string version "inbound": true|false, (boolean) Inbound (true) or Outbound (false) "startingheight": n, (numeric) The starting height (block) of the peer "banscore": n, (numeric) The ban score "synced_headers": n, (numeric) The last header we have in common with this peer "synced_blocks": n, (numeric) The last block we have in common with this peer "inflight": [ n, (numeric) The heights of blocks we're currently asking from this peer ... ] } | |||
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. | |||
setban "ip(/netmask)" "add/remove" (bantime) (absolute) |
Rawtransactions
Raw Transactions | |||||
---|---|---|---|---|---|
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) | |||||
decoderawtransaction "hexstring" | |||||
decodescript "hex" | |||||
fundrawtransaction "hexstring" ( options ) | |||||
getrawtransaction "txid" ( verbose ) | |||||
sendrawtransaction "hexstring" ( allowhighfees ) | |||||
signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype ) |
Util
Util | |||||
---|---|---|---|---|---|
createmultisig nrequired ["key",...] | |||||
estimatefee nblocks | |||||
estimatepriority nblocks | |||||
estimatesmartfee nblocks | |||||
estimatesmartpriority nblocks | |||||
signmessagewithprivkey "privkey" "message" | |||||
validateaddress "sexcoinaddress" | |||||
verifymessage "sexcoinaddress" "signature" "message" |
Wallet
Wallet | |||||
---|---|---|---|---|---|
abandontransaction "txid" | |||||
addmultisigaddress nrequired ["key",...] ( "account" ) | |||||
addwitnessaddress "address" | |||||
backupwallet "destination" | |||||
dumpprivkey "sexcoinaddress" | |||||
dumpwallet "filename" | |||||
getaccount "sexcoinaddress" | |||||
getaccountaddress "account" | |||||
getaddressesbyaccount "account" | |||||
getbalance ( "account" minconf includeWatchonly ) | |||||
getnewaddress ( "account" ) | |||||
getrawchangeaddress | |||||
getreceivedbyaccount "account" ( minconf ) | |||||
getreceivedbyaddress "sexcoinaddress" ( minconf ) | |||||
gettransaction "txid" ( includeWatchonly ) | |||||
getunconfirmedbalance | |||||
getwalletinfo | |||||
importaddress "address" ( "label" rescan p2sh ) | Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend | ||||
importprivkey "sexcoinprivkey" ( "label" rescan ) | |||||
importprunedfunds | |||||
importpubkey "pubkey" ( "label" rescan ) | |||||
importwallet "filename" | |||||
keypoolrefill ( newsize ) | |||||
listaccounts ( minconf includeWatchonly) | |||||
listaddressgroupings | |||||
listlockunspent | |||||
listreceivedbyaccount ( minconf includeempty includeWatchonly) | |||||
listreceivedbyaddress ( minconf includeempty includeWatchonly) | |||||
listsinceblock ( "blockhash" target-confirmations includeWatchonly) | |||||
listtransactions ( "account" count from includeWatchonly) | |||||
listunspent ( minconf maxconf ["address",...] ) | |||||
lockunspent unlock ([{"txid":"txid","vout":n},...]) | |||||
move "fromaccount" "toaccount" amount ( minconf "comment" ) | |||||
removeprunedfunds "txid" | |||||
sendfrom "fromaccount" "tosexcoinaddress" amount ( minconf "comment" "comment-to" ) | |||||
sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] ) | |||||
sendtoaddress "sexcoinaddress" amount ( "comment" "comment-to" subtractfeefromamount ) | |||||
setaccount "sexcoinaddress" "account" | |||||
settxfee amount | |||||
signmessage "sexcoinaddress" "message" | |||||
walletlock | |||||
walletpassphrase "passphrase" timeout | |||||
walletpassphrasechange "oldpassphrase" "newpassphrase" |
Related articles
Please note that all contributions to Sexcoin Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Sexcoin Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!