{
  "ns": "Mining",
  "items": [
    {
      "name": "getblocktemplate",
      "desc": "getblocktemplate ( TemplateRequest )\n\nIf the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\nIt returns data needed to construct a block to work on.\nFor full specification, see BIPs 22, 23, 9, and 145:\n    https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki\n    https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki\n    https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes\n    https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki\n\nArguments:\n1. template_request         (json object, optional) A json object in the following spec\n     {\n       \"mode\":\"template\"    (string, optional) This must be set to \"template\", \"proposal\" (see BIP 23), or omitted\n       \"capabilities\":[     (array, optional) A list of strings\n           \"support\"          (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'\n           ,...\n       ],\n       \"rules\":[            (array, optional) A list of strings\n           \"support\"          (string) client side supported softfork deployment\n           ,...\n       ]\n     }\n\n\nResult:\n{\n  \"version\" : n,                    (numeric) The preferred block version\n  \"rules\" : [ \"rulename\", ... ],    (array of strings) specific block rules that are to be enforced\n  \"vbavailable\" : {                 (json object) set of pending, supported versionbit (BIP 9) softfork deployments\n      \"rulename\" : bitnumber          (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule\n      ,...\n  },\n  \"vbrequired\" : n,                 (numeric) bit mask of versionbits the server requires set in submissions\n  \"previousblockhash\" : \"xxxx\",     (string) The hash of current highest block\n  \"transactions\" : [                (array) contents of non-coinbase transactions that should be included in the next block\n      {\n         \"data\" : \"xxxx\",             (string) transaction data encoded in hexadecimal (byte-for-byte)\n         \"txid\" : \"xxxx\",             (string) transaction id encoded in little-endian hexadecimal\n         \"hash\" : \"xxxx\",             (string) hash encoded in little-endian hexadecimal (including witness data)\n         \"depends\" : [                (array) array of numbers \n             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\n             ,...\n         ],\n         \"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\n         \"sigops\" : n,                (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero\n         \"weight\" : n,                (numeric) total transaction weight, as counted for purposes of block limits\n         \"required\" : true|false      (boolean) if provided and true, this transaction must be in the final block\n      }\n      ,...\n  ],\n  \"coinbaseaux\" : {                 (json object) data that should be included in the coinbase's scriptSig content\n      \"flags\" : \"xx\"                  (string) key name is to be ignored, and value included in scriptSig\n  },\n  \"coinbasevalue\" : n,              (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)\n  \"coinbasetxn\" : { ... },          (json object) information for coinbase transaction\n  \"target\" : \"xxxx\",                (string) The hash target\n  \"mintime\" : xxx,                  (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)\n  \"mutable\" : [                     (array of string) list of ways the block template may be changed \n     \"value\"                          (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n     ,...\n  ],\n  \"noncerange\" : \"00000000ffffffff\",(string) A range of valid nonces\n  \"sigoplimit\" : n,                 (numeric) limit of sigops in blocks\n  \"sizelimit\" : n,                  (numeric) limit of block size\n  \"weightlimit\" : n,                (numeric) limit of block weight\n  \"curtime\" : ttt,                  (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n  \"bits\" : \"xxxxxxxx\",              (string) compressed target of next block\n  \"height\" : n                      (numeric) The height of the next block\n}\n\nExamples:\n> bitcoin-cli getblocktemplate \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblocktemplate\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n\n",
      "args": [
        {
          "type": "json object",
          "required": false,
          "name": "template_request",
          "desc": "A json object in the following spec      {        \"mode\":\"template\"    (string, optional) This must be set to \"template\", \"proposal\" (see BIP 23), or omitted        \"capabilities\":[     (array, optional) A list of strings            \"support\"          (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'            ,...        ],        \"rules\":[            (array, optional) A list of strings            \"support\"          (string) client side supported softfork deployment            ,...        ]      }",
          "default": null
        }
      ]
    },
    {
      "name": "getmininginfo",
      "desc": "getmininginfo\n\nReturns a json object containing mining-related information.\nResult:\n{\n  \"blocks\": nnn,             (numeric) The current block\n  \"currentblockweight\": nnn, (numeric) The last block weight\n  \"currentblocktx\": nnn,     (numeric) The last block transaction\n  \"difficulty\": xxx.xxxxx    (numeric) The current difficulty\n  \"errors\": \"...\"            (string) Current errors\n  \"networkhashps\": nnn,      (numeric) The network hashes per second\n  \"pooledtx\": n              (numeric) The size of the mempool\n  \"chain\": \"xxxx\",           (string) current network name as defined in BIP70 (main, test, regtest)\n}\n\nExamples:\n> bitcoin-cli getmininginfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getmininginfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n\n",
      "args": []
    },
    {
      "name": "getnetworkhashps",
      "desc": "getnetworkhashps ( nblocks height )\n\nReturns the estimated network hashes per second based on the last n blocks.\nPass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\nPass in [height] to estimate the network speed at the time when a certain block was found.\n\nArguments:\n1. nblocks     (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.\n2. height      (numeric, optional, default=-1) To estimate at the time of the given height.\n\nResult:\nx             (numeric) Hashes per second estimated\n\nExamples:\n> bitcoin-cli getnetworkhashps \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkhashps\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n\n",
      "args": [
        {
          "type": "numeric",
          "required": false,
          "name": "nblocks",
          "desc": "The number of blocks, or -1 for blocks since last difficulty change.",
          "default": "120"
        },
        {
          "type": "numeric",
          "required": false,
          "name": "height",
          "desc": "To estimate at the time of the given height.",
          "default": "-1"
        }
      ]
    },
    {
      "name": "prioritisetransaction",
      "desc": "prioritisetransaction <txid> <dummy value> <fee delta>\nAccepts the transaction into mined blocks at a higher (or lower) priority\n\nArguments:\n1. \"txid\"       (string, required) The transaction id.\n2. dummy          (numeric, optional) API-Compatibility for previous API. Must be zero or null.\n                  DEPRECATED. For forward compatibility use named arguments and omit this parameter.\n3. fee_delta      (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).\n                  The fee is not actually paid, only the algorithm for selecting transactions into a block\n                  considers the transaction as it would have paid a higher (or lower) fee.\n\nResult:\ntrue              (boolean) Returns true\n\nExamples:\n> bitcoin-cli prioritisetransaction \"txid\" 0.0 10000\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"prioritisetransaction\", \"params\": [\"txid\", 0.0, 10000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n\n",
      "args": [
        {
          "type": "string",
          "required": true,
          "name": "txid",
          "desc": "The transaction id.",
          "default": null
        },
        {
          "type": "numeric",
          "required": false,
          "name": "dummy",
          "desc": "API-Compatibility for previous API. Must be zero or null.                   DEPRECATED. For forward compatibility use named arguments and omit this parameter.",
          "default": null
        },
        {
          "type": "numeric",
          "required": true,
          "name": "fee_delta",
          "desc": "The fee value (in satoshis) to add (or subtract, if negative).                   The fee is not actually paid, only the algorithm for selecting transactions into a block                   considers the transaction as it would have paid a higher (or lower) fee.",
          "default": null
        }
      ]
    },
    {
      "name": "submitblock",
      "desc": "submitblock \"hexdata\"  ( \"dummy\" )\n\nAttempts to submit new block to network.\nSee https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n\nArguments\n1. \"hexdata\"        (string, required) the hex-encoded block data to submit\n2. \"dummy\"          (optional) dummy value, for compatibility with BIP22. This value is ignored.\n\nResult:\n\nExamples:\n> bitcoin-cli submitblock \"mydata\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"submitblock\", \"params\": [\"mydata\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n\n",
      "args": []
    }
  ],
  "desc": "Mining RPC"
}