Difference between revisions of "RPC Commands"
From Sexcoin Wiki
Lavajumper (talk | contribs) (→Wallet) |
Lavajumper (talk | contribs) (→Util) |
||
Line 180: | Line 180: | ||
|signmessagewithprivkey "privkey" "message" | |signmessagewithprivkey "privkey" "message" | ||
|- | |- | ||
− | |validateaddress " | + | |validateaddress "sexcoinaddress" |
|- | |- | ||
− | |verifymessage " | + | |verifymessage "sexcoinaddress" "signature" "message" |
|} | |} |
Revision as of 18:55, 26 July 2017
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" |