rippled
Loading...
Searching...
No Matches
AbstractClient.h
1#pragma once
2
3#include <xrpl/json/json_value.h>
4
5namespace xrpl {
6namespace test {
7
8/* Abstract Ripple Client interface.
9
10 This abstracts the transport layer, allowing
11 commands to be submitted to a rippled server.
12*/
14{
15public:
16 virtual ~AbstractClient() = default;
17 AbstractClient() = default;
20 operator=(AbstractClient const&) = delete;
21
33 virtual Json::Value
34 invoke(std::string const& cmd, Json::Value const& params = {}) = 0;
35
37 virtual unsigned
38 version() const = 0;
39};
40
41} // namespace test
42} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
AbstractClient(AbstractClient const &)=delete
virtual ~AbstractClient()=default
AbstractClient & operator=(AbstractClient const &)=delete
virtual unsigned version() const =0
Get RPC 1.0 or RPC 2.0.
virtual Json::Value invoke(std::string const &cmd, Json::Value const &params={})=0
Submit a command synchronously.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5