{"verbosity",RPCArg::Type::NUM,/* opt */true,/* default_val */"1","0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data"},
}}
.ToString()+
"\nArguments:\n"
"1. \"blockhash\" (string, required) The block hash\n"
"2. verbosity (numeric, optional, default=1) 0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data\n"
"\nResult (for verbosity = 0):\n"
"\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n"
{"height",RPCArg::Type::NUM,/* opt */false,/* default_val */"","The block height to prune up to. May be set to a discrete height, or a unix timestamp\n"
" to prune blocks whose block time is at least 2 hours older than the provided timestamp."},
}}
.ToString()+
"\nArguments:\n"
"1. \"height\" (numeric, required) The block height to prune up to. May be set to a discrete height, or a unix timestamp\n"
" to prune blocks whose block time is at least 2 hours older than the provided timestamp.\n"
{"include_mempool",RPCArg::Type::BOOL,/* opt */true,/* default_val */"true","Whether to include the mempool. Note that an unspent output that is spent in the mempool won't appear."},
}}
.ToString()+
"\nArguments:\n"
"1. \"txid\" (string, required) The transaction id\n"
"2. \"n\" (numeric, required) vout number\n"
"3. \"include_mempool\" (boolean, optional) Whether to include the mempool. Default: true."
" Note that an unspent output that is spent in the mempool won't appear.\n"
"\nResult:\n"
"{\n"
"\"bestblock\": \"hash\", (string) The hash of the block at the tip of the chain\n"
"\nCreates a multi-signature address with n signature of m keys required.\n"
"It returns a json object with the address and redeemScript.\n"
"\nArguments:\n"
"1. nrequired (numeric, required) The number of required signatures out of the n keys.\n"
"2. \"keys\" (string, required) A json array of hex-encoded public keys\n"
" [\n"
"\"key\" (string) The hex-encoded public key\n"
" ,...\n"
" ]\n"
"3. \"address_type\" (string, optional) The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is legacy.\n"
std::stringmsg=
RPCHelpMan{"createmultisig",
"\nCreates a multi-signature address with n signature of m keys required.\n"
"It returns a json object with the address and redeemScript.\n",
{
{"nrequired",RPCArg::Type::NUM,/* opt */false,/* default_val */"","The number of required signatures out of the n keys."},
{"keys",RPCArg::Type::ARR,/* opt */false,/* default_val */"","A json array of hex-encoded public keys.",
{
{"key",RPCArg::Type::STR_HEX,/* opt */false,/* default_val */"","The hex-encoded public key"},
}},
{"address_type",RPCArg::Type::STR,/* opt */true,/* default_val */"","The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is legacy."},
}}
.ToString()+
"\nResult:\n"
"{\n"
"\"address\":\"multisigaddress\", (string) The value of the new multisig address.\n"
"Returns an object containing information about memory usage.\n",
{
{"mode",RPCArg::Type::STR,true},
{"mode",RPCArg::Type::STR,/* opt */true,/* default_val */"","determines what kind of information is returned. This argument is optional, the default mode is \"stats\".\n"
" - \"stats\" returns general statistics about memory usage in the daemon.\n"
" - \"mallocinfo\" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+)."},
}}
.ToString()+
"Arguments:\n"
"1. \"mode\" determines what kind of information is returned. This argument is optional, the default mode is \"stats\".\n"
" - \"stats\" returns general statistics about memory usage in the daemon.\n"
" - \"mallocinfo\" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+).\n"
"\nResult (mode \"stats\"):\n"
"{\n"
"\"locked\": { (json object) Information about locked memory manager\n"
"Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be\n"
"full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).\n",
{
{"node",RPCArg::Type::STR,false},
{"command",RPCArg::Type::STR,false},
{"node",RPCArg::Type::STR,/* opt */false,/* default_val */"","The node (see getpeerinfo for nodes)"},
{"command",RPCArg::Type::STR,/* opt */false,/* default_val */"","'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once"},
}}
.ToString()+
"\nArguments:\n"
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"
"\nReturns information about the given added node, or all added nodes\n"
"(note that onetry addnodes are not listed here)\n",
{
{"node",RPCArg::Type::STR,true},
{"node",RPCArg::Type::STR,/* opt */true,/* default_val */"","If provided, return information about this specific node, otherwise all nodes are returned."},
}}
.ToString()+
"\nArguments:\n"
"1. \"node\" (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.\n"
"\nAttempts to add or remove an IP/Subnet from the banned list.\n",
{
{"subnet",RPCArg::Type::STR,false},
{"command",RPCArg::Type::STR,false},
{"bantime",RPCArg::Type::NUM,true},
{"absolute",RPCArg::Type::NUM,true},
{"subnet",RPCArg::Type::STR,/* opt */false,/* default_val */"","The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)"},
{"command",RPCArg::Type::STR,/* opt */false,/* default_val */"","'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list"},
{"bantime",RPCArg::Type::NUM,/* opt */true,/* default_val */"","time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)"},
{"absolute",RPCArg::Type::BOOL,/* opt */true,/* default_val */"","If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)"},
}}
.ToString()+
"\nArguments:\n"
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)\n"
"2. \"command\" (string, required) 'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list\n"
"3. \"bantime\" (numeric, optional) time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)\n"
"4. \"absolute\" (boolean, optional) If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)\n"
"\nReturn known addresses which can potentially be used to find new nodes in the network\n",
{
{"count",RPCArg::Type::NUM,true},
{"count",RPCArg::Type::NUM,/* opt */true,/* default_val */"1","How many addresses to return. Limited to the smaller of "+std::to_string(ADDRMAN_GETADDR_MAX)+" or "+std::to_string(ADDRMAN_GETADDR_MAX_PCT)+"% of all known addresses."},
}}
.ToString()+
"\nArguments:\n"
"1. \"count\" (numeric, optional) How many addresses to return. Limited to the smaller of "+std::to_string(ADDRMAN_GETADDR_MAX)+
" or "+std::to_string(ADDRMAN_GETADDR_MAX_PCT)+"% of all known addresses. (default = 1)\n"
"\nCreate a transaction spending the given inputs and creating new outputs.\n"
"Outputs can be addresses or data.\n"
"Returns hex-encoded raw transaction.\n"
"Note that the transaction's inputs are not signed, and\n"
"it is not stored in the wallet or transmitted to the network.\n"
"\nArguments:\n"
"1. \"inputs\" (array, required) A json array of json objects\n"
" [\n"
" {\n"
"\"txid\":\"id\", (string, required) The transaction id\n"
"\"vout\":n, (numeric, required) The output number\n"
"\"sequence\":n (numeric, optional) The sequence number\n"
" } \n"
" ,...\n"
" ]\n"
"2. \"outputs\" (array, required) a json array with outputs (key-value pairs)\n"
" [\n"
" {\n"
"\"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in "+CURRENCY_UNIT+"\n"
" },\n"
" {\n"
"\"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex-encoded data\n"
" }\n"
" ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n"
" accepted as second parameter.\n"
" ]\n"
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
"4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125-replaceable.\n"
" Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
RPCHelpMan{"createrawtransaction",
"\nCreate a transaction spending the given inputs and creating new outputs.\n"
"Outputs can be addresses or data.\n"
"Returns hex-encoded raw transaction.\n"
"Note that the transaction's inputs are not signed, and\n"
"it is not stored in the wallet or transmitted to the network.\n",
{
{"inputs",RPCArg::Type::ARR,/* opt */false,/* default_val */"","A json array of json objects",
{"address",RPCArg::Type::AMOUNT,/* opt */false,/* default_val */"","A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in "+CURRENCY_UNIT},
{"data",RPCArg::Type::STR_HEX,/* opt */false,/* default_val */"","A key-value pair. The key must be \"data\", the value is hex-encoded data"},
},
},
},
},
{"locktime",RPCArg::Type::NUM,/* opt */true,/* default_val */"0","Raw locktime. Non-0 value also locktime-activates inputs"},
{"replaceable",RPCArg::Type::BOOL,/* opt */true,/* default_val */"false","Marks this transaction as BIP125-replaceable.\n"
" Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible."},
}}
.ToString()+
"\nResult:\n"
"\"transaction\" (string) hex string of the transaction\n"
{"address",RPCArg::Type::AMOUNT,/* opt */false,/* default_val */"","A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in "+CURRENCY_UNIT},
{"data",RPCArg::Type::STR_HEX,/* opt */false,/* default_val */"","A key-value pair. The key must be \"data\", the value is hex-encoded data"},
},
},
true},
},
false},
{"locktime",RPCArg::Type::NUM,true},
{"replaceable",RPCArg::Type::BOOL,true},
},
{"locktime",RPCArg::Type::NUM,/* opt */true,/* default_val */"0","Raw locktime. Non-0 value also locktime-activates inputs"},
{"replaceable",RPCArg::Type::BOOL,/* opt */true,/* default_val */"false","Marks this transaction as BIP125 replaceable.\n"
" Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible."},
}}
.ToString()+
"\nArguments:\n"
"1. \"inputs\" (array, required) A json array of json objects\n"
" [\n"
" {\n"
"\"txid\":\"id\", (string, required) The transaction id\n"
"\"vout\":n, (numeric, required) The output number\n"
"\"sequence\":n (numeric, optional) The sequence number\n"
" } \n"
" ,...\n"
" ]\n"
"2. \"outputs\" (array, required) a json array with outputs (key-value pairs)\n"
" [\n"
" {\n"
"\"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in "+CURRENCY_UNIT+"\n"
" },\n"
" {\n"
"\"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex-encoded data\n"
" }\n"
" ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n"
" accepted as second parameter.\n"
" ]\n"
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
"4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.\n"
" Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
"\nResult:\n"
"\"psbt\" (string) The resulting raw transaction (base64-encoded string)\n"
conststd::vector<std::string>m_type_str;//!< Should be empty unless it is supposed to override the auto-generated type strings. Vector length is either 0 or 2, m_type_str.at(0) will override the type of the value in a key-value pair, m_type_str.at(1) will override the type in the argument description.
{"rescan",RPCArg::Type::BOOL,/* opt */true,/* default_val */"true","Rescan the wallet for transactions"},
}}
.ToString()+
"Hint: use importmulti to import more than one private key.\n"
"\nArguments:\n"
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
"2. \"label\" (string, optional, default=current label if address exists, otherwise \"\") An optional label\n"
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
"may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
{"rescan",RPCArg::Type::BOOL,/* opt */true,/* default_val */"true","Rescan the wallet for transactions"},
{"p2sh",RPCArg::Type::BOOL,/* opt */true,/* default_val */"false","Add the P2SH version of the script as well"},
}}
.ToString()+
"\nArguments:\n"
"1. \"address\" (string, required) The Bitcoin address (or hex-encoded script)\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
"4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well\n"
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
"may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
"If you have the full public key, you should call importpubkey instead of this.\n"
"\nImports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.\n",
{
{"rawtransaction",RPCArg::Type::STR_HEX,false},
{"txoutproof",RPCArg::Type::STR_HEX,false},
{"rawtransaction",RPCArg::Type::STR_HEX,/* opt */false,/* default_val */"","A raw transaction in hex funding an already-existing address in wallet"},
{"txoutproof",RPCArg::Type::STR_HEX,/* opt */false,/* default_val */"","The hex output from gettxoutproof that contains the transaction"},
}}
.ToString()+
"\nArguments:\n"
"1. \"rawtransaction\" (string, required) A raw transaction in hex funding an already-existing address in wallet\n"
"2. \"txoutproof\" (string, required) The hex output from gettxoutproof that contains the transaction\n"
"\nDeletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.\n",
{
{"txid",RPCArg::Type::STR_HEX,false},
{"txid",RPCArg::Type::STR_HEX,/* opt */false,/* default_val */"","The hex-encoded id of the transaction you are deleting"},
}}
.ToString()+
"\nArguments:\n"
"1. \"txid\" (string, required) The hex-encoded id of the transaction you are deleting\n"
{"rescan",RPCArg::Type::BOOL,/* opt */true,/* default_val */"true","Rescan the wallet for transactions"},
}}
.ToString()+
"\nArguments:\n"
"1. \"pubkey\" (string, required) The hex-encoded public key\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
"may report that the imported pubkey exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
"\nImport addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options). Requires a new wallet backup.\n\n",
"\nImport addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options). Requires a new wallet backup.\n",
{
{"requests",RPCArg::Type::ARR,
{"requests",RPCArg::Type::ARR,/* opt */false,/* default_val */"","Data to be imported",
{"redeemscript",RPCArg::Type::STR,/* opt */true,/* default_val */"","Allowed only if the scriptPubKey is a P2SH or P2SH-P2WSH address/scriptPubKey"},
{"witnessscript",RPCArg::Type::STR,/* opt */true,/* default_val */"","Allowed only if the scriptPubKey is a P2SH-P2WSH or P2WSH address/scriptPubKey"},
{"pubkeys",RPCArg::Type::ARR,/* opt */true,/* default_val */"","Array of strings giving pubkeys that must occur in the output or redeemscript",
{"keys",RPCArg::Type::ARR,/* opt */true,/* default_val */"","Array of strings giving private keys whose corresponding public keys must occur in the output or redeemscript",
{"internal",RPCArg::Type::BOOL,/* opt */true,/* default_val */"false","Stating whether matching outputs should be treated as not incoming payments aka change"},
{"watchonly",RPCArg::Type::BOOL,/* opt */true,/* default_val */"false","Stating whether matching outputs should be considered watched even when they're not spendable, only allowed if keys are empty"},
{"label",RPCArg::Type::STR,/* opt */true,/* default_val */"''","Label to assign to the address, only allowed with internal=false"},
{"rescan",RPCArg::Type::BOOL,/* opt */true,/* default_val */"true","Stating if should rescan the blockchain after all imports"},
},
true,"\"options\""},
"\"options\""},
}}
.ToString()+
"Arguments:\n"
"1. requests (array, required) Data to be imported\n"
" [ (array of json objects)\n"
" {\n"
"\"scriptPubKey\": \"<script>\" | { \"address\":\"<address>\" }, (string / json, required) Type of scriptPubKey (string for script, json for address)\n"
"\"timestamp\": timestamp | \"now\" , (integer / string, required) Creation time of the key in seconds since epoch (Jan 1 1970 GMT),\n"
" or the string \"now\" to substitute the current synced blockchain time. The timestamp of the oldest\n"
" key will determine how far back blockchain rescans need to begin for missing wallet transactions.\n"
"\"now\" can be specified to bypass scanning, for keys which are known to never have been used, and\n"
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key\n"
" creation time of all keys being imported by the importmulti call will be scanned.\n"
"\"redeemscript\": \"<script>\" , (string, optional) Allowed only if the scriptPubKey is a P2SH or P2SH-P2WSH address/scriptPubKey\n"
"\"witnessscript\": \"<script>\" , (string, optional) Allowed only if the scriptPubKey is a P2SH-P2WSH or P2WSH address/scriptPubKey\n"
"\"pubkeys\": [\"<pubKey>\", ... ] , (array, optional) Array of strings giving pubkeys that must occur in the output or redeemscript\n"
"\"keys\": [\"<key>\", ... ] , (array, optional) Array of strings giving private keys whose corresponding public keys must occur in the output or redeemscript\n"
"\"internal\": <true> , (boolean, optional, default: false) Stating whether matching outputs should be treated as not incoming payments aka change\n"
"\"watchonly\": <true> , (boolean, optional, default: false) Stating whether matching outputs should be considered watched even when they're not spendable, only allowed if keys are empty\n"
"\"label\": <label> , (string, optional, default: '') Label to assign to the address, only allowed with internal=false\n"
" }\n"
" ,...\n"
" ]\n"
"2. options (json, optional)\n"
" {\n"
"\"rescan\": <false>, (boolean, optional, default: true) Stating if should rescan the blockchain after all imports\n"
" }\n"
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
"may report that the imported keys, addresses or scripts exists but related transactions are still missing.\n"