rippled
Loading...
Searching...
No Matches
permissioned_domains.h
1#ifndef XRPL_TEST_JTX_PERMISSIONED_DOMAINS_H_INCLUDED
2#define XRPL_TEST_JTX_PERMISSIONED_DOMAINS_H_INCLUDED
3
4#include <test/jtx/Account.h>
5#include <test/jtx/Env.h>
6#include <test/jtx/deposit.h>
7
8namespace ripple {
9namespace test {
10namespace jtx {
11namespace pdomain {
12
13// Helpers for PermissionedDomains testing
16
17// helpers
18// Make json for PermissionedDomainSet transaction
20setTx(
21 AccountID const& account,
22 Credentials const& credentials,
24
25// Make json for PermissionedDomainDelete transaction
27deleteTx(AccountID const& account, uint256 const& domain);
28
29// Get PermissionedDomain objects from account_objects rpc call
31getObjects(Account const& account, Env& env, bool withType = true);
32
33// Check if ledger object is there
34bool
35objectExists(uint256 const& objID, Env& env);
36
37// Extract credentials from account_object object
40 Json::Value const& object,
42
43// Sort credentials the same way as PermissionedDomainSet
45sortCredentials(Credentials const& input);
46
47// Get newly created domain from transaction metadata.
50
51} // namespace pdomain
52} // namespace jtx
53} // namespace test
54} // namespace ripple
55
56#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
Set the domain on a JTx.
Definition domain.h:11
T is_same_v
Credentials sortCredentials(Credentials const &input)
Credentials credentialsFromJson(Json::Value const &object, std::unordered_map< std::string, Account > const &human2Acc)
bool objectExists(uint256 const &objID, Env &env)
Json::Value deleteTx(AccountID const &account, uint256 const &domain)
Json::Value setTx(AccountID const &account, Credentials const &credentials, std::optional< uint256 > domain)
std::map< uint256, Json::Value > getObjects(Account const &account, Env &env, bool withType)
uint256 getNewDomain(std::shared_ptr< STObject const > const &meta)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6