Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 2) { | ||||
{"label", RPCArg::Type::STR, /* opt */ true, | {"label", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The label name for the address to be linked to. If not " | "The label name for the address to be linked to. If not " | ||||
"provided, the default label \"\" is used. It can also be " | "provided, the default label \"\" is used. It can also be " | ||||
"set to the empty string \"\" to represent the default " | "set to the empty string \"\" to represent the default " | ||||
"label. The label does not need to exist, it will be " | "label. The label does not need to exist, it will be " | ||||
"created if there is no label by the given name."}, | "created if there is no label by the given name."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"\"address\" (string) The new bitcoin address\n" | "\"address\" (string) The new bitcoin address\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleRpc("getnewaddress", "")); | HelpExampleRpc("getnewaddress", "")); | ||||
} | } | ||||
// Belt and suspenders check for disabled private keys | // Belt and suspenders check for disabled private keys | ||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { | if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { | ||||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 2) { | ||||
{ | { | ||||
{"address", RPCArg::Type::STR, /* opt */ false, | {"address", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The bitcoin address to be associated with a label."}, | "The bitcoin address to be associated with a label."}, | ||||
{"label", RPCArg::Type::STR, /* opt */ false, | {"label", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The label to assign to the address."}, | "The label to assign to the address."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("setlabel", | HelpExampleCli("setlabel", | ||||
"\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"tabby\"") + | "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"tabby\"") + | ||||
HelpExampleRpc( | HelpExampleRpc( | ||||
"setlabel", | "setlabel", | ||||
"\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"tabby\"")); | "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"tabby\"")); | ||||
} | } | ||||
LOCK(pwallet->cs_wallet); | LOCK(pwallet->cs_wallet); | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 2 || | ||||
" transaction, just kept in " | " transaction, just kept in " | ||||
"your wallet."}, | "your wallet."}, | ||||
{"subtractfeefromamount", RPCArg::Type::BOOL, | {"subtractfeefromamount", RPCArg::Type::BOOL, | ||||
/* opt */ true, /* default_val */ "false", | /* opt */ true, /* default_val */ "false", | ||||
"The fee will be deducted from the amount being sent.\n" | "The fee will be deducted from the amount being sent.\n" | ||||
" The recipient will receive " | " The recipient will receive " | ||||
"less bitcoins than you enter in the amount field."}, | "less bitcoins than you enter in the amount field."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"\"txid\" (string) The transaction id.\n" | "\"txid\" (string) The transaction id.\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("sendtoaddress", | HelpExampleCli("sendtoaddress", | ||||
"\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1") + | "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1") + | ||||
HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvay" | HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvay" | ||||
"dd\" 0.1 \"donation\" \"seans " | "dd\" 0.1 \"donation\" \"seans " | ||||
"outpost\"") + | "outpost\"") + | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 2) { | ||||
{ | { | ||||
{"address", RPCArg::Type::STR, /* opt */ false, | {"address", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The bitcoin address to use for the private key."}, | "The bitcoin address to use for the private key."}, | ||||
{"message", RPCArg::Type::STR, /* opt */ false, | {"message", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The message to create a signature of."}, | "The message to create a signature of."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"\"signature\" (string) The signature of the message " | "\"signature\" (string) The signature of the message " | ||||
"encoded in base 64\n" | "encoded in base 64\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nUnlock the wallet for 30 seconds\n" + | "\nUnlock the wallet for 30 seconds\n" + | ||||
HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") + | HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") + | ||||
"\nCreate the signature\n" + | "\nCreate the signature\n" + | ||||
HelpExampleCli( | HelpExampleCli( | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
{"address", RPCArg::Type::STR, /* opt */ false, | {"address", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The bitcoin address for transactions."}, | "The bitcoin address for transactions."}, | ||||
{"minconf", RPCArg::Type::NUM, /* opt */ true, | {"minconf", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "1", | /* default_val */ "1", | ||||
"Only include transactions confirmed at least this many " | "Only include transactions confirmed at least this many " | ||||
"times."}, | "times."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"amount (numeric) The total amount in " + | "amount (numeric) The total amount in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
" received at this address.\n" | " received at this address.\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nThe amount from transactions with at least 1 confirmation\n" + | "\nThe amount from transactions with at least 1 confirmation\n" + | ||||
HelpExampleCli("getreceivedbyaddress", | HelpExampleCli("getreceivedbyaddress", | ||||
"\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\"") + | "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\"") + | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The selected label, may be the default label " | "The selected label, may be the default label " | ||||
"using \"\"."}, | "using \"\"."}, | ||||
{"minconf", RPCArg::Type::NUM, /* opt */ true, | {"minconf", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "1", | /* default_val */ "1", | ||||
"Only include transactions confirmed at least this " | "Only include transactions confirmed at least this " | ||||
"many times."}, | "many times."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"amount (numeric) The total amount in " + | "amount (numeric) The total amount in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
" received for this label.\n" | " received for this label.\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nAmount received by the default label with at least 1 " | "\nAmount received by the default label with at least 1 " | ||||
"confirmation\n" + | "confirmation\n" + | ||||
HelpExampleCli("getreceivedbylabel", "\"\"") + | HelpExampleCli("getreceivedbylabel", "\"\"") + | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | if (request.fHelp || (request.params.size() > 3)) { | ||||
/* default_val */ "0", | /* default_val */ "0", | ||||
"Only include transactions confirmed at least this " | "Only include transactions confirmed at least this " | ||||
"many times."}, | "many times."}, | ||||
{"include_watchonly", RPCArg::Type::BOOL, | {"include_watchonly", RPCArg::Type::BOOL, | ||||
/* opt */ true, /* default_val */ "false", | /* opt */ true, /* default_val */ "false", | ||||
"Also include balance in watch-only addresses (see " | "Also include balance in watch-only addresses (see " | ||||
"'importaddress')"}, | "'importaddress')"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"amount (numeric) The total amount in " + | "amount (numeric) The total amount in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
" received for this wallet.\n" | " received for this wallet.\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nThe total amount in the wallet with 1 or more confirmations\n" + | "\nThe total amount in the wallet with 1 or more confirmations\n" + | ||||
HelpExampleCli("getbalance", "") + | HelpExampleCli("getbalance", "") + | ||||
"\nThe total amount in the wallet at least 6 blocks confirmed\n" + | "\nThe total amount in the wallet at least 6 blocks confirmed\n" + | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 2 || | ||||
"specified here, the sender pays the fee.", | "specified here, the sender pays the fee.", | ||||
{ | { | ||||
{"address", RPCArg::Type::STR, /* opt */ true, | {"address", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"Subtract fee from this address"}, | "Subtract fee from this address"}, | ||||
}, | }, | ||||
}, | }, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"\"txid\" (string) The transaction id for the " | "\"txid\" (string) The transaction id for the " | ||||
"send. Only 1 transaction is created regardless of \n" | "send. Only 1 transaction is created regardless of \n" | ||||
" the number of addresses.\n" | " the number of addresses.\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nSend two amounts to two different addresses:\n" + | "\nSend two amounts to two different addresses:\n" + | ||||
HelpExampleCli("sendmany", | HelpExampleCli("sendmany", | ||||
"\"\" " | "\"\" " | ||||
▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 2 || | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"bitcoin address or hex-encoded public key"}, | "bitcoin address or hex-encoded public key"}, | ||||
}, | }, | ||||
}, | }, | ||||
{"label", RPCArg::Type::STR, /* opt */ true, | {"label", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"A label to assign the addresses to."}, | "A label to assign the addresses to."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"address\":\"multisigaddress\", (string) The value of the " | " \"address\":\"multisigaddress\", (string) The value of the " | ||||
"new multisig address.\n" | "new multisig address.\n" | ||||
" \"redeemScript\":\"script\" (string) The string value " | " \"redeemScript\":\"script\" (string) The string value " | ||||
"of the hex-encoded redemption script.\n" | "of the hex-encoded redemption script.\n" | ||||
"}\n" | "}\n" | ||||
▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 4) { | ||||
{"include_watchonly", RPCArg::Type::BOOL, /* opt */ true, | {"include_watchonly", RPCArg::Type::BOOL, /* opt */ true, | ||||
/* default_val */ "false", | /* default_val */ "false", | ||||
"Whether to include watch-only addresses (see " | "Whether to include watch-only addresses (see " | ||||
"'importaddress')."}, | "'importaddress')."}, | ||||
{"address_filter", RPCArg::Type::STR, /* opt */ true, | {"address_filter", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"If present, only return information on this address."}, | "If present, only return information on this address."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"[\n" | "[\n" | ||||
" {\n" | " {\n" | ||||
" \"involvesWatchonly\" : true, (bool) Only returned if " | " \"involvesWatchonly\" : true, (bool) Only returned if " | ||||
"imported addresses were involved in transaction\n" | "imported addresses were involved in transaction\n" | ||||
" \"address\" : \"receivingaddress\", (string) The receiving " | " \"address\" : \"receivingaddress\", (string) The receiving " | ||||
"address\n" | "address\n" | ||||
" \"amount\" : x.xxx, (numeric) The total " | " \"amount\" : x.xxx, (numeric) The total " | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 3) { | ||||
/* default_val */ "false", | /* default_val */ "false", | ||||
"Whether to include labels that haven't received " | "Whether to include labels that haven't received " | ||||
"any payments."}, | "any payments."}, | ||||
{"include_watchonly", RPCArg::Type::BOOL, | {"include_watchonly", RPCArg::Type::BOOL, | ||||
/* opt */ true, /* default_val */ "false", | /* opt */ true, /* default_val */ "false", | ||||
"Whether to include watch-only addresses (see " | "Whether to include watch-only addresses (see " | ||||
"'importaddress')."}, | "'importaddress')."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"[\n" | "[\n" | ||||
" {\n" | " {\n" | ||||
" \"involvesWatchonly\" : true, (bool) Only returned if " | " \"involvesWatchonly\" : true, (bool) Only returned if " | ||||
"imported addresses were involved in transaction\n" | "imported addresses were involved in transaction\n" | ||||
" \"amount\" : x.xxx, (numeric) The total amount " | " \"amount\" : x.xxx, (numeric) The total amount " | ||||
"received by addresses with this label\n" | "received by addresses with this label\n" | ||||
" \"confirmations\" : n, (numeric) The number of " | " \"confirmations\" : n, (numeric) The number of " | ||||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 4) { | ||||
{"skip", RPCArg::Type::NUM, /* opt */ true, | {"skip", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "0", | /* default_val */ "0", | ||||
"The number of transactions to skip"}, | "The number of transactions to skip"}, | ||||
{"include_watchonly", RPCArg::Type::BOOL, /* opt */ true, | {"include_watchonly", RPCArg::Type::BOOL, /* opt */ true, | ||||
/* default_val */ "false", | /* default_val */ "false", | ||||
"Include transactions to watch-only addresses (see " | "Include transactions to watch-only addresses (see " | ||||
"'importaddress')"}, | "'importaddress')"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"[\n" | "[\n" | ||||
" {\n" | " {\n" | ||||
" \"address\":\"address\", (string) The bitcoin address of " | " \"address\":\"address\", (string) The bitcoin address of " | ||||
"the transaction.\n" | "the transaction.\n" | ||||
" \"category\":\"send|receive\", (string) The transaction " | " \"category\":\"send|receive\", (string) The transaction " | ||||
"category.\n" | "category.\n" | ||||
" \"amount\": x.xxx, (numeric) The amount in " + | " \"amount\": x.xxx, (numeric) The amount in " + | ||||
▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 4) { | ||||
"'importaddress')"}, | "'importaddress')"}, | ||||
{"include_removed", RPCArg::Type::BOOL, /* opt */ true, | {"include_removed", RPCArg::Type::BOOL, /* opt */ true, | ||||
/* default_val */ "true", | /* default_val */ "true", | ||||
"Show transactions that were removed due to a reorg in " | "Show transactions that were removed due to a reorg in " | ||||
"the \"removed\" array\n" | "the \"removed\" array\n" | ||||
" " | " " | ||||
" (not guaranteed to work on pruned nodes)"}, | " (not guaranteed to work on pruned nodes)"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"transactions\": [\n" | " \"transactions\": [\n" | ||||
" \"address\":\"address\", (string) The bitcoin address of " | " \"address\":\"address\", (string) The bitcoin address of " | ||||
"the transaction. Not present for move transactions (category = " | "the transaction. Not present for move transactions (category = " | ||||
"move).\n" | "move).\n" | ||||
" \"category\":\"send|receive\", (string) The transaction " | " \"category\":\"send|receive\", (string) The transaction " | ||||
"category. 'send' has negative amounts, 'receive' has positive " | "category. 'send' has negative amounts, 'receive' has positive " | ||||
▲ Show 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR, /* opt */ false, | {"txid", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", "The transaction id"}, | /* default_val */ "", "The transaction id"}, | ||||
{"include_watchonly", RPCArg::Type::BOOL, | {"include_watchonly", RPCArg::Type::BOOL, | ||||
/* opt */ true, /* default_val */ "false", | /* opt */ true, /* default_val */ "false", | ||||
"Whether to include watch-only addresses in " | "Whether to include watch-only addresses in " | ||||
"balance calculation and details[]"}, | "balance calculation and details[]"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"amount\" : x.xxx, (numeric) The transaction amount " | " \"amount\" : x.xxx, (numeric) The transaction amount " | ||||
"in " + | "in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
"\n" | "\n" | ||||
" \"fee\": x.xxx, (numeric) The amount of the fee in " + | " \"fee\": x.xxx, (numeric) The amount of the fee in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
"It only works on transactions which are not included " | "It only works on transactions which are not included " | ||||
"in a block and are not currently in the mempool.\n" | "in a block and are not currently in the mempool.\n" | ||||
"It has no effect on transactions which are already " | "It has no effect on transactions which are already " | ||||
"abandoned.\n", | "abandoned.\n", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, | {"txid", RPCArg::Type::STR_HEX, /* opt */ false, | ||||
/* default_val */ "", "The transaction id"}, | /* default_val */ "", "The transaction id"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("abandontransaction", "\"1075db55d416d3ca199f55b6084" | HelpExampleCli("abandontransaction", "\"1075db55d416d3ca199f55b6084" | ||||
"e2115b9345e16c5cf302fc80e9d5f" | "e2115b9345e16c5cf302fc80e9d5f" | ||||
"bf5d48d\"") + | "bf5d48d\"") + | ||||
HelpExampleRpc("abandontransaction", "\"1075db55d416d3ca199f55b6084" | HelpExampleRpc("abandontransaction", "\"1075db55d416d3ca199f55b6084" | ||||
"e2115b9345e16c5cf302fc80e9d5f" | "e2115b9345e16c5cf302fc80e9d5f" | ||||
"bf5d48d\"")); | "bf5d48d\"")); | ||||
Show All 35 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"backupwallet", | "backupwallet", | ||||
"\nSafely copies current wallet file to destination, " | "\nSafely copies current wallet file to destination, " | ||||
"which can be a directory or a path with filename.\n", | "which can be a directory or a path with filename.\n", | ||||
{ | { | ||||
{"destination", RPCArg::Type::STR, /* opt */ false, | {"destination", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", "The destination directory or file"}, | /* default_val */ "", "The destination directory or file"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" + HelpExampleCli("backupwallet", "\"backup.dat\"") + | "\nExamples:\n" + HelpExampleCli("backupwallet", "\"backup.dat\"") + | ||||
HelpExampleRpc("backupwallet", "\"backup.dat\"")); | HelpExampleRpc("backupwallet", "\"backup.dat\"")); | ||||
} | } | ||||
// Make sure the results are valid at least up to the most recent block | // Make sure the results are valid at least up to the most recent block | ||||
// the user could have gotten from another RPC command prior to now | // the user could have gotten from another RPC command prior to now | ||||
pwallet->BlockUntilSyncedToCurrentChain(); | pwallet->BlockUntilSyncedToCurrentChain(); | ||||
Show All 21 Lines | if (request.fHelp || request.params.size() > 1) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
RPCHelpMan{"keypoolrefill", | RPCHelpMan{"keypoolrefill", | ||||
"\nFills the keypool." + | "\nFills the keypool." + | ||||
HelpRequiringPassphrase(pwallet) + "\n", | HelpRequiringPassphrase(pwallet) + "\n", | ||||
{ | { | ||||
{"newsize", RPCArg::Type::NUM, /* opt */ true, | {"newsize", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "100", "The new keypool size"}, | /* default_val */ "100", "The new keypool size"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" + HelpExampleCli("keypoolrefill", "") + | "\nExamples:\n" + HelpExampleCli("keypoolrefill", "") + | ||||
HelpExampleRpc("keypoolrefill", "")); | HelpExampleRpc("keypoolrefill", "")); | ||||
} | } | ||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { | if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { | ||||
throw JSONRPCError(RPC_WALLET_ERROR, | throw JSONRPCError(RPC_WALLET_ERROR, | ||||
"Error: Private keys are disabled for this wallet"); | "Error: Private keys are disabled for this wallet"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) { | ||||
{ | { | ||||
{"passphrase", RPCArg::Type::STR, /* opt */ false, | {"passphrase", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", "The wallet passphrase"}, | /* default_val */ "", "The wallet passphrase"}, | ||||
{"timeout", RPCArg::Type::NUM, /* opt */ false, | {"timeout", RPCArg::Type::NUM, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The time to keep the decryption key in seconds; capped " | "The time to keep the decryption key in seconds; capped " | ||||
"at 100000000 (~3 years)."}, | "at 100000000 (~3 years)."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nNote:\n" | "\nNote:\n" | ||||
"Issuing the walletpassphrase command while the wallet is already " | "Issuing the walletpassphrase command while the wallet is already " | ||||
"unlocked will set a new unlock\n" | "unlocked will set a new unlock\n" | ||||
"time that overrides the old one.\n" | "time that overrides the old one.\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nUnlock the wallet for 60 seconds\n" + | "\nUnlock the wallet for 60 seconds\n" + | ||||
HelpExampleCli("walletpassphrase", "\"my pass phrase\" 60") + | HelpExampleCli("walletpassphrase", "\"my pass phrase\" 60") + | ||||
"\nLock the wallet again (before 60 seconds)\n" + | "\nLock the wallet again (before 60 seconds)\n" + | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) { | ||||
"\nChanges the wallet passphrase from 'oldpassphrase' " | "\nChanges the wallet passphrase from 'oldpassphrase' " | ||||
"to 'newpassphrase'.\n", | "to 'newpassphrase'.\n", | ||||
{ | { | ||||
{"oldpassphrase", RPCArg::Type::STR, /* opt */ false, | {"oldpassphrase", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", "The current passphrase"}, | /* default_val */ "", "The current passphrase"}, | ||||
{"newpassphrase", RPCArg::Type::STR, /* opt */ false, | {"newpassphrase", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", "The new passphrase"}, | /* default_val */ "", "The new passphrase"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("walletpassphrasechange", | HelpExampleCli("walletpassphrasechange", | ||||
"\"old one\" \"new one\"") + | "\"old one\" \"new one\"") + | ||||
HelpExampleRpc("walletpassphrasechange", | HelpExampleRpc("walletpassphrasechange", | ||||
"\"old one\", \"new one\"")); | "\"old one\", \"new one\"")); | ||||
} | } | ||||
auto locked_chain = pwallet->chain().lock(); | auto locked_chain = pwallet->chain().lock(); | ||||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | if (!pwallet->IsCrypted() && | ||||
"If the wallet is already encrypted, use the " | "If the wallet is already encrypted, use the " | ||||
"walletpassphrasechange call.\n", | "walletpassphrasechange call.\n", | ||||
{ | { | ||||
{"passphrase", RPCArg::Type::STR, /* opt */ false, | {"passphrase", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The pass phrase to encrypt the wallet with. It must be " | "The pass phrase to encrypt the wallet with. It must be " | ||||
"at least 1 character, but should be long."}, | "at least 1 character, but should be long."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nEncrypt your wallet\n" + | "\nEncrypt your wallet\n" + | ||||
HelpExampleCli("encryptwallet", "\"my pass phrase\"") + | HelpExampleCli("encryptwallet", "\"my pass phrase\"") + | ||||
"\nNow set the passphrase to use the wallet, such as for signing " | "\nNow set the passphrase to use the wallet, such as for signing " | ||||
"or sending bitcoin\n" + | "or sending bitcoin\n" + | ||||
HelpExampleCli("walletpassphrase", "\"my pass phrase\"") + | HelpExampleCli("walletpassphrase", "\"my pass phrase\"") + | ||||
"\nNow we can do something like sign\n" + | "\nNow we can do something like sign\n" + | ||||
HelpExampleCli("signmessage", "\"address\" \"test message\"") + | HelpExampleCli("signmessage", "\"address\" \"test message\"") + | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
"The transaction id"}, | "The transaction id"}, | ||||
{"vout", RPCArg::Type::NUM, /* opt */ false, | {"vout", RPCArg::Type::NUM, /* opt */ false, | ||||
/* default_val */ "", "The output number"}, | /* default_val */ "", "The output number"}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"true|false (boolean) Whether the command was successful or " | "true|false (boolean) Whether the command was successful or " | ||||
"not\n" | "not\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nList the unspent transactions\n" + | "\nList the unspent transactions\n" + | ||||
HelpExampleCli("listunspent", "") + | HelpExampleCli("listunspent", "") + | ||||
"\nLock an unspent transaction\n" + | "\nLock an unspent transaction\n" + | ||||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
"settxfee", | "settxfee", | ||||
"\nSet the transaction fee per kB for this wallet. Overrides " | "\nSet the transaction fee per kB for this wallet. Overrides " | ||||
"the global -paytxfee command line parameter.\n", | "the global -paytxfee command line parameter.\n", | ||||
{ | { | ||||
{"amount", RPCArg::Type::AMOUNT, /* opt */ false, | {"amount", RPCArg::Type::AMOUNT, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The transaction fee in " + CURRENCY_UNIT + "/kB"}, | "The transaction fee in " + CURRENCY_UNIT + "/kB"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult\n" | "\nResult\n" | ||||
"true|false (boolean) Returns true if successful\n" | "true|false (boolean) Returns true if successful\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("settxfee", "0.00001") + | HelpExampleCli("settxfee", "0.00001") + | ||||
HelpExampleRpc("settxfee", "0.00001")); | HelpExampleRpc("settxfee", "0.00001")); | ||||
} | } | ||||
auto locked_chain = pwallet->chain().lock(); | auto locked_chain = pwallet->chain().lock(); | ||||
▲ Show 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
"starting bitcoind will be" | "starting bitcoind will be" | ||||
"\napplied to the new wallet (eg -zapwallettxes, " | "\napplied to the new wallet (eg -zapwallettxes, " | ||||
"upgradewallet, rescan, etc).\n", | "upgradewallet, rescan, etc).\n", | ||||
{ | { | ||||
{"filename", RPCArg::Type::STR, /* opt */ false, | {"filename", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The wallet directory or .dat file."}, | "The wallet directory or .dat file."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"name\" : <wallet_name>, (string) The wallet name if " | " \"name\" : <wallet_name>, (string) The wallet name if " | ||||
"loaded successfully.\n" | "loaded successfully.\n" | ||||
" \"warning\" : <warning>, (string) Warning message if " | " \"warning\" : <warning>, (string) Warning message if " | ||||
"wallet was not loaded cleanly.\n" | "wallet was not loaded cleanly.\n" | ||||
"}\n" | "}\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
/* opt */ true, /* default_val */ "false", | /* opt */ true, /* default_val */ "false", | ||||
"Disable the possibility of private keys (only " | "Disable the possibility of private keys (only " | ||||
"watchonlys are possible in this mode)."}, | "watchonlys are possible in this mode)."}, | ||||
{"blank", RPCArg::Type::BOOL, /* opt */ true, | {"blank", RPCArg::Type::BOOL, /* opt */ true, | ||||
/* default_val */ "false", | /* default_val */ "false", | ||||
"Create a blank wallet. A blank wallet has no keys " | "Create a blank wallet. A blank wallet has no keys " | ||||
"or HD seed. One can be set using sethdseed.\n"}, | "or HD seed. One can be set using sethdseed.\n"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"name\" : <wallet_name>, (string) The wallet name if " | " \"name\" : <wallet_name>, (string) The wallet name if " | ||||
"created successfully. If the wallet was created using a full " | "created successfully. If the wallet was created using a full " | ||||
"path, the wallet_name will be the full path.\n" | "path, the wallet_name will be the full path.\n" | ||||
" \"warning\" : <warning>, (string) Warning message if " | " \"warning\" : <warning>, (string) Warning message if " | ||||
"wallet was not loaded cleanly.\n" | "wallet was not loaded cleanly.\n" | ||||
"}\n" | "}\n" | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 1) { | ||||
"unloadwallet", | "unloadwallet", | ||||
"Unloads the wallet referenced by the request endpoint " | "Unloads the wallet referenced by the request endpoint " | ||||
"otherwise unloads the wallet specified in the argument.\n" | "otherwise unloads the wallet specified in the argument.\n" | ||||
"Specifying the wallet name on a wallet endpoint is invalid.", | "Specifying the wallet name on a wallet endpoint is invalid.", | ||||
{ | { | ||||
{"wallet_name", RPCArg::Type::STR, /* opt */ true, | {"wallet_name", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", "The name of the wallet to unload."}, | /* default_val */ "", "The name of the wallet to unload."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" + HelpExampleCli("unloadwallet", "wallet_name") + | "\nExamples:\n" + HelpExampleCli("unloadwallet", "wallet_name") + | ||||
HelpExampleRpc("unloadwallet", "wallet_name")); | HelpExampleRpc("unloadwallet", "wallet_name")); | ||||
} | } | ||||
std::string wallet_name; | std::string wallet_name; | ||||
if (GetWalletNameFromJSONRPCRequest(request, wallet_name)) { | if (GetWalletNameFromJSONRPCRequest(request, wallet_name)) { | ||||
if (!request.params[0].isNull()) { | if (!request.params[0].isNull()) { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, | throw JSONRPCError(RPC_INVALID_PARAMETER, | ||||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 5) { | ||||
"Maximum number of UTXOs"}, | "Maximum number of UTXOs"}, | ||||
{"minimumSumAmount", RPCArg::Type::AMOUNT, | {"minimumSumAmount", RPCArg::Type::AMOUNT, | ||||
/* opt */ true, /* default_val */ "unlimited", | /* opt */ true, /* default_val */ "unlimited", | ||||
"Minimum sum value of all UTXOs in " + CURRENCY_UNIT + | "Minimum sum value of all UTXOs in " + CURRENCY_UNIT + | ||||
""}, | ""}, | ||||
}, | }, | ||||
"query_options"}, | "query_options"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult\n" | "\nResult\n" | ||||
"[ (array of json object)\n" | "[ (array of json object)\n" | ||||
" {\n" | " {\n" | ||||
" \"txid\" : \"txid\", (string) the transaction id \n" | " \"txid\" : \"txid\", (string) the transaction id \n" | ||||
" \"vout\" : n, (numeric) the vout value\n" | " \"vout\" : n, (numeric) the vout value\n" | ||||
" \"address\" : \"address\", (string) the bitcoin address\n" | " \"address\" : \"address\", (string) the bitcoin address\n" | ||||
" \"label\" : \"label\", (string) The associated label, " | " \"label\" : \"label\", (string) The associated label, " | ||||
"or \"\" for the default label\n" | "or \"\" for the default label\n" | ||||
▲ Show 20 Lines • Show All 361 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
/* opt */ true, /* default_val */ "", | /* opt */ true, /* default_val */ "", | ||||
"The zero-based output index, before a " | "The zero-based output index, before a " | ||||
"change output is added."}, | "change output is added."}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
"options"}, | "options"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"hex\": \"value\", (string) The resulting raw " | " \"hex\": \"value\", (string) The resulting raw " | ||||
"transaction (hex-encoded string)\n" | "transaction (hex-encoded string)\n" | ||||
" \"fee\": n, (numeric) Fee in " + | " \"fee\": n, (numeric) Fee in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
" the resulting transaction pays\n" | " the resulting transaction pays\n" | ||||
" \"changepos\": n (numeric) The position of the added " | " \"changepos\": n (numeric) The position of the added " | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
"The signature hash type. Must be one of\n" | "The signature hash type. Must be one of\n" | ||||
" \"ALL|FORKID\"\n" | " \"ALL|FORKID\"\n" | ||||
" \"NONE|FORKID\"\n" | " \"NONE|FORKID\"\n" | ||||
" \"SINGLE|FORKID\"\n" | " \"SINGLE|FORKID\"\n" | ||||
" \"ALL|FORKID|ANYONECANPAY\"\n" | " \"ALL|FORKID|ANYONECANPAY\"\n" | ||||
" \"NONE|FORKID|ANYONECANPAY\"\n" | " \"NONE|FORKID|ANYONECANPAY\"\n" | ||||
" \"SINGLE|FORKID|ANYONECANPAY\""}, | " \"SINGLE|FORKID|ANYONECANPAY\""}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"hex\" : \"value\", (string) The hex-encoded " | " \"hex\" : \"value\", (string) The hex-encoded " | ||||
"raw transaction with signature(s)\n" | "raw transaction with signature(s)\n" | ||||
" \"complete\" : true|false, (boolean) If the " | " \"complete\" : true|false, (boolean) If the " | ||||
"transaction has a complete set of signatures\n" | "transaction has a complete set of signatures\n" | ||||
" \"errors\" : [ (json array of objects) " | " \"errors\" : [ (json array of objects) " | ||||
"Script verification errors (if there are any)\n" | "Script verification errors (if there are any)\n" | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
{ | { | ||||
{"nblocks", RPCArg::Type::NUM, /* opt */ false, | {"nblocks", RPCArg::Type::NUM, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"How many blocks are generated immediately."}, | "How many blocks are generated immediately."}, | ||||
{"maxtries", RPCArg::Type::NUM, /* opt */ true, | {"maxtries", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"How many iterations to try (default = 1000000)."}, | "How many iterations to try (default = 1000000)."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"[ blockhashes ] (array) hashes of blocks generated\n" | "[ blockhashes ] (array) hashes of blocks generated\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nGenerate 11 blocks\n" + | "\nGenerate 11 blocks\n" + | ||||
HelpExampleCli("generate", "11")); | HelpExampleCli("generate", "11")); | ||||
} | } | ||||
int num_generate = request.params[0].get_int(); | int num_generate = request.params[0].get_int(); | ||||
Show All 37 Lines | if (request.fHelp || request.params.size() > 2) { | ||||
{ | { | ||||
{"start_height", RPCArg::Type::NUM, /* opt */ true, | {"start_height", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"block height where the rescan should start"}, | "block height where the rescan should start"}, | ||||
{"stop_height", RPCArg::Type::NUM, /* opt */ true, | {"stop_height", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"the last block height that should be scanned"}, | "the last block height that should be scanned"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"start_height\" (numeric) The block height where the " | " \"start_height\" (numeric) The block height where the " | ||||
"rescan has started. If omitted, rescan started from the genesis " | "rescan has started. If omitted, rescan started from the genesis " | ||||
"block.\n" | "block.\n" | ||||
" \"stop_height\" (numeric) The height of the last rescanned " | " \"stop_height\" (numeric) The height of the last rescanned " | ||||
"block. If omitted, rescan stopped at the chain tip.\n" | "block. If omitted, rescan stopped at the chain tip.\n" | ||||
"}\n" | "}\n" | ||||
▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
"\nReturn information about the given bitcoin address. " | "\nReturn information about the given bitcoin address. " | ||||
"Some information requires the address\n" | "Some information requires the address\n" | ||||
"to be in the wallet.\n", | "to be in the wallet.\n", | ||||
{ | { | ||||
{"address", RPCArg::Type::STR, /* opt */ false, | {"address", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The bitcoin address to get the information of."}, | "The bitcoin address to get the information of."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"address\" : \"address\", (string) The bitcoin address " | " \"address\" : \"address\", (string) The bitcoin address " | ||||
"validated\n" | "validated\n" | ||||
" \"scriptPubKey\" : \"hex\", (string) The hex-encoded " | " \"scriptPubKey\" : \"hex\", (string) The hex-encoded " | ||||
"scriptPubKey generated by the address\n" | "scriptPubKey generated by the address\n" | ||||
" \"ismine\" : true|false, (boolean) If the address is " | " \"ismine\" : true|false, (boolean) If the address is " | ||||
"yours or not\n" | "yours or not\n" | ||||
▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
RPCHelpMan{"getaddressesbylabel", | RPCHelpMan{"getaddressesbylabel", | ||||
"\nReturns the list of addresses assigned the specified " | "\nReturns the list of addresses assigned the specified " | ||||
"label.\n", | "label.\n", | ||||
{ | { | ||||
{"label", RPCArg::Type::STR, /* opt */ false, | {"label", RPCArg::Type::STR, /* opt */ false, | ||||
/* default_val */ "", "The label."}, | /* default_val */ "", "The label."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{ (json object with addresses as keys)\n" | "{ (json object with addresses as keys)\n" | ||||
" \"address\": { (json object with information about address)\n" | " \"address\": { (json object with information about address)\n" | ||||
" \"purpose\": \"string\" (string) Purpose of address " | " \"purpose\": \"string\" (string) Purpose of address " | ||||
"(\"send\" for sending address, \"receive\" for receiving " | "(\"send\" for sending address, \"receive\" for receiving " | ||||
"address)\n" | "address)\n" | ||||
" },...\n" | " },...\n" | ||||
"}\n" | "}\n" | ||||
Show All 38 Lines | if (request.fHelp || request.params.size() > 1) { | ||||
"assigned to addresses with a specific purpose.\n", | "assigned to addresses with a specific purpose.\n", | ||||
{ | { | ||||
{"purpose", RPCArg::Type::STR, /* opt */ true, | {"purpose", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"Address purpose to list labels for " | "Address purpose to list labels for " | ||||
"('send','receive'). An empty string is the same " | "('send','receive'). An empty string is the same " | ||||
"as not providing this argument."}, | "as not providing this argument."}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"[ (json array of string)\n" | "[ (json array of string)\n" | ||||
" \"label\", (string) Label name\n" | " \"label\", (string) Label name\n" | ||||
" ...\n" | " ...\n" | ||||
"]\n" | "]\n" | ||||
"\nExamples:\n" | "\nExamples:\n" | ||||
"\nList all labels\n" + | "\nList all labels\n" + | ||||
HelpExampleCli("listlabels", "") + | HelpExampleCli("listlabels", "") + | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 2) { | ||||
{"seed", RPCArg::Type::STR, /* opt */ true, | {"seed", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "", | ||||
"The WIF private key to use as the new HD seed; if not " | "The WIF private key to use as the new HD seed; if not " | ||||
"provided a random seed will be used.\n" | "provided a random seed will be used.\n" | ||||
" The seed value can be " | " The seed value can be " | ||||
"retrieved using the dumpwallet command. It is the " | "retrieved using the dumpwallet command. It is the " | ||||
"private key marked hdseed=1"}, | "private key marked hdseed=1"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nExamples:\n" + HelpExampleCli("sethdseed", "") + | "\nExamples:\n" + HelpExampleCli("sethdseed", "") + | ||||
HelpExampleCli("sethdseed", "false") + | HelpExampleCli("sethdseed", "false") + | ||||
HelpExampleCli("sethdseed", "true \"wifkey\"") + | HelpExampleCli("sethdseed", "true \"wifkey\"") + | ||||
HelpExampleRpc("sethdseed", "true, \"wifkey\"")); | HelpExampleRpc("sethdseed", "true, \"wifkey\"")); | ||||
} | } | ||||
if (IsInitialBlockDownload()) { | if (IsInitialBlockDownload()) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 1 || | ||||
" \"ALL|FORKID|ANYONECANPAY\"\n" | " \"ALL|FORKID|ANYONECANPAY\"\n" | ||||
" \"NONE|FORKID|ANYONECANPAY\"\n" | " \"NONE|FORKID|ANYONECANPAY\"\n" | ||||
" \"SINGLE|FORKID|ANYONECANPAY\""}, | " \"SINGLE|FORKID|ANYONECANPAY\""}, | ||||
{"bip32derivs", RPCArg::Type::BOOL, /* opt */ true, | {"bip32derivs", RPCArg::Type::BOOL, /* opt */ true, | ||||
/* default_val */ "false", | /* default_val */ "false", | ||||
"If true, includes the BIP 32 derivation paths for public " | "If true, includes the BIP 32 derivation paths for public " | ||||
"keys if we know them"}, | "keys if we know them"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"psbt\" : \"value\", (string) The base64-encoded " | " \"psbt\" : \"value\", (string) The base64-encoded " | ||||
"partially signed transaction\n" | "partially signed transaction\n" | ||||
" \"complete\" : true|false, (boolean) If the transaction has a " | " \"complete\" : true|false, (boolean) If the transaction has a " | ||||
"complete set of signatures\n" | "complete set of signatures\n" | ||||
" ]\n" | " ]\n" | ||||
"}\n" | "}\n" | ||||
▲ Show 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 2 || | ||||
}, | }, | ||||
}, | }, | ||||
"options"}, | "options"}, | ||||
{"bip32derivs", RPCArg::Type::BOOL, /* opt */ true, | {"bip32derivs", RPCArg::Type::BOOL, /* opt */ true, | ||||
/* default_val */ "false", | /* default_val */ "false", | ||||
"If true, includes the BIP 32 derivation paths for public " | "If true, includes the BIP 32 derivation paths for public " | ||||
"keys if we know them"}, | "keys if we know them"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"psbt\": \"value\", (string) The resulting raw " | " \"psbt\": \"value\", (string) The resulting raw " | ||||
"transaction (base64-encoded string)\n" | "transaction (base64-encoded string)\n" | ||||
" \"fee\": n, (numeric) Fee in " + | " \"fee\": n, (numeric) Fee in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
" the resulting transaction pays\n" | " the resulting transaction pays\n" | ||||
" \"changepos\": n (numeric) The position of the added " | " \"changepos\": n (numeric) The position of the added " | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |