rippled
Loading...
Searching...
No Matches
deposit.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
11namespace deposit {
12
15auth(Account const& account, Account const& auth);
16
19unauth(Account const& account, Account const& unauth);
20
22{
25
26 auto
27 operator<=>(AuthorizeCredentials const&) const = default;
28
30 toJson() const
31 {
32 Json::Value jv;
33 jv[jss::Issuer] = issuer.human();
34 jv[sfCredentialType.jsonName] = strHex(credType);
35 return jv;
36 }
37
38 // "ledger_entry" uses a different naming convention
40 toLEJson() const
41 {
42 Json::Value jv;
43 jv[jss::issuer] = issuer.human();
44 jv[jss::credential_type] = strHex(credType);
45 return jv;
46 }
47};
48
51
54
55} // namespace deposit
56
57} // namespace jtx
58
59} // namespace test
60} // 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
Json::Value authCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:35
Json::Value unauth(Account const &account, Account const &unauth)
Remove pre-authorization for deposit.
Definition deposit.cpp:24
Json::Value unauthCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:53
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::string strHex(FwdIt begin, FwdIt end)
Definition strHex.h:10
auto operator<=>(AuthorizeCredentials const &) const =default