Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Lines | UniValue importprunedfunds(const Config &config, | ||||
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request); | std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request); | ||||
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() != 2) { | if (request.fHelp || request.params.size() != 2) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"importprunedfunds\n" | "importprunedfunds \"rawtransaction\" \"txoutproof\"\n" | ||||
"\nImports funds without rescan. Corresponding address or script " | "\nImports funds without rescan. Corresponding address or script " | ||||
"must previously be included in wallet. Aimed towards pruned " | "must previously be included in wallet. Aimed towards pruned " | ||||
"wallets. The end-user is responsible to import additional " | "wallets. The end-user is responsible to import additional " | ||||
"transactions that subsequently spend the imported outputs or " | "transactions that subsequently spend the imported outputs or " | ||||
"rescan after the point in the blockchain the transaction is " | "rescan after the point in the blockchain the transaction is " | ||||
"included.\n" | "included.\n" | ||||
"\nArguments:\n" | "\nArguments:\n" | ||||
"1. \"rawtransaction\" (string, required) A raw transaction in hex " | "1. \"rawtransaction\" (string, required) A raw transaction in hex " | ||||
▲ Show 20 Lines • Show All 984 Lines • ▼ Show 20 Lines | UniValue importmulti(const Config &config, const JSONRPCRequest &mainRequest) { | ||||
CWallet *const pwallet = wallet.get(); | CWallet *const pwallet = wallet.get(); | ||||
if (!EnsureWalletIsAvailable(pwallet, mainRequest.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, mainRequest.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
// clang-format off | // clang-format off | ||||
if (mainRequest.fHelp || mainRequest.params.size() < 1 || mainRequest.params.size() > 2) { | if (mainRequest.fHelp || mainRequest.params.size() < 1 || mainRequest.params.size() > 2) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"importmulti \"requests\" ( \"options\" )\n\n" | "importmulti \"requests\" ( \"options\" )\n" | ||||
"Import 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\n" | ||||
"Arguments:\n" | "Arguments:\n" | ||||
"1. requests (array, required) Data to be imported\n" | "1. requests (array, required) Data to be imported\n" | ||||
" [ (array of json objects)\n" | " [ (array of json objects)\n" | ||||
" {\n" | " {\n" | ||||
" \"scriptPubKey\": \"<script>\" | { \"address\":\"<address>\" }, (string / json, required) Type of scriptPubKey (string for script, json for address)\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" | " \"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" | " 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" | " key will determine how far back blockchain rescans need to begin for missing wallet transactions.\n" | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |