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, jtx::Account const& authorize, std::vector<std::string> const& permissions);
14
16entry(jtx::Env& env, jtx::Account const& account, jtx::Account const& authorize);
17
18struct as
19{
20private:
22
23public:
24 explicit as(jtx::Account const& account) : delegate_(account)
25 {
26 }
27
28 void
30 {
31 jtx.jv[sfDelegate.jsonName] = delegate_.human();
32 }
33};
34
35} // namespace delegate
36} // namespace jtx
37} // namespace test
38} // 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:119
Json::Value entry(jtx::Env &env, jtx::Account const &account, jtx::Account const &authorize)
Definition delegate.cpp:34
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:24
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition delegate.h:29