rippled
Loading...
Searching...
No Matches
dids.cpp
1#include <test/jtx/did.h>
2
3#include <xrpl/protocol/TxFlags.h>
4#include <xrpl/protocol/jss.h>
5
6namespace ripple {
7namespace test {
8namespace jtx {
9
11namespace did {
12
14set(jtx::Account const& account)
15{
16 Json::Value jv;
17 jv[jss::TransactionType] = jss::DIDSet;
18 jv[jss::Account] = to_string(account.id());
19 return jv;
20}
21
23setValid(jtx::Account const& account)
24{
25 Json::Value jv;
26 jv[jss::TransactionType] = jss::DIDSet;
27 jv[jss::Account] = to_string(account.id());
28 jv[sfURI.jsonName] = strHex(std::string{"uri"});
29 return jv;
30}
31
33del(jtx::Account const& account)
34{
35 Json::Value jv;
36 jv[jss::TransactionType] = jss::DIDDelete;
37 jv[jss::Account] = to_string(account.id());
38 return jv;
39}
40
41} // namespace did
42
43} // namespace jtx
44
45} // namespace test
46} // namespace ripple
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition Account.h:20
Keylet did(AccountID const &account) noexcept
Definition Indexes.cpp:495
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
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611