exposes new coordinator views for getParticipantProviders and isProviderParticipating

remotes/origin/v7.4.x
Kieran Prasch 2024-01-26 03:13:03 +01:00 committed by Derek Pierre
parent 9405a35b31
commit 5e834c6330
1 changed files with 14 additions and 0 deletions

View File

@ -797,6 +797,11 @@ class CoordinatorAgent(EthereumContractAgent):
participants.append(participant)
return participants
@contract_api(CONTRACT_CALL)
def get_participant_providers(self, ritual_id: int) -> List[ChecksumAddress]:
result = self.contract.functions.getParticipantProviders(ritual_id).call()
return result
@contract_api(CONTRACT_CALL)
def get_provider_public_key(
self, provider: ChecksumAddress, ritual_id: int
@ -827,6 +832,15 @@ class CoordinatorAgent(EthereumContractAgent):
)
return participant
@contract_api(CONTRACT_CALL)
def is_provider_participating(
self, ritual_id: int, provider: ChecksumAddress
) -> bool:
result = self.contract.functions.isProviderParticipating(
ritual_id, provider
).call()
return result
@contract_api(CONTRACT_CALL)
def is_encryption_authorized(
self, ritual_id: int, evidence: bytes, ciphertext_header: bytes