Skip to content

Commit

Permalink
add required method to base, remove unneeded methods from implementat…
Browse files Browse the repository at this point in the history
…ions

Signed-off-by: Jason Sherman <[email protected]>
  • Loading branch information
usingtechnology committed Sep 25, 2023
1 parent 4ef80dd commit e4a6be5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
11 changes: 6 additions & 5 deletions aries_cloudagent/anoncreds/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Base Registry."""
from abc import ABC, abstractmethod
from typing import Generic, Optional, Pattern, Sequence, Tuple, TypeVar
from typing import Generic, Optional, Pattern, Sequence, TypeVar

from ..config.injection_context import InjectionContext
from ..core.error import BaseError
Expand All @@ -11,6 +11,7 @@
GetCredDefResult,
)
from .models.anoncreds_revocation import (
GetRevListResult,
GetRevRegDefResult,
RevRegDef,
RevRegDefResult,
Expand Down Expand Up @@ -130,10 +131,10 @@ async def get_revocation_registry_definition(
"""Get a revocation registry definition from the registry."""

@abstractmethod
async def get_revocation_registry_delta(
self, profile: Profile, rev_reg_def_id: str, timestamp: None
) -> Tuple[dict, int]:
"""Get a revocation registry delta."""
async def get_revocation_list(
self, profile: Profile, revocation_registry_id: str, timestamp: int
) -> GetRevListResult:
"""Get a revocation list from the registry."""


class BaseAnonCredsRegistrar(BaseAnonCredsHandler):
Expand Down
8 changes: 1 addition & 7 deletions aries_cloudagent/anoncreds/default/did_indy/registry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""DID Indy Registry."""
import logging
import re
from typing import Optional, Pattern, Sequence, Tuple
from typing import Optional, Pattern, Sequence

from ....config.injection_context import InjectionContext
from ....core.profile import Profile
Expand Down Expand Up @@ -98,12 +98,6 @@ async def get_revocation_list(
"""Get a revocation list from the registry."""
raise NotImplementedError()

async def get_revocation_registry_delta(
self, profile: Profile, rev_reg_def_id: str, timestamp: None
) -> Tuple[dict, int]:
"""Get a revocation registry delta."""
raise NotImplementedError()

async def register_revocation_list(
self,
profile: Profile,
Expand Down
8 changes: 1 addition & 7 deletions aries_cloudagent/anoncreds/default/did_web/registry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""DID Web Registry."""
import re
from typing import Optional, Pattern, Sequence, Tuple
from typing import Optional, Pattern, Sequence

from ....config.injection_context import InjectionContext
from ....core.profile import Profile
Expand Down Expand Up @@ -93,12 +93,6 @@ async def get_revocation_list(
"""Get a revocation list from the registry."""
raise NotImplementedError()

async def get_revocation_registry_delta(
self, profile: Profile, rev_reg_def_id: str, timestamp: None
) -> Tuple[dict, int]:
"""Get a revocation registry delta."""
raise NotImplementedError()

async def register_revocation_list(
self,
profile: Profile,
Expand Down

0 comments on commit e4a6be5

Please sign in to comment.