xrpld
Loading...
Searching...
No Matches
deposit.h
1#pragma once
2
3#include <test/jtx/Account.h>
4#include <test/jtx/Env.h>
5
8
11auth(Account const& account, Account const& auth);
12
15unauth(Account const& account, Account const& unauth);
16
18{
21
22 auto
23 operator<=>(AuthorizeCredentials const&) const = default;
24
25 [[nodiscard]] json::Value
26 toJson() const
27 {
28 json::Value jv;
29 jv[jss::Issuer] = issuer.human();
30 jv[sfCredentialType.jsonName] = strHex(credType);
31 return jv;
32 }
33
34 // "ledger_entry" uses a different naming convention
35 [[nodiscard]] json::Value
36 toLEJson() const
37 {
38 json::Value jv;
39 jv[jss::issuer] = issuer.human();
40 jv[jss::credential_type] = strHex(credType);
41 return jv;
42 }
43};
44
47
50
51} // namespace xrpl::test::jtx::deposit
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition jtx/Account.h:17
Deposit preauthorize operations.
Definition deposit.h:7
json::Value unauthCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:56
json::Value authCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:38
json::Value auth(Account const &account, Account const &auth)
Preauthorize for deposit.
Definition deposit.cpp:16
json::Value unauth(Account const &account, Account const &unauth)
Remove pre-authorization for deposit.
Definition deposit.cpp:27
std::string strHex(FwdIt begin, FwdIt end)
Definition strHex.h:10
auto operator<=>(AuthorizeCredentials const &) const =default