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