diff --git a/contracts/contracts/coordination/Coordinator.sol b/contracts/contracts/coordination/Coordinator.sol index 9be31fb9..9576d4d6 100644 --- a/contracts/contracts/coordination/Coordinator.sol +++ b/contracts/contracts/coordination/Coordinator.sol @@ -549,6 +549,16 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable return found; } + function isEncryptionAuthorized( + uint32 ritualId, + bytes memory evidence, + bytes memory ciphertextHeader + ) external view returns (bool) { + Ritual storage ritual = rituals[ritualId]; + require(getRitualState(ritual) == RitualState.ACTIVE, "Ritual not active"); + return ritual.accessController.isAuthorized(ritualId, evidence, ciphertextHeader); + } + function processReimbursement(uint256 initialGasLeft) internal { if (address(reimbursementPool) != address(0)) { uint256 gasUsed = initialGasLeft - gasleft();