1#include <xrpld/app/misc/DelegateUtils.h>
3#include <xrpl/protocol/STArray.h>
12 auto const permissionArray = delegate->getFieldArray(sfPermissions);
15 for (
auto const& permission : permissionArray)
17 auto const permissionValue = permission[sfPermissionValue];
18 if (permissionValue == txPermission)
34 auto const permissionArray = delegate->getFieldArray(sfPermissions);
35 for (
auto const& permission : permissionArray)
37 auto const permissionValue = permission[sfPermissionValue];
38 auto const granularValue =
42 if (type && *type == txType)
43 granularPermissions.
insert(granularValue);
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
static Permission const & getInstance()
TxType getTxnType() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
NotTEC checkTxPermission(std::shared_ptr< SLE const > const &delegate, STTx const &tx)
Check if the delegate account has permission to execute the transaction.
TxType
Transaction type identifiers.
void loadGranularPermission(std::shared_ptr< SLE const > const &delegate, TxType const &type, std::unordered_set< GranularPermissionType > &granularPermissions)
Load the granular permissions granted to the delegate account for the specified transaction type.
GranularPermissionType
We have both transaction type permissions and granular type permissions.
@ terNO_DELEGATE_PERMISSION
TERSubset< CanCvtToNotTEC > NotTEC