3#include <xrpl/protocol/Rules.h>
4#include <xrpl/protocol/TER.h>
5#include <xrpl/protocol/TxFormats.h>
27#pragma push_macro("GRANULAR_PERMISSION")
28#undef GRANULAR_PERMISSION
30#define GRANULAR_PERMISSION(name, txType, value, ...) name = (value),
32#include <xrpl/protocol/detail/permissions.macro>
34#undef GRANULAR_PERMISSION
35#pragma pop_macro("GRANULAR_PERMISSION")
105 [[nodiscard]]
static uint32_t
std::unordered_map< std::string, GranularPermissionType > granularPermissionsByName_
static uint32_t txToPermissionType(TxType type)
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
std::unordered_map< TxType, TxDelegationEntry > txDelegationMap_
std::optional< TxType > getGranularTxType(GranularPermissionType gpType) const
bool hasGranularPermissions(TxType txType) const
std::optional< std::reference_wrapper< uint256 const > > getTxFeature(TxType txType) const
std::optional< std::string > getGranularName(GranularPermissionType value) const
Permission(Permission const &)=delete
std::unordered_map< GranularPermissionType, GranularPermissionEntry > granularPermissions_
std::unordered_set< TxType > granularTxTypes_
Permission & operator=(Permission const &)=delete
bool checkGranularSandbox(STTx const &tx, std::unordered_set< GranularPermissionType > const &heldPermissions) const
Verifies a delegated transaction against its granular permission template.
static std::optional< TxType > permissionToTxType(std::uint32_t value)
bool isDelegable(std::uint32_t permissionValue, Rules const &rules) const
std::optional< std::string > getPermissionName(std::uint32_t value) const
static Permission const & getInstance()
Rules controlling protocol behavior.
Defines the fields and their attributes within a STObject.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
TxType
Transaction type identifiers.
GranularPermissionType
We have both transaction type permissions and granular type permissions.
SOTemplate permittedFields
std::uint32_t permittedFlags
GranularPermissionEntry(std::string name, TxType txType, std::uint32_t permittedFlags, std::vector< SOElement > fields)