rippled
Loading...
Searching...
No Matches
delegate.h
1#pragma once
2
3#include <test/jtx/Account.h>
4#include <test/jtx/Env.h>
5
6namespace ripple {
7namespace test {
8namespace jtx {
9
10namespace delegate {
11
13set(jtx::Account const& account,
14 jtx::Account const& authorize,
15 std::vector<std::string> const& permissions);
16
18entry(
19 jtx::Env& env,
20 jtx::Account const& account,
21 jtx::Account const& authorize);
22
23struct as
24{
25private:
27
28public:
29 explicit as(jtx::Account const& account) : delegate_(account)
30 {
31 }
32
33 void
35 {
36 jtx.jv[sfDelegate.jsonName] = delegate_.human();
37 }
38};
39
40} // namespace delegate
41} // namespace jtx
42} // namespace test
43} // namespace ripple
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition Account.h:20
std::string const & human() const
Returns the human readable public key.
Definition Account.h:99
A transaction testing environment.
Definition Env.h:102
Json::Value entry(jtx::Env &env, jtx::Account const &account, jtx::Account const &authorize)
Definition delegate.cpp:36
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
bool set(T &target, std::string const &name, Section const &section)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
Execution context for applying a JSON transaction.
Definition JTx.h:26
Json::Value jv
Definition JTx.h:27
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition delegate.h:34
as(jtx::Account const &account)
Definition delegate.h:29