Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{"privkey", RPCArg::Type::STR, RPCArg::Optional::NO, | {"privkey", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"The private key (see dumpprivkey)"}, | "The private key (see dumpprivkey)"}, | ||||
{"label", RPCArg::Type::STR, /* default */ | {"label", RPCArg::Type::STR, /* default */ | ||||
"current label if address exists, otherwise \"\"", | "current label if address exists, otherwise \"\"", | ||||
"An optional label"}, | "An optional label"}, | ||||
{"rescan", RPCArg::Type::BOOL, /* default */ "true", | {"rescan", RPCArg::Type::BOOL, /* default */ "true", | ||||
"Rescan the wallet for transactions"}, | "Rescan the wallet for transactions"}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", ""}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nDump a private key\n" + | "\nDump a private key\n" + | ||||
HelpExampleCli("dumpprivkey", "\"myaddress\"") + | HelpExampleCli("dumpprivkey", "\"myaddress\"") + | ||||
"\nImport the private key with rescan\n" + | "\nImport the private key with rescan\n" + | ||||
HelpExampleCli("importprivkey", "\"mykey\"") + | HelpExampleCli("importprivkey", "\"mykey\"") + | ||||
"\nImport using a label and without rescan\n" + | "\nImport using a label and without rescan\n" + | ||||
HelpExampleCli("importprivkey", "\"mykey\" \"testing\" false") + | HelpExampleCli("importprivkey", "\"mykey\" \"testing\" false") + | ||||
"\nImport using default blank label and without rescan\n" + | "\nImport using default blank label and without rescan\n" + | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | UniValue abortrescan(const Config &config, const JSONRPCRequest &request) { | ||||
} | } | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"abortrescan", | "abortrescan", | ||||
"Stops current wallet rescan triggered by an RPC call, e.g. by an " | "Stops current wallet rescan triggered by an RPC call, e.g. by an " | ||||
"importprivkey call.\n" | "importprivkey call.\n" | ||||
"Note: Use \"getwalletinfo\" to query the scanning progress.\n", | "Note: Use \"getwalletinfo\" to query the scanning progress.\n", | ||||
{}, | {}, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::BOOL, "", | ||||
"Whether the abort was successful"}, | |||||
RPCExamples{"\nImport a private key\n" + | RPCExamples{"\nImport a private key\n" + | ||||
HelpExampleCli("importprivkey", "\"mykey\"") + | HelpExampleCli("importprivkey", "\"mykey\"") + | ||||
"\nAbort the running wallet rescan\n" + | "\nAbort the running wallet rescan\n" + | ||||
HelpExampleCli("abortrescan", "") + | HelpExampleCli("abortrescan", "") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("abortrescan", "")}, | HelpExampleRpc("abortrescan", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
Show All 34 Lines | RPCHelpMan{ | ||||
"The Bitcoin address (or hex-encoded script)"}, | "The Bitcoin address (or hex-encoded script)"}, | ||||
{"label", RPCArg::Type::STR, /* default */ "\"\"", | {"label", RPCArg::Type::STR, /* default */ "\"\"", | ||||
"An optional label"}, | "An optional label"}, | ||||
{"rescan", RPCArg::Type::BOOL, /* default */ "true", | {"rescan", RPCArg::Type::BOOL, /* default */ "true", | ||||
"Rescan the wallet for transactions"}, | "Rescan the wallet for transactions"}, | ||||
{"p2sh", RPCArg::Type::BOOL, /* default */ "false", | {"p2sh", RPCArg::Type::BOOL, /* default */ "false", | ||||
"Add the P2SH version of the script as well"}, | "Add the P2SH version of the script as well"}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", ""}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nImport an address with rescan\n" + | "\nImport an address with rescan\n" + | ||||
HelpExampleCli("importaddress", "\"myaddress\"") + | HelpExampleCli("importaddress", "\"myaddress\"") + | ||||
"\nImport using a label without rescan\n" + | "\nImport using a label without rescan\n" + | ||||
HelpExampleCli("importaddress", "\"myaddress\" \"testing\" false") + | HelpExampleCli("importaddress", "\"myaddress\" \"testing\" false") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("importaddress", | HelpExampleRpc("importaddress", | ||||
"\"myaddress\", \"testing\", false")}, | "\"myaddress\", \"testing\", false")}, | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"the blockchain the transaction is included.\n", | "the blockchain the transaction is included.\n", | ||||
{ | { | ||||
{"rawtransaction", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"rawtransaction", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"A raw transaction in hex funding an already-existing address in " | "A raw transaction in hex funding an already-existing address in " | ||||
"wallet"}, | "wallet"}, | ||||
{"txoutproof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"txoutproof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"The hex output from gettxoutproof that contains the transaction"}, | "The hex output from gettxoutproof that contains the transaction"}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", ""}, | ||||
RPCExamples{""}, | RPCExamples{""}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
CMutableTransaction tx; | CMutableTransaction tx; | ||||
if (!DecodeHexTx(tx, request.params[0].get_str())) { | if (!DecodeHexTx(tx, request.params[0].get_str())) { | ||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"removeprunedfunds", | "removeprunedfunds", | ||||
"Deletes the specified transaction from the wallet. Meant for use " | "Deletes the specified transaction from the wallet. Meant for use " | ||||
"with pruned wallets and as a companion to importprunedfunds. This " | "with pruned wallets and as a companion to importprunedfunds. This " | ||||
"will affect wallet balances.\n", | "will affect wallet balances.\n", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"The hex-encoded id of the transaction you are deleting"}, | "The hex-encoded id of the transaction you are deleting"}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", ""}, | ||||
RPCExamples{HelpExampleCli("removeprunedfunds", | RPCExamples{HelpExampleCli("removeprunedfunds", | ||||
"\"a8d0c0184dde994a09ec054286f1ce581bebf4644" | "\"a8d0c0184dde994a09ec054286f1ce581bebf4644" | ||||
"6a512166eae7628734ea0a5\"") + | "6a512166eae7628734ea0a5\"") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("removeprunedfunds", | HelpExampleRpc("removeprunedfunds", | ||||
"\"a8d0c0184dde994a09ec054286f1ce581bebf4644" | "\"a8d0c0184dde994a09ec054286f1ce581bebf4644" | ||||
"6a512166eae7628734ea0a5\"")}, | "6a512166eae7628734ea0a5\"")}, | ||||
} | } | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{ | { | ||||
{"pubkey", RPCArg::Type::STR, RPCArg::Optional::NO, | {"pubkey", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"The hex-encoded public key"}, | "The hex-encoded public key"}, | ||||
{"label", RPCArg::Type::STR, /* default */ "\"\"", | {"label", RPCArg::Type::STR, /* default */ "\"\"", | ||||
"An optional label"}, | "An optional label"}, | ||||
{"rescan", RPCArg::Type::BOOL, /* default */ "true", | {"rescan", RPCArg::Type::BOOL, /* default */ "true", | ||||
"Rescan the wallet for transactions"}, | "Rescan the wallet for transactions"}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", ""}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nImport a public key with rescan\n" + | "\nImport a public key with rescan\n" + | ||||
HelpExampleCli("importpubkey", "\"mypubkey\"") + | HelpExampleCli("importpubkey", "\"mypubkey\"") + | ||||
"\nImport using a label without rescan\n" + | "\nImport using a label without rescan\n" + | ||||
HelpExampleCli("importpubkey", "\"mypubkey\" \"testing\" false") + | HelpExampleCli("importpubkey", "\"mypubkey\" \"testing\" false") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("importpubkey", "\"mypubkey\", \"testing\", false")}, | HelpExampleRpc("importpubkey", "\"mypubkey\", \"testing\", false")}, | ||||
} | } | ||||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"importwallet", | "importwallet", | ||||
"Imports keys from a wallet dump file (see dumpwallet). Requires a " | "Imports keys from a wallet dump file (see dumpwallet). Requires a " | ||||
"new wallet backup to include imported keys.\n" | "new wallet backup to include imported keys.\n" | ||||
"Note: Use \"getwalletinfo\" to query the scanning progress.\n", | "Note: Use \"getwalletinfo\" to query the scanning progress.\n", | ||||
{ | { | ||||
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, | {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"The wallet file"}, | "The wallet file"}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", ""}, | ||||
RPCExamples{"\nDump the wallet\n" + | RPCExamples{"\nDump the wallet\n" + | ||||
HelpExampleCli("dumpwallet", "\"test\"") + | HelpExampleCli("dumpwallet", "\"test\"") + | ||||
"\nImport the wallet\n" + | "\nImport the wallet\n" + | ||||
HelpExampleCli("importwallet", "\"test\"") + | HelpExampleCli("importwallet", "\"test\"") + | ||||
"\nImport using the json rpc call\n" + | "\nImport using the json rpc call\n" + | ||||
HelpExampleRpc("importwallet", "\"test\"")}, | HelpExampleRpc("importwallet", "\"test\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
▲ Show 20 Lines • Show All 1,701 Lines • Show Last 20 Lines |