#pragma once #include #include #include #include #include #include namespace xrpl { /** * Check if the delegate account has permission to execute the transaction. * @param delegate The delegate account. * @param tx The transaction that the delegate account intends to execute. * @return tesSUCCESS if the transaction is allowed, terNO_DELEGATE_PERMISSION * if not. */ NotTEC checkTxPermission(SLE::const_ref delegate, STTx const& tx); /** * Load the granular permissions granted to the delegate account for the * specified transaction type * @param delegate The delegate account. * @param type Used to determine which granted granular permissions to load, * based on the transaction type. * @return the granted granular permissions tied to the transaction type. */ std::unordered_set getGranularPermission(SLE::const_ref delegate, TxType const& type); } // namespace xrpl