![]() |
Bitcoin ABC 0.32.4
P2P Digital Currency
|
#include <rpc/util.h>#include <clientversion.h>#include <common/args.h>#include <consensus/amount.h>#include <key_io.h>#include <script/descriptor.h>#include <script/signingprovider.h>#include <tinyformat.h>#include <util/check.h>#include <util/strencodings.h>#include <util/string.h>#include <util/translation.h>#include <algorithm>#include <iterator>#include <string_view>#include <tuple>#include <variant>Go to the source code of this file.
Classes | |
| class | DescribeAddressVisitor |
| struct | Section |
| A pair of strings that can be aligned (through padding) with other Sections later on. More... | |
| struct | Sections |
| Keeps track of RPCArgs by transforming them into sections for the purpose of serializing everything to a single string. More... | |
Macros | |
| #define | TMPL_INST(check_param, ret_type, return_code) |
Typedefs | |
| using | CheckFn = void(const RPCArg &) |
Functions | |
| void | RPCTypeCheckObj (const UniValue &o, const std::map< std::string, UniValueType > &typesExpected, bool fAllowNull, bool fStrict) |
| Check for expected keys/value types in an Object. More... | |
| Amount | AmountFromValue (const UniValue &value) |
| uint256 | ParseHashV (const UniValue &v, std::string strName) |
| Utilities: convert hex-encoded values (throws error if not hex). More... | |
| uint256 | ParseHashO (const UniValue &o, std::string strKey) |
| std::vector< uint8_t > | ParseHexV (const UniValue &v, std::string strName) |
| std::vector< uint8_t > | ParseHexO (const UniValue &o, std::string strKey) |
| std::string | HelpExampleCli (const std::string &methodname, const std::string &args) |
| std::string | HelpExampleCliNamed (const std::string &methodname, const RPCArgList &args) |
| std::string | HelpExampleRpc (const std::string &methodname, const std::string &args) |
| std::string | HelpExampleRpcNamed (const std::string &methodname, const RPCArgList &args) |
| CPubKey | HexToPubKey (const std::string &hex_in) |
| CPubKey | AddrToPubKey (const CChainParams &chainparams, const FillableSigningProvider &keystore, const std::string &addr_in) |
| CTxDestination | AddAndGetMultisigDestination (const int required, const std::vector< CPubKey > &pubkeys, OutputType type, FillableSigningProvider &keystore, CScript &script_out) |
| UniValue | DescribeAddress (const CTxDestination &dest) |
| std::string | GetAllOutputTypes () |
| RPCErrorCode | RPCErrorFromTransactionError (TransactionError terr) |
| UniValue | JSONRPCTransactionError (TransactionError terr, const std::string &err_string) |
| static const UniValue * | DetailMaybeArg (CheckFn *check, const std::vector< RPCArg > ¶ms, const JSONRPCRequest *req, size_t i) |
| static void | CheckRequiredOrDefault (const RPCArg ¶m) |
| TMPL_INST (nullptr, std::optional< double >, maybe_arg ? std::optional{maybe_arg->get_real()} :std::nullopt;) | |
| TMPL_INST (nullptr, std::optional< bool >, maybe_arg ? std::optional{maybe_arg->get_bool()} :std::nullopt;) | |
| TMPL_INST (nullptr, const std::string *, maybe_arg ? &maybe_arg->get_str() :nullptr;) | |
| TMPL_INST (CheckRequiredOrDefault, bool, CHECK_NONFATAL(maybe_arg) ->get_bool();) | |
| TMPL_INST (CheckRequiredOrDefault, int, CHECK_NONFATAL(maybe_arg) ->getInt< int >();) | |
| TMPL_INST (CheckRequiredOrDefault, uint64_t, CHECK_NONFATAL(maybe_arg) ->getInt< uint64_t >();) | |
| TMPL_INST (CheckRequiredOrDefault, const std::string &, CHECK_NONFATAL(maybe_arg) ->get_str();) | |
| static std::optional< UniValue::VType > | ExpectedType (RPCArg::Type type) |
| static std::optional< UniValue::VType > | ExpectedType (RPCResult::Type type) |
| static std::pair< int64_t, int64_t > | ParseRange (const UniValue &value) |
| std::pair< int64_t, int64_t > | ParseDescriptorRange (const UniValue &value) |
| Parse a JSON range specified as int64, or [int64, int64]. More... | |
| std::vector< CScript > | EvalDescriptorStringOrObject (const UniValue &scanobject, FlatSigningProvider &provider) |
| Evaluate a descriptor given as a string, or as a {"desc":...,"range":...} object, with default range of 1000. More... | |
| UniValue | GetServicesNames (ServiceFlags services) |
| Returns, given services flags, a list of humanly readable (known) network services. More... | |
Variables | |
| const std::string | UNIX_EPOCH_TIME = "UNIX epoch time" |
| String used to describe UNIX epoch time in documentation, factored out to a constant for consistency. More... | |
| const std::string | EXAMPLE_ADDRESS |
| Example CashAddr address used in multiple RPCExamples. More... | |
| #define TMPL_INST | ( | check_param, | |
| ret_type, | |||
| return_code | |||
| ) |
| CTxDestination AddAndGetMultisigDestination | ( | const int | required, |
| const std::vector< CPubKey > & | pubkeys, | ||
| OutputType | type, | ||
| FillableSigningProvider & | keystore, | ||
| CScript & | script_out | ||
| ) |
| CPubKey AddrToPubKey | ( | const CChainParams & | chainparams, |
| const FillableSigningProvider & | keystore, | ||
| const std::string & | addr_in | ||
| ) |
|
static |
| UniValue DescribeAddress | ( | const CTxDestination & | dest | ) |
|
static |
| std::vector< CScript > EvalDescriptorStringOrObject | ( | const UniValue & | scanobject, |
| FlatSigningProvider & | provider | ||
| ) |
|
static |
|
static |
| std::string GetAllOutputTypes | ( | ) |
| UniValue GetServicesNames | ( | ServiceFlags | services | ) |
| std::string HelpExampleCli | ( | const std::string & | methodname, |
| const std::string & | args | ||
| ) |
| std::string HelpExampleCliNamed | ( | const std::string & | methodname, |
| const RPCArgList & | args | ||
| ) |
| std::string HelpExampleRpc | ( | const std::string & | methodname, |
| const std::string & | args | ||
| ) |
| std::string HelpExampleRpcNamed | ( | const std::string & | methodname, |
| const RPCArgList & | args | ||
| ) |
| CPubKey HexToPubKey | ( | const std::string & | hex_in | ) |
| UniValue JSONRPCTransactionError | ( | TransactionError | terr, |
| const std::string & | err_string | ||
| ) |
| std::pair< int64_t, int64_t > ParseDescriptorRange | ( | const UniValue & | value | ) |
| std::vector< uint8_t > ParseHexO | ( | const UniValue & | o, |
| std::string | strKey | ||
| ) |
| std::vector< uint8_t > ParseHexV | ( | const UniValue & | v, |
| std::string | strName | ||
| ) |
|
static |
| RPCErrorCode RPCErrorFromTransactionError | ( | TransactionError | terr | ) |
| void RPCTypeCheckObj | ( | const UniValue & | o, |
| const std::map< std::string, UniValueType > & | typesExpected, | ||
| bool | fAllowNull, | ||
| bool | fStrict | ||
| ) |
| TMPL_INST | ( | CheckRequiredOrDefault | , |
| bool | , | ||
| CHECK_NONFATAL(maybe_arg) ->get_bool(); | |||
| ) |
| TMPL_INST | ( | CheckRequiredOrDefault | , |
| const std::string & | , | ||
| CHECK_NONFATAL(maybe_arg) ->get_str(); | |||
| ) |
| TMPL_INST | ( | CheckRequiredOrDefault | , |
| int | , | ||
| CHECK_NONFATAL(maybe_arg) ->getInt< int >(); | |||
| ) |
| TMPL_INST | ( | CheckRequiredOrDefault | , |
| uint64_t | , | ||
| CHECK_NONFATAL(maybe_arg) ->getInt< uint64_t >(); | |||
| ) |
| TMPL_INST | ( | nullptr | , |
| const std::string * | , | ||
| maybe_arg ? &maybe_arg->get_str() :nullptr; | |||
| ) |
| TMPL_INST | ( | nullptr | , |
| std::optional< bool > | , | ||
| maybe_arg ? std::optional{maybe_arg->get_bool()} :std::nullopt; | |||
| ) |
| TMPL_INST | ( | nullptr | , |
| std::optional< double > | , | ||
| maybe_arg ? std::optional{maybe_arg->get_real()} :std::nullopt; | |||
| ) |
| const std::string EXAMPLE_ADDRESS |
Example CashAddr address used in multiple RPCExamples.