xrpld
Loading...
Searching...
No Matches
delegate.h
1#pragma once
2
3#include <test/jtx/Account.h>
4#include <test/jtx/Env.h>
5#include <test/jtx/JTx.h>
6
7#include <xrpl/json/json_value.h>
8#include <xrpl/protocol/SField.h>
9
10#include <string>
11#include <utility>
12#include <vector>
13
15
17set(jtx::Account const& account,
18 jtx::Account const& authorize,
19 std::vector<std::string> const& permissions);
20
22entry(jtx::Env& env, jtx::Account const& account, jtx::Account const& authorize);
23
24struct As
25{
26private:
28
29public:
30 explicit As(jtx::Account account) : delegate_(std::move(account))
31 {
32 }
33
34 void
36 {
37 jtx.jv[sfDelegate.jsonName] = delegate_.human();
38 }
39};
40
41} // namespace xrpl::test::jtx::delegate
Represents a JSON value.
Definition json_value.h:117
Immutable cryptographic account descriptor.
Definition jtx/Account.h:21
A transaction testing environment.
Definition Env.h:161
STL namespace.
json::Value entry(jtx::Env &env, jtx::Account const &account, jtx::Account const &authorize)
Definition delegate.cpp:41
json::Value set(jtx::Account const &account, jtx::Account const &authorize, std::vector< std::string > const &permissions)
Definition delegate.cpp:17
Execution context for applying a JSON transaction.
Definition JTx.h:27
As(jtx::Account account)
Definition delegate.h:30
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition delegate.h:35