rippled
Loading...
Searching...
No Matches
did.h
1#pragma once
2
3#include <test/jtx/Account.h>
4#include <test/jtx/Env.h>
5#include <test/jtx/owners.h>
6
7namespace xrpl {
8namespace test {
9namespace jtx {
10
12namespace did {
13
15set(jtx::Account const& account);
16
18setValid(jtx::Account const& account);
19
22{
23private:
25
26public:
27 explicit document(std::string const& u) : document_(strHex(u))
28 {
29 }
30
31 void
33 {
34 jtx.jv[sfDIDDocument.jsonName] = document_;
35 }
36};
37
39class uri
40{
41private:
43
44public:
45 explicit uri(std::string const& u) : uri_(strHex(u))
46 {
47 }
48
49 void
51 {
52 jtx.jv[sfURI.jsonName] = uri_;
53 }
54};
55
57class data
58{
59private:
61
62public:
63 explicit data(std::string const& u) : data_(strHex(u))
64 {
65 }
66
67 void
69 {
70 jtx.jv[sfData.jsonName] = data_;
71 }
72};
73
75del(jtx::Account const& account);
76
77} // namespace did
78
79} // namespace jtx
80
81} // namespace test
82} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition Account.h:19
A transaction testing environment.
Definition Env.h:119
Sets the optional Attestation on a DIDSet.
Definition did.h:58
data(std::string const &u)
Definition did.h:63
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition did.h:68
std::string data_
Definition did.h:60
Sets the optional DIDDocument on a DIDSet.
Definition did.h:22
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition did.h:32
document(std::string const &u)
Definition did.h:27
Sets the optional URI on a DIDSet.
Definition did.h:40
uri(std::string const &u)
Definition did.h:45
std::string uri_
Definition did.h:42
void operator()(jtx::Env &, jtx::JTx &jtx) const
Definition did.h:50
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:5
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:10
Execution context for applying a JSON transaction.
Definition JTx.h:25
Json::Value jv
Definition JTx.h:26