Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,381 Lines • ▼ Show 20 Lines | static UniValue lockunspent(const Config &config, | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
if (request.fHelp || request.params.size() < 1 || | if (request.fHelp || request.params.size() < 1 || | ||||
request.params.size() > 2) { | request.params.size() > 2) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"lockunspent unlock ([{\"txid\":\"txid\",\"vout\":n},...])\n" | RPCHelpMan{"lockunspent", | ||||
{ | |||||
{"unlock", RPCArg::Type::BOOL, false}, | |||||
{"transactions", | |||||
RPCArg::Type::ARR, | |||||
{ | |||||
{"", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"txid", RPCArg::Type::STR_HEX, false}, | |||||
{"vout", RPCArg::Type::NUM, false}, | |||||
}, | |||||
true}, | |||||
}, | |||||
true}, | |||||
}} | |||||
.ToString() + | |||||
"\nUpdates list of temporarily unspendable outputs.\n" | "\nUpdates list of temporarily unspendable outputs.\n" | ||||
"Temporarily lock (unlock=false) or unlock (unlock=true) specified " | "Temporarily lock (unlock=false) or unlock (unlock=true) specified " | ||||
"transaction outputs.\n" | "transaction outputs.\n" | ||||
"If no transaction outputs are specified when unlocking then all " | "If no transaction outputs are specified when unlocking then all " | ||||
"current locked transaction outputs are unlocked.\n" | "current locked transaction outputs are unlocked.\n" | ||||
"A locked transaction output will not be chosen by automatic coin " | "A locked transaction output will not be chosen by automatic coin " | ||||
"selection, when spending bitcoins.\n" | "selection, when spending bitcoins.\n" | ||||
"Locks are stored in memory only. Nodes start with zero locked " | "Locks are stored in memory only. Nodes start with zero locked " | ||||
▲ Show 20 Lines • Show All 616 Lines • ▼ Show 20 Lines | static UniValue listunspent(const Config &config, | ||||
CWallet *const pwallet = wallet.get(); | CWallet *const pwallet = wallet.get(); | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
if (request.fHelp || request.params.size() > 5) { | if (request.fHelp || request.params.size() > 5) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"listunspent ( minconf maxconf [\"addresses\",...] " | RPCHelpMan{ | ||||
"[include_unsafe] [query_options])\n" | "listunspent", | ||||
{ | |||||
{"minconf", RPCArg::Type::NUM, true}, | |||||
{"maxconf", RPCArg::Type::NUM, true}, | |||||
{"addresses", | |||||
RPCArg::Type::ARR, | |||||
{ | |||||
{"address", RPCArg::Type::STR_HEX, true}, | |||||
markblundeberg: should just be STR | |||||
}, | |||||
true}, | |||||
{"include_unsafe", RPCArg::Type::BOOL, true}, | |||||
{"query_options", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"minimumAmount", RPCArg::Type::AMOUNT, true}, | |||||
{"maximumAmount", RPCArg::Type::AMOUNT, true}, | |||||
{"maximumCount", RPCArg::Type::NUM, true}, | |||||
{"minimumSumAmount", RPCArg::Type::AMOUNT, true}, | |||||
}, | |||||
true}, | |||||
}} | |||||
.ToString() + | |||||
"\nReturns array of unspent transaction outputs\n" | "\nReturns array of unspent transaction outputs\n" | ||||
"with between minconf and maxconf (inclusive) confirmations.\n" | "with between minconf and maxconf (inclusive) confirmations.\n" | ||||
"Optionally filter to only include txouts paid to specified " | "Optionally filter to only include txouts paid to specified " | ||||
"addresses.\n" | "addresses.\n" | ||||
"\nArguments:\n" | "\nArguments:\n" | ||||
"1. minconf (numeric, optional, default=1) The minimum " | "1. minconf (numeric, optional, default=1) The minimum " | ||||
"confirmations to filter\n" | "confirmations to filter\n" | ||||
"2. maxconf (numeric, optional, default=9999999) The " | "2. maxconf (numeric, optional, default=9999999) The " | ||||
▲ Show 20 Lines • Show All 434 Lines • ▼ Show 20 Lines | UniValue signrawtransactionwithwallet(const Config &config, | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
if (request.fHelp || request.params.size() < 1 || | if (request.fHelp || request.params.size() < 1 || | ||||
request.params.size() > 3) { | request.params.size() > 3) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"signrawtransactionwithwallet \"hexstring\" ( " | RPCHelpMan{ | ||||
"[{\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\"," | "signrawtransactionwithwallet", | ||||
"\"redeemScript\":\"hex\"},...] sighashtype )\n" | { | ||||
{"hexstring", RPCArg::Type::STR, false}, | |||||
FabienUnsubmitted Not Done Inline ActionsSTR_HEX ? Fabien: `STR_HEX` ? | |||||
markblundebergAuthorUnsubmitted Done Inline Actionsheh the name is kind of a giveaway isn't it :D markblundeberg: heh the name is kind of a giveaway isn't it :D | |||||
{"prevtxs", | |||||
RPCArg::Type::ARR, | |||||
{ | |||||
{"", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"txid", RPCArg::Type::STR_HEX, false}, | |||||
{"vout", RPCArg::Type::NUM, false}, | |||||
{"scriptPubKey", RPCArg::Type::STR_HEX, false}, | |||||
{"redeemScript", RPCArg::Type::STR_HEX, false}, | |||||
{"amount", RPCArg::Type::AMOUNT, false}, | |||||
}, | |||||
false}, | |||||
}, | |||||
true}, | |||||
{"sighashtype", RPCArg::Type::STR, true}, | |||||
}} | |||||
.ToString() + | |||||
"\nSign inputs for raw transaction (serialized, hex-encoded).\n" | "\nSign inputs for raw transaction (serialized, hex-encoded).\n" | ||||
"The second optional argument (may be null) is an array of " | "The second optional argument (may be null) is an array of " | ||||
"previous transaction outputs that\n" | "previous transaction outputs that\n" | ||||
"this transaction depends on but may not yet be in the block " | "this transaction depends on but may not yet be in the block " | ||||
"chain.\n" + | "chain.\n" + | ||||
HelpRequiringPassphrase(pwallet) + | HelpRequiringPassphrase(pwallet) + | ||||
"\n" | "\n" | ||||
▲ Show 20 Lines • Show All 838 Lines • ▼ Show 20 Lines | static UniValue walletcreatefundedpsbt(const Config &config, | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
if (request.fHelp || request.params.size() < 2 || | if (request.fHelp || request.params.size() < 2 || | ||||
request.params.size() > 5) { | request.params.size() > 5) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"walletcreatefundedpsbt [{\"txid\":\"id\",\"vout\":n},...] " | RPCHelpMan{"walletcreatefundedpsbt", | ||||
"[{\"address\":amount},{\"data\":\"hex\"},...] ( locktime ) ( " | { | ||||
"options bip32derivs )\n" | {"inputs", | ||||
RPCArg::Type::ARR, | |||||
{ | |||||
{"", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"txid", RPCArg::Type::STR_HEX, false}, | |||||
{"vout", RPCArg::Type::NUM, false}, | |||||
{"sequence", RPCArg::Type::NUM, false}, | |||||
FabienUnsubmitted Not Done Inline Actionssequence is optional. Fabien: `sequence` is optional. | |||||
markblundebergAuthorUnsubmitted Done Inline Actionsgood catch, it's labelled wrong in Core even still markblundeberg: good catch, it's labelled wrong in Core even still | |||||
}, | |||||
false}, | |||||
}, | |||||
false}, | |||||
{"outputs", | |||||
RPCArg::Type::ARR, | |||||
{ | |||||
{"", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"address", RPCArg::Type::AMOUNT, true}, | |||||
}, | |||||
true}, | |||||
{"", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"data", RPCArg::Type::STR_HEX, true}, | |||||
}, | |||||
true}, | |||||
}, | |||||
false}, | |||||
{"locktime", RPCArg::Type::NUM, true}, | |||||
{"options", | |||||
RPCArg::Type::OBJ, | |||||
{ | |||||
{"changeAddress", RPCArg::Type::STR_HEX, true}, | |||||
markblundebergAuthorUnsubmitted Done Inline Actionsthis should just be STR markblundeberg: this should just be STR | |||||
{"changePosition", RPCArg::Type::NUM, true}, | |||||
{"change_type", RPCArg::Type::STR, true}, | |||||
FabienUnsubmitted Not Done Inline ActionsNote: this is unsupported, and would fail if passed (out of scope for this diff). Fabien: Note: this is unsupported, and would fail if passed (out of scope for this diff).
This will… | |||||
markblundebergAuthorUnsubmitted Done Inline ActionsI already ripped out various 'replaceable' things so it's fine to remove this too. markblundeberg: I already ripped out various 'replaceable' things so it's fine to remove this too. | |||||
{"includeWatching", RPCArg::Type::BOOL, true}, | |||||
{"lockUnspents", RPCArg::Type::BOOL, true}, | |||||
{"feeRate", RPCArg::Type::NUM, true}, | |||||
{"subtractFeeFromOutputs", | |||||
RPCArg::Type::ARR, | |||||
{ | |||||
{"int", RPCArg::Type::NUM, true}, | |||||
}, | |||||
true}, | |||||
}, | |||||
true}, | |||||
{"bip32derivs", RPCArg::Type::BOOL, true}, | |||||
}} | |||||
.ToString() + | |||||
"\nCreates and funds a transaction in the Partially Signed " | "\nCreates and funds a transaction in the Partially Signed " | ||||
"Transaction format. Inputs will be added if supplied inputs are " | "Transaction format. Inputs will be added if supplied inputs are " | ||||
"not enough\n" | "not enough\n" | ||||
"Implements the Creator and Updater roles.\n" | "Implements the Creator and Updater roles.\n" | ||||
"\nArguments:\n" | "\nArguments:\n" | ||||
"1. \"inputs\" (array, required) A json array of " | "1. \"inputs\" (array, required) A json array of " | ||||
"json objects\n" | "json objects\n" | ||||
" [\n" | " [\n" | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |
should just be STR