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 xrpl {
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(jtx::Env& env, jtx::Account const& account, jtx::Account const& authorize);
19
20struct as
21{
22private:
24
25public:
26 explicit as(jtx::Account const& account) : delegate_(account)
27 {
28 }
29
30 void
32 {
33 jtx.jv[sfDelegate.jsonName] = delegate_.human();
34 }
35};
36
37} // namespace delegate
38} // namespace jtx
39} // namespace test
40} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition Account.h:19
std::string const & human() const
Returns the human readable public key.
Definition Account.h:94
A transaction testing environment.
Definition Env.h:122
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:5
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:25
Json::Value jv
Definition JTx.h:26
as(jtx::Account const &account)
Definition delegate.h:26
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition delegate.h:31