Bitcoin Core  0.20.99
P2P Digital Currency
Classes | Enumerations | Functions | Variables
rpcdump.cpp File Reference
#include <chain.h>
#include <core_io.h>
#include <interfaces/chain.h>
#include <key_io.h>
#include <merkleblock.h>
#include <rpc/util.h>
#include <script/descriptor.h>
#include <script/script.h>
#include <script/standard.h>
#include <sync.h>
#include <util/bip32.h>
#include <util/system.h>
#include <util/time.h>
#include <util/translation.h>
#include <wallet/rpcwallet.h>
#include <wallet/wallet.h>
#include <stdint.h>
#include <tuple>
#include <boost/algorithm/string.hpp>
#include <univalue.h>
Include dependency graph for rpcdump.cpp:

Go to the source code of this file.

Classes

struct  ImportData
 

Enumerations

enum  ScriptContext { ScriptContext::TOP, ScriptContext::P2SH, ScriptContext::WITNESS_V0 }
 

Functions

static std::string EncodeDumpString (const std::string &str)
 
static std::string DecodeDumpString (const std::string &str)
 
static bool GetWalletAddressesForKey (LegacyScriptPubKeyMan *spk_man, const CWallet *const pwallet, const CKeyID &keyid, std::string &strAddr, std::string &strLabel) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static void RescanWallet (CWallet &wallet, const WalletRescanReserver &reserver, int64_t time_begin=TIMESTAMP_MIN, bool update=true)
 
RPCHelpMan importprivkey ()
 
RPCHelpMan abortrescan ()
 
RPCHelpMan importaddress ()
 
RPCHelpMan importprunedfunds ()
 
RPCHelpMan removeprunedfunds ()
 
RPCHelpMan importpubkey ()
 
RPCHelpMan importwallet ()
 
RPCHelpMan dumpprivkey ()
 
RPCHelpMan dumpwallet ()
 
static std::string RecurseImportData (const CScript &script, ImportData &import_data, const ScriptContext script_ctx)
 
static UniValue ProcessImportLegacy (ImportData &import_data, std::map< CKeyID, CPubKey > &pubkey_map, std::map< CKeyID, CKey > &privkey_map, std::set< CScript > &script_pub_keys, bool &have_solving_data, const UniValue &data, std::vector< CKeyID > &ordered_pubkeys)
 
static UniValue ProcessImportDescriptor (ImportData &import_data, std::map< CKeyID, CPubKey > &pubkey_map, std::map< CKeyID, CKey > &privkey_map, std::set< CScript > &script_pub_keys, bool &have_solving_data, const UniValue &data, std::vector< CKeyID > &ordered_pubkeys)
 
static UniValue ProcessImport (CWallet *const pwallet, const UniValue &data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static int64_t GetImportTimestamp (const UniValue &data, int64_t now)
 
RPCHelpMan importmulti ()
 
static UniValue ProcessDescriptorImport (CWallet *const pwallet, const UniValue &data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
RPCHelpMan importdescriptors ()
 

Variables

static const int64_t TIMESTAMP_MIN = 0
 

Enumeration Type Documentation

◆ ScriptContext

enum ScriptContext
strong
Enumerator
TOP 

Top-level scriptPubKey.

P2SH 

P2SH redeemScript.

WITNESS_V0 

P2WSH witnessScript.

Definition at line 865 of file rpcdump.cpp.

Function Documentation

◆ abortrescan()

RPCHelpMan abortrescan ( )

Definition at line 196 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeDumpString()

static std::string DecodeDumpString ( const std::string &  str)
static

Definition at line 45 of file rpcdump.cpp.

Here is the caller graph for this function:

◆ dumpprivkey()

RPCHelpMan dumpprivkey ( )

Definition at line 669 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpwallet()

RPCHelpMan dumpwallet ( )

Definition at line 716 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EncodeDumpString()

static std::string EncodeDumpString ( const std::string &  str)
static

Definition at line 33 of file rpcdump.cpp.

Here is the caller graph for this function:

◆ GetImportTimestamp()

static int64_t GetImportTimestamp ( const UniValue data,
int64_t  now 
)
static

Definition at line 1248 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletAddressesForKey()

static bool GetWalletAddressesForKey ( LegacyScriptPubKeyMan spk_man,
const CWallet *const  pwallet,
const CKeyID keyid,
std::string &  strAddr,
std::string &  strLabel 
) -> cs_wallet)
static

Definition at line 59 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importaddress()

RPCHelpMan importaddress ( )

Definition at line 224 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importdescriptors()

RPCHelpMan importdescriptors ( )

Definition at line 1589 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importmulti()

RPCHelpMan importmulti ( )

Definition at line 1262 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importprivkey()

RPCHelpMan importprivkey ( )

Definition at line 93 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importprunedfunds()

RPCHelpMan importprunedfunds ( )

Definition at line 326 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importpubkey()

RPCHelpMan importpubkey ( )

Definition at line 424 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importwallet()

RPCHelpMan importwallet ( )

Definition at line 511 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessDescriptorImport()

static UniValue ProcessDescriptorImport ( CWallet *const  pwallet,
const UniValue data,
const int64_t  timestamp 
) -> cs_wallet)
static

Definition at line 1450 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessImport()

static UniValue ProcessImport ( CWallet *const  pwallet,
const UniValue data,
const int64_t  timestamp 
) -> cs_wallet)
static

Definition at line 1172 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessImportDescriptor()

static UniValue ProcessImportDescriptor ( ImportData import_data,
std::map< CKeyID, CPubKey > &  pubkey_map,
std::map< CKeyID, CKey > &  privkey_map,
std::set< CScript > &  script_pub_keys,
bool &  have_solving_data,
const UniValue data,
std::vector< CKeyID > &  ordered_pubkeys 
)
static

Definition at line 1086 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessImportLegacy()

static UniValue ProcessImportLegacy ( ImportData import_data,
std::map< CKeyID, CPubKey > &  pubkey_map,
std::map< CKeyID, CKey > &  privkey_map,
std::set< CScript > &  script_pub_keys,
bool &  have_solving_data,
const UniValue data,
std::vector< CKeyID > &  ordered_pubkeys 
)
static

Definition at line 942 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecurseImportData()

static std::string RecurseImportData ( const CScript script,
ImportData import_data,
const ScriptContext  script_ctx 
)
static

Definition at line 874 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeprunedfunds()

RPCHelpMan removeprunedfunds ( )

Definition at line 385 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RescanWallet()

static void RescanWallet ( CWallet wallet,
const WalletRescanReserver reserver,
int64_t  time_begin = TIMESTAMP_MIN,
bool  update = true 
)
static

Definition at line 83 of file rpcdump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ TIMESTAMP_MIN

const int64_t TIMESTAMP_MIN = 0
static

Definition at line 81 of file rpcdump.cpp.