Mining RPC Commands
Documentation for Raptoreum Mining RPC calls.
getblocktemplate
If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | template_request |
json object | Optional | [] | See CLI help for details |
Result
{ (json object)
"capabilities" : [ (json array) specific client side supported features
"str", (string) capability
...
],
"version" : n, (numeric) The preferred block version
"rules" : [ (json array) specific block rules that are to be enforced
"str", (string) rulename
...
],
"vbavailable" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments
"rulename" : n, (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule
...
},
"vbrequired" : n, (numeric) bit mask of versionbits the server requires set in submissions
"previousblockhash" : "str", (string) The hash of current highest block
"?????" : [ (json array) contents of non-coinbase transactions that should be included in the next block
{ (json object)
"data" : "hex", (string) transaction data encoded in hexadecimal (byte-for-byte)
"txid" : "hex", (string) transaction id encoded in little-endian hexadecimal
"hash" : "hex", (string) hash encoded in little-endian hexadecimal (including witness data)
"depends" : [ (json array) array of numbers
n, (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is
...
],
"fee" : n, (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one
"sigops" : n (numeric) total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren't any
},
...
],
"coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content
...
},
"coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)
"coinbasetxn" : { (json object) information for coinbase transaction
...
},
"target" : "str", (string) The hash target
"mintime" : xxx, (numeric) The minimum timestamp appropriate for the next block time, expressed in UNIX epoch time
"mutable" : [ (json array) list of ways the block template may be changed
"str", (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
...
],
"noncerange" : "hex", (string) A range of valid nonces
"sigoplimit" : n, (numeric) limit of sigops in blocks
"sizelimit" : n, (numeric) limit of block size
"curtime" : xxx, (numeric) current timestamp in UNIX epoch time
"bits" : "str", (string) compressed target of next block
"previousbits" : "str", (string) compressed target of current highest block
"height" : n, (numeric) The height of the next block
"smartnode" : [ (json array) required smartnode payments that must be included in the next block
{ (json object)
"payee" : "hex", (string) payee address
"script" : "hex", (string) payee scriptPubKey
"amount" : n (numeric) required amount to pay
},
...
],
"smartnode_payments_started" : true|false, (boolean) true, if smartnode payments started
"smartnode_payments_enforced" : true|false, (boolean) true, if smartnode payments are enforced
"superblock" : [ (json array) required superblock payees that must be included in the next block
{ (json object)
"payee" : "hex", (string) payee address
"script" : "hex", (string) payee scriptPubKey
"amount" : n (numeric) required amount to pay
},
...
],
"superblocks_started" : true|false, (boolean) true, if superblock payments started
"superblocks_enabled" : true|false, (boolean) true, if superblock payments are enabled
"coinbase_payload" : "hex" (string) coinbase transaction payload data encoded in hexadecimal
}
Examples
raptoreum-cli getblocktemplate
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
getmininginfo
Returns a json object containing mining-related information.
Arguments
No arguments.
Result
{ (json object)
"blocks" : n, (numeric) The current block
"currentblocksize" : n, (numeric, optional) The last block size
"currentblocktx" : n, (numeric, optional) The number of block transactions of the last block
"difficulty" : n, (numeric) The current difficulty
"networkhashps" : n, (numeric) The network hashes per second
"hashespersec" : n, (numeric) Your current hashes per second
"algos" : "str", (string) Current solving block algos orders
"pooledtx" : n, (numeric) The size of the mempool
"chain" : "str", (string) current network name (main, test, regtest)
"warnings" : "str" (string) any network and blockchain warnings
}
Examples
raptoreum-cli getmininginfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
getnetworkhashps
Returns the estimated network hashes per second based on the last n blocks.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | nblocks |
numeric | Optional | 120 | See CLI help for details |
| 2 | height |
numeric | Optional | -1 | See CLI help for details |
Result
n (numeric) Hashes per second estimated
Examples
raptoreum-cli getnetworkhashps
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
prioritisetransaction
- "txid" (string, required) The transaction id.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Result
true|false (boolean) Returns true
Examples
raptoreum-cli prioritisetransaction "txid" 10000
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "prioritisetransaction", "params": ["txid", 10000] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
submitblock
Attempts to submit new block to network.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 2 | dummy |
string | Optional | ignored | See CLI help for details |
Result
null (json null) Returns JSON Null when valid, a string according to BIP22 otherwise
Examples
raptoreum-cli submitblock "mydata"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
submitheader
Decode the given hexdata as a header and submit it as a candidate chain tip if valid.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Result
null (json null) None
Examples
raptoreum-cli submitheader "aabbcc"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitheader", "params": ["aabbcc"] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/