lbrycrd/src/rpc/util.h

34 lines
1,021 B
C
Raw Normal View History

2018-07-27 00:36:45 +02:00
// Copyright (c) 2017-2018 The Bitcoin Core developers
// 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
#include <pubkey.h>
#include <script/standard.h>
#include <univalue.h>
#include <boost/variant/static_visitor.hpp>
#include <string>
#include <vector>
class CKeyStore;
class CPubKey;
class CScript;
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;
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);
UniValue DescribeAddress(const CTxDestination& dest);
#endif // BITCOIN_RPC_UTIL_H