import { StatusList2021Credential } from '@ew-did-registry/credentials-interface'; import { CredentialResolver, IssuerResolver, RevokerResolver } from '.'; import { VerificationResult } from './models'; import { RegistrySettings } from '@ew-did-registry/did-resolver-interface'; import { providers } from 'ethers'; /** * Provides verification of revocation of EnergyWeb role verifiable credential */ export declare class RevocationVerification { private revokerResolver; private issuerResolver; private verifyProof; private credentialResolver; private vcIssuerVerification; private claimIssuerVerification; private _statusListEntryVerificaiton; constructor(revokerResolver: RevokerResolver, issuerResolver: IssuerResolver, credentialResolver: CredentialResolver, provider: providers.Provider, registrySetting: RegistrySettings, verifyProof: (vc: string, proof_options: string) => Promise); /** * Verifies that status list is issued by revoker specified in role definition * Revoker authorization must be verified by verifiable credential * * ```typescript * const revocationVerification = new RevocationVerification( * revokerResolver, * issuerResolver, * credentialResolver, * provider, * registrySetting, * verifyProof * ); * let credential : StatusList2021Credential; * const role = 'role'; * await revocationVerification.verifyStatusList(credential, role); * ``` * @param role role name * @param statusList credential which contains revocation status of `role` credential */ verifyStatusList(statusList: StatusList2021Credential, role: string): Promise; /** * Verifies that `revoker` is authorized to revoke `role` credential * * ```typescript * const revocationVerification = new RevocationVerification( * revokerResolver, * credentialResolver, * vcIssuerVerification, * claimIssuerVerification, * ); * const revoker = 'did:ethr:ewc:0x...'; * const role = 'role'; * await revocationVerification.verifyRevoker(revoker, role); * ``` * @param revoker DID of revoker * @param role name of the role verifiable credential */ verifyRevoker(revoker: string, role: string): Promise; /** * Checks the revocation status for the given issuer and role * @param issuer issuer DID * @param role namespace * @returns */ checkRevocationStatus(issuer: string, role: string): Promise; }