xrpld
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
7#include <xrpl/basics/base_uint.h>
8#include <xrpl/json/json_value.h>
9#include <xrpl/protocol/AccountID.h>
10#include <xrpl/protocol/STObject.h>
11
12#include <map>
13#include <memory>
14#include <optional>
15#include <string>
16#include <unordered_map>
17#include <vector>
18
20
21// Helpers for PermissionedDomains testing
24
25// helpers
26// Make json for PermissionedDomainSet transaction
28setTx(
29 AccountID const& account,
31 std::optional<uint256> domain = std::nullopt);
32
33// Make json for PermissionedDomainDelete transaction
35deleteTx(AccountID const& account, uint256 const& domain);
36
37// Get PermissionedDomain objects from account_objects rpc call
39getObjects(Account const& account, Env& env, bool withType = true);
40
41// Check if ledger object is there
42bool
43objectExists(uint256 const& objID, Env& env);
44
45// Extract credentials from account_object object
48 json::Value const& object,
50
51// Sort credentials the same way as PermissionedDomainSet
53sortCredentials(Credentials const& input);
54
55// Get newly created domain from transaction metadata.
58
59} // namespace xrpl::test::jtx::pdomain
Represents a JSON value.
Definition json_value.h:117
Immutable cryptographic account descriptor.
Definition jtx/Account.h:21
A transaction testing environment.
Definition Env.h:161
xrpl::test::jtx::deposit::AuthorizeCredentials Credential
std::vector< Credential > Credentials
Credentials credentialsFromJson(json::Value const &object, std::unordered_map< std::string, Account > const &human2Acc)
std::map< uint256, json::Value > getObjects(Account const &account, Env &env, bool withType)
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)
bool objectExists(uint256 const &objID, Env &env)
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:34
BaseUInt< 256 > uint256
Definition base_uint.h:580