rippled
Loading...
Searching...
No Matches
deposit.h
1#ifndef XRPL_TEST_JTX_DEPOSIT_H_INCLUDED
2#define XRPL_TEST_JTX_DEPOSIT_H_INCLUDED
3
4#include <test/jtx/Account.h>
5#include <test/jtx/Env.h>
6
7namespace ripple {
8namespace test {
9namespace jtx {
10
12namespace deposit {
13
16auth(Account const& account, Account const& auth);
17
20unauth(Account const& account, Account const& unauth);
21
23{
26
27 auto
28 operator<=>(AuthorizeCredentials const&) const = default;
29
31 toJson() const
32 {
33 Json::Value jv;
34 jv[jss::Issuer] = issuer.human();
35 jv[sfCredentialType.jsonName] = strHex(credType);
36 return jv;
37 }
38
39 // "ledger_entry" uses a different naming convention
41 toLEJson() const
42 {
43 Json::Value jv;
44 jv[jss::issuer] = issuer.human();
45 jv[jss::credential_type] = strHex(credType);
46 return jv;
47 }
48};
49
52 jtx::Account const& account,
54
57 jtx::Account const& account,
59
60} // namespace deposit
61
62} // namespace jtx
63
64} // namespace test
65} // namespace ripple
66
67#endif
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition Account.h:20
std::string const & human() const
Returns the human readable public key.
Definition Account.h:99
Json::Value unauth(Account const &account, Account const &unauth)
Remove preauthorization for deposit.
Definition deposit.cpp:24
Json::Value unauthCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:55
Json::Value authCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:35
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::string strHex(FwdIt begin, FwdIt end)
Definition strHex.h:11
auto operator<=>(AuthorizeCredentials const &) const =default