forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrpc.h
More file actions
31 lines (23 loc) · 762 Bytes
/
rpc.h
File metadata and controls
31 lines (23 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2025 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_INTERFACES_RPC_H
#define BITCOIN_INTERFACES_RPC_H
#include <memory>
#include <string>
class UniValue;
namespace node {
struct NodeContext;
} // namespace node
namespace interfaces {
//! Interface giving clients ability to emulate HTTP RPC calls.
class Rpc
{
public:
virtual ~Rpc() = default;
virtual UniValue executeRpc(UniValue request, std::string url, std::string user) = 0;
};
//! Return implementation of Rpc interface.
std::unique_ptr<Rpc> MakeRpc(node::NodeContext& node);
} // namespace interfaces
#endif // BITCOIN_INTERFACES_RPC_H