rippled
Loading...
Searching...
No Matches
did.h
1#ifndef XRPL_TEST_JTX_DID_H_INCLUDED
2#define XRPL_TEST_JTX_DID_H_INCLUDED
3
4#include <test/jtx/Account.h>
5#include <test/jtx/Env.h>
6#include <test/jtx/owners.h>
7
8namespace ripple {
9namespace test {
10namespace jtx {
11
13namespace did {
14
16set(jtx::Account const& account);
17
19setValid(jtx::Account const& account);
20
23{
24private:
26
27public:
28 explicit document(std::string const& u) : document_(strHex(u))
29 {
30 }
31
32 void
34 {
35 jtx.jv[sfDIDDocument.jsonName] = document_;
36 }
37};
38
40class uri
41{
42private:
44
45public:
46 explicit uri(std::string const& u) : uri_(strHex(u))
47 {
48 }
49
50 void
52 {
53 jtx.jv[sfURI.jsonName] = uri_;
54 }
55};
56
58class data
59{
60private:
62
63public:
64 explicit data(std::string const& u) : data_(strHex(u))
65 {
66 }
67
68 void
70 {
71 jtx.jv[sfData.jsonName] = data_;
72 }
73};
74
76del(jtx::Account const& account);
77
78} // namespace did
79
80} // namespace jtx
81
82} // namespace test
83} // namespace ripple
84
85#endif
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition Account.h:20
A transaction testing environment.
Definition Env.h:102
Sets the optional Attestation on a DIDSet.
Definition did.h:59
data(std::string const &u)
Definition did.h:64
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition did.h:69
Sets the optional DIDDocument on a DIDSet.
Definition did.h:23
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition did.h:33
document(std::string const &u)
Definition did.h:28
Sets the optional URI on a DIDSet.
Definition did.h:41
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition did.h:51
uri(std::string const &u)
Definition did.h:46
Json::Value del(jtx::Account const &account)
Definition dids.cpp:33
Json::Value setValid(jtx::Account const &account)
Definition dids.cpp:23
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
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,...
std::string strHex(FwdIt begin, FwdIt end)
Definition strHex.h:11
Execution context for applying a JSON transaction.
Definition JTx.h:26
Json::Value jv
Definition JTx.h:27