Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/util.h
// Copyright (c) 2017-2019 The Bitcoin Core developers | // Copyright (c) 2017-2019 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_RPC_UTIL_H | #ifndef BITCOIN_RPC_UTIL_H | ||||
#define BITCOIN_RPC_UTIL_H | #define BITCOIN_RPC_UTIL_H | ||||
#include <node/transaction.h> | #include <node/transaction.h> | ||||
#include <outputtype.h> | #include <outputtype.h> | ||||
#include <rpc/protocol.h> | #include <rpc/protocol.h> | ||||
#include <rpc/request.h> | #include <rpc/request.h> | ||||
#include <script/script.h> | |||||
#include <script/sign.h> | |||||
#include <script/standard.h> // For CTxDestination | #include <script/standard.h> // For CTxDestination | ||||
#include <univalue.h> | #include <univalue.h> | ||||
#include <util/check.h> | #include <util/check.h> | ||||
#include <boost/variant.hpp> | #include <boost/variant.hpp> | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
RPCErrorCode RPCErrorFromTransactionError(TransactionError terr); | RPCErrorCode RPCErrorFromTransactionError(TransactionError terr); | ||||
UniValue JSONRPCTransactionError(TransactionError terr, | UniValue JSONRPCTransactionError(TransactionError terr, | ||||
const std::string &err_string = ""); | const std::string &err_string = ""); | ||||
//! Parse a JSON range specified as int64, or [int64, int64] | //! Parse a JSON range specified as int64, or [int64, int64] | ||||
std::pair<int64_t, int64_t> ParseDescriptorRange(const UniValue &value); | std::pair<int64_t, int64_t> ParseDescriptorRange(const UniValue &value); | ||||
/** | |||||
* Evaluate a descriptor given as a string, or as a {"desc":...,"range":...} | |||||
* object, with default range of 1000. | |||||
*/ | |||||
std::vector<CScript> | |||||
EvalDescriptorStringOrObject(const UniValue &scanobject, | |||||
FlatSigningProvider &provider); | |||||
struct RPCArg { | struct RPCArg { | ||||
enum class Type { | enum class Type { | ||||
OBJ, | OBJ, | ||||
ARR, | ARR, | ||||
STR, | STR, | ||||
NUM, | NUM, | ||||
BOOL, | BOOL, | ||||
//! Special type where the user must set the keys e.g. to define | //! Special type where the user must set the keys e.g. to define | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |