getblocktemplate - Pastel RPC
getblocktemplate ( "jsonrequestobject" ) If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. It returns data needed to construct a block to work on. See https://en.bitcoin.it/wiki/BIP_0022 for full specification. Arguments: 1. "jsonrequestobject" (string, optional) A json object in the following spec { "mode": "template" (string, optional) This must be set to "template" or omitted "capabilities":[ (array, optional) A list of strings "support" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid' ,... ] } Result: { "version" : n, (numeric) The block version "previousblockhash" : "xxxx", (string) The hash of current highest block "finalsaplingroothash" : "xxxx", (string) The hash of the final sapling root "transactions" : [ (array) contents of non-coinbase transactions that should be included in the next block { "data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte) "hash" : "xxxx", (string) hash/id encoded in little-endian hexadecimal "depends" : [ (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 Patoshis); 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 "required" : true|false (boolean) if provided and true, this transaction must be in the final block } ,... ], "coinbasetxn" : { ... }, (json object) information for coinbase transaction "target" : "xxxx", (string) The hash target "mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT) "mutable" : [ (array of string) list of ways the block template may be changed "value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock' ,... ], "noncerange" : "00000000ffffffff", (string) A range of valid nonces "sigoplimit" : n, (numeric) limit of sigops in blocks "sizelimit" : n, (numeric) limit of block size "curtime" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT) "bits" : "xxx", (string) compressed target of next block "height" : n (numeric) The height of the next block "masternode" : { (json object) required masternode payee that must be included in the next block "payee" : "xxxx", (string) payee address "script" : "xxxx", (string) payee scriptPubKey "amount": n (numeric) required amount to pay }, "governance" : { (json object) required governance payee that must be included in the next block, can be empty "payee" : "xxxx", (string) payee address "script" :+ "xxxx", (string) payee scriptPubKey "amount": n (numeric) required amount to pay } } Examples: > pastel-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:9932/
Maintained by Pastel Network; license of the docs is MIT (see pastel repo)
Generated from a mainnet node
Addressindex
Blockchain
Control
Generating
Mining
Mnode
Network
Rawtransactions
Wallet
addmultisigaddress
backupwallet
dumpprivkey
dumpwallet
encryptwallet
fixmissingtxs
getaccount
getaccountaddress
getaddressesbyaccount
getbalance
getnewaddress
getrawchangeaddress
getreceivedbyaccount
getreceivedbyaddress
gettransaction
gettxfee
getunconfirmedbalance
getwalletinfo
importaddress
importprivkey
importwallet
keypoolrefill
listaccounts
listaddressamounts
listaddressgroupings
listlockunspent
listreceivedbyaccount
listreceivedbyaddress
listsinceblock
listtransactions
listunspent
lockunspent
move
scanburntransactions
scanformissingtxs
sendfrom
sendmany
sendtoaddress
setaccount
settxfee
signmessage
z_exportkey
z_exportviewingkey
z_exportwallet
z_getbalance
z_getnewaddress(type)
z_getnotescount
z_getoperationresult
z_getoperationstatus
z_gettotalbalance
z_importkey
z_importviewingkey
z_importwallet
z_listaddresses
z_listoperationids
z_listreceivedbyaddress
z_listunspent
z_mergetoaddress
z_sendmany
z_sendmanywithchangetosender
z_shieldcoinbase
z_viewtransaction
zcbenchmark