Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Functions | Variables
util.cpp File Reference
#include <wallet/rpc/util.h>
#include <rpc/util.h>
#include <util/any.h>
#include <util/translation.h>
#include <util/url.h>
#include <wallet/context.h>
#include <wallet/wallet.h>
#include <univalue.h>
Include dependency graph for util.cpp:

Go to the source code of this file.

Functions

bool GetAvoidReuseFlag (const CWallet *const pwallet, const UniValue &param)
 
bool ParseIncludeWatchonly (const UniValue &include_watchonly, const CWallet &pwallet)
 Used by RPC commands that have an include_watchonly parameter.
 
bool GetWalletNameFromJSONRPCRequest (const JSONRPCRequest &request, std::string &wallet_name)
 
std::shared_ptr< CWalletGetWalletForJSONRPCRequest (const JSONRPCRequest &request)
 Figures out what wallet, if any, to use for a JSONRPCRequest.
 
void EnsureWalletIsUnlocked (const CWallet *pwallet)
 
WalletContextEnsureWalletContext (const std::any &context)
 
LegacyScriptPubKeyManEnsureLegacyScriptPubKeyMan (CWallet &wallet, bool also_create)
 
std::string LabelFromValue (const UniValue &value)
 
std::tuple< std::shared_ptr< CWallet >, std::vector< bilingual_str > > LoadWalletHelper (WalletContext &context, UniValue load_on_start_param, const std::string wallet_name)
 

Variables

static const std::string WALLET_ENDPOINT_BASE = "/wallet/"
 
const std::string HELP_REQUIRING_PASSPHRASE
 

Function Documentation

◆ EnsureLegacyScriptPubKeyMan()

LegacyScriptPubKeyMan & EnsureLegacyScriptPubKeyMan ( CWallet wallet,
bool  also_create 
)

Definition at line 112 of file util.cpp.

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

◆ EnsureWalletContext()

WalletContext & EnsureWalletContext ( const std::any context)

Definition at line 102 of file util.cpp.

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

◆ EnsureWalletIsUnlocked()

void EnsureWalletIsUnlocked ( const CWallet pwallet)

Definition at line 94 of file util.cpp.

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

◆ GetAvoidReuseFlag()

bool GetAvoidReuseFlag ( const CWallet *const  pwallet,
const UniValue param 
)

Definition at line 21 of file util.cpp.

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

◆ GetWalletForJSONRPCRequest()

std::shared_ptr< CWallet > GetWalletForJSONRPCRequest ( const JSONRPCRequest request)

Figures out what wallet, if any, to use for a JSONRPCRequest.

Parameters
[in]requestJSONRPCRequest that wishes to access a wallet
Returns
NULL if no wallet should be used, or a pointer to the CWallet

Definition at line 63 of file util.cpp.

Here is the call graph for this function:

◆ GetWalletNameFromJSONRPCRequest()

bool GetWalletNameFromJSONRPCRequest ( const JSONRPCRequest request,
std::string &  wallet_name 
)

Definition at line 50 of file util.cpp.

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

◆ LabelFromValue()

std::string LabelFromValue ( const UniValue value)

Definition at line 125 of file util.cpp.

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

◆ LoadWalletHelper()

std::tuple< std::shared_ptr< CWallet >, std::vector< bilingual_str > > LoadWalletHelper ( WalletContext context,
UniValue  load_on_start_param,
const std::string  wallet_name 
)

Definition at line 134 of file util.cpp.

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

◆ ParseIncludeWatchonly()

bool ParseIncludeWatchonly ( const UniValue include_watchonly,
const CWallet pwallet 
)

Used by RPC commands that have an include_watchonly parameter.

We default to true for watchonly wallets if include_watchonly isn't explicitly set.

Definition at line 38 of file util.cpp.

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

Variable Documentation

◆ HELP_REQUIRING_PASSPHRASE

const std::string HELP_REQUIRING_PASSPHRASE
Initial value:
{
"\nRequires wallet passphrase to be set with walletpassphrase call if "
"wallet is encrypted.\n"}

Definition at line 17 of file util.cpp.

◆ WALLET_ENDPOINT_BASE

const std::string WALLET_ENDPOINT_BASE = "/wallet/"
static

Definition at line 16 of file util.cpp.