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
8
9// Helpers for PermissionedDomains testing
12
13// helpers
14// Make json for PermissionedDomainSet transaction
16setTx(
17 AccountID const& account,
19 std::optional<uint256> domain = std::nullopt);
20
21// Make json for PermissionedDomainDelete transaction
23deleteTx(AccountID const& account, uint256 const& domain);
24
25// Get PermissionedDomain objects from account_objects rpc call
27getObjects(Account const& account, Env& env, bool withType = true);
28
29// Check if ledger object is there
30bool
31objectExists(uint256 const& objID, Env& env);
32
33// Extract credentials from account_object object
36 json::Value const& object,
38
39// Sort credentials the same way as PermissionedDomainSet
41sortCredentials(Credentials const& input);
42
43// Get newly created domain from transaction metadata.
46
47} // namespace xrpl::test::jtx::pdomain
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition jtx/Account.h:17
A transaction testing environment.
Definition Env.h:143
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:28
BaseUInt< 256 > uint256
Definition base_uint.h:562