2018-07-27 00:36:45 +02:00
|
|
|
// Copyright (c) 2017-2018 The Bitcoin Core developers
|
2017-09-29 06:21:28 +02:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_RPC_UTIL_H
|
|
|
|
#define BITCOIN_RPC_UTIL_H
|
|
|
|
|
2017-12-04 18:49:20 +01:00
|
|
|
#include <pubkey.h>
|
|
|
|
#include <script/standard.h>
|
|
|
|
#include <univalue.h>
|
|
|
|
|
|
|
|
#include <boost/variant/static_visitor.hpp>
|
|
|
|
|
2017-09-29 06:21:28 +02:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class CKeyStore;
|
|
|
|
class CPubKey;
|
|
|
|
class CScript;
|
2017-05-30 21:55:17 +02:00
|
|
|
struct InitInterfaces;
|
|
|
|
|
|
|
|
//! Pointers to interfaces that need to be accessible from RPC methods. Due to
|
|
|
|
//! limitations of the RPC framework, there's currently no direct way to pass in
|
|
|
|
//! state to RPC method implementations.
|
|
|
|
extern InitInterfaces* g_rpc_interfaces;
|
2017-09-29 06:21:28 +02:00
|
|
|
|
|
|
|
CPubKey HexToPubKey(const std::string& hex_in);
|
|
|
|
CPubKey AddrToPubKey(CKeyStore* const keystore, const std::string& addr_in);
|
|
|
|
CScript CreateMultisigRedeemscript(const int required, const std::vector<CPubKey>& pubkeys);
|
|
|
|
|
2017-12-04 18:49:20 +01:00
|
|
|
UniValue DescribeAddress(const CTxDestination& dest);
|
|
|
|
|
2017-09-29 06:21:28 +02:00
|
|
|
#endif // BITCOIN_RPC_UTIL_H
|