-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(WIP): anoncreds updates #2191
Closed
dbluhm
wants to merge
174
commits into
openwallet-foundation:main
from
Indicio-tech:feature/anoncreds
Closed
Changes from 110 commits
Commits
Show all changes
174 commits
Select commit
Hold shift + click to select a range
19d6fc4
chore: add anoncreds-rs deps
dbluhm 7b0cb6c
refactor: rename indy package to anoncreds
dbluhm ee3d40a
refactor: rename Indy* to AnonCreds*
dbluhm e4c986a
feat: add anoncreds concrete classes, copyied from credx
dbluhm c24af8e
fix: import anoncreds rather than indy_credx
cjhowland 795cd8f
fix: update imports to use aries_cloudagent.anoncreds
cjhowland df66bc9
fix: add requirements.anoncreds.txt to Dockerfile.indy
cjhowland d7d895f
fix: mount libanoncreds.so in volume
cjhowland ede5803
fix: pull binaries from a temporary location
dbluhm f8c7ca2
fix: add anoncreds deps to gha
dbluhm 60973f4
removed volume from run test script
burdettadam fc59336
Merge pull request #17 from burdettadam/fix/temporary-binaries
dbluhm 49a66f4
fix: library path for anoncreds bin
dbluhm dd7268b
fix: library path for test dockerfile for anoncreds bin
dbluhm d9f95cc
fix: redefine schema id
cjhowland 2621224
start of anoncreds admin api
burdettadam 2e68381
empty methods for anoncreds admin routes
burdettadam 1025b91
Merge pull request #106 from dbluhm/fix/temporary-binaries
dbluhm e21cdce
start of openapi schemas
burdettadam be553cc
use anoncreds issuer to create id
burdettadam 3d62cc6
fix: pass in cred def id in CredentialOffer and RevocationRegistryDef…
cjhowland bdd3752
schema route details
burdettadam 871a8b2
empty vars for cred def validation
burdettadam 9067fd1
anoncreds admin routes without expected return schemas
burdettadam 9612213
fix: remove unused import
cjhowland 4ed41c3
feat: add plugin structure
cjhowland 0f59de8
fix: flake8
cjhowland 4f96ed2
routes response schemas
burdettadam c56ac54
happy flake8 doc strings
burdettadam d42dfb9
Apple silicon support
burdettadam 33e77fa
fix: file naming and structure
cjhowland ec4a1e3
less dry-ness
burdettadam b3a6944
fix: AnonCredsRegistry inherits from BaseRegistry
cjhowland 420aba6
feat: add legacy indy registry plugin structure
cjhowland 9ca2d92
feat: create default directory for registries
cjhowland dc01703
fix: flake8
cjhowland 96d3fd0
Merge pull request #108 from Indicio-tech/feature/anoncreds-plugin-st…
dbluhm 6783b87
Merge branch 'feature/anoncreds' of github.com:Indicio-tech/aries-clo…
burdettadam f9de57f
basemodel schema bug
burdettadam e491f35
feat: some refinements on models
dbluhm 4d6fa86
removed old openapi schema
burdettadam c0097c7
feat: split interface, basic impl of core registry
dbluhm b7df825
get schema admin api, injection.
burdettadam 3eb0336
more model work
burdettadam 3cab55f
cred_def models
burdettadam 22dc4ce
models work
burdettadam 2f5bc91
fixed import
burdettadam 092b2f4
Merge pull request #110 from Indicio-tech/feature/anoncreds-split-res…
dbluhm 22f92a1
Merge branch 'feature/anoncreds' of github.com:Indicio-tech/aries-clo…
burdettadam 18d2231
start up bug
burdettadam 162ca2d
running code
burdettadam 5271e1c
Merge pull request #109 from Indicio-tech/feature/anoncreds-admin-api
dbluhm a7d9d05
post schema
burdettadam 410a740
routes logic
burdettadam 75d41c2
deserialize
burdettadam 07375a6
Merge pull request #111 from Indicio-tech/feature/anoncreds-admin-api…
dbluhm 9a47e67
feat: registry method logic (WIP)
cjhowland 06d7181
fix: imports
cjhowland 14d3991
fix: pass options, schema to AnonCredsRegistry.register_schema
cjhowland 0d028e8
feat: define supported_identifiers_regex on registries
cjhowland 4539efc
fix: register_schema signature
cjhowland e77122d
feat: did:indy register_schema response
cjhowland 6b93a5d
Merge pull request #112 from Indicio-tech/feature/anoncreds-did-indy-…
burdettadam fed1b47
fix: await and pass profile to register_schema()
cjhowland 5ae0acb
get resources models and interface
burdettadam 8b0d25c
get credential definitions
burdettadam 732d01b
Merge pull request #113 from Indicio-tech/feature/anoncreds_gets_inte…
dbluhm 48bd5a0
chore: update anoncreds python wrapper
dbluhm 09b6490
Merge pull request #114 from dbluhm/feature/anoncreds-update-deps
dbluhm 49596ad
style: formatting fixes
dbluhm e8cd404
feat: unskip buggy tests
dbluhm 0763fec
fix: update get_schema signature
cjhowland 0ee0769
fix: credential_definition method signatures
cjhowland e415799
fix: did:web method signatures
cjhowland 6d88667
feat: legacy indy schema, cred def logic
cjhowland f43f669
fix: anon_creds_registry credential definition arguments
cjhowland 0014205
fix: serialize schema_get result
cjhowland 6e41a06
fix: merge cleanup
cjhowland 52342c0
feat: error reporting
cjhowland 2039b66
fix: serialize cred_def_get result
cjhowland 88b25f4
feat: get_schemas and get_credential_definitions implementations
cjhowland a609352
fix: several small adjustments
dbluhm 2a7d929
Merge branch 'feature/anoncreds' into feature/anoncreds-legacy-indy-i…
dbluhm af06852
feat: updates to register_schema
dbluhm 75df783
fix: typos and imports
dbluhm 10d7972
feat: clean up models
dbluhm 6f86a44
fix: schemas and flake8 errors
dbluhm b6c3073
fix: mismatched parameter expectations
dbluhm 8d28760
fix: incorrect schema name in model, field names
dbluhm 833bc7b
feat(WIP): credential definitions
dbluhm ec4bac3
feat: credential definitions completed
dbluhm eb8d978
feat: implement revocation registry methods in issuer
dbluhm faa53f9
refactor: move anoncreds revocation models
dbluhm 9be889e
fix: imports and abstract methods
dbluhm ae2f64d
fix: issues with cred issuance and verification flows
dbluhm f2738ee
test: add simple test scripts for anoncreds
dbluhm f578660
feat: verification through anoncreds interface
dbluhm 27596c9
refactor: split up indy pres exch handler return_presentation
dbluhm ab81356
feat: use anoncreds holder
dbluhm 74043f5
feat: restore indy package
cjhowland 170f215
feat: remove sdk and credx packages
cjhowland 343fa08
feat: drop registry from default registry folder names
cjhowland 2dae060
refactor: rename registry and base
cjhowland b155cda
refactor: remove abstract AnonCreds* classes, rename AnonCredsRs* cla…
cjhowland 95aa5fa
platform in docker compose file
burdettadam c5a4826
Merge branch 'refactor/anoncreds' of github.com:Indicio-tech/aries-cl…
burdettadam 63dc426
fix: circular dependency issues
cjhowland a21d73a
fix: remove inner anoncreds directory
cjhowland f4ba884
fix: revocation registry size circular dep
dbluhm 1861971
Merge pull request #116 from Indicio-tech/refactor/anoncreds
dbluhm ccbcfcf
feat: revocation updates
dbluhm 452515b
refactor: drop indy reqs on rev objects
dbluhm 76a6c15
refactor: rename IndyRevocation -> AnonCredsRevocation
dbluhm a4e2a69
refactor: de-indy-ify AnonCredsRevocation
dbluhm d277ecc
refactor: issuer rev reg record usage from anoncreds
dbluhm 195fe02
start of updating send_entry+
burdettadam c35b488
fix: send_entry logic moved to legacy indy
dbluhm 895ae08
feat: register rev status list on legacy indy
dbluhm d68b805
fix(anoncreds): legacy regex matching
burdettadam f233098
feat: revoke_credentials returns rev lists
dbluhm c690405
fix: raise not imp
burdettadam 224b4fb
fix(anoncreds): did indy regtistry cleanup
burdettadam c3ff93f
fix: clean up did web registry
cjhowland 5288253
fix(anoncreds): did indy update_revocation_status_list
burdettadam 8e3e585
fix(anoncreds): did:web regex
burdettadam a044fe1
Merge pull request #118 from Indicio-tech/feature/anoncreds-cleanup
dbluhm c7b8dc9
Merge pull request #117 from Indicio-tech/feature/anoncreds-regex
dbluhm f384f9f
refactor: rename revocation status list ot revocation list
cjhowland 1f67c1b
Merge pull request #119 from Indicio-tech/refactor/anoncreds-revocati…
dbluhm 02f1b82
fix(flake8): made flake8 happier
burdettadam 9ffe2c4
Merge pull request #120 from Indicio-tech/feature/anoncreds-test-cleanup
dbluhm af733b8
test: rev reg def and rev reg list posts in test
dbluhm c422b2f
fix: rev reg def models
dbluhm 96ccbe9
fix: anoncreds issuer specifies tails dir
dbluhm 6043173
feat: initial pass at rev list register endpoint
dbluhm 1178edf
fix: rev status list to rev list
dbluhm cfcd24b
fix: remove status from anoncreds/revocation-list endpoint
cjhowland 6ef08dd
Merge pull request #121 from Indicio-tech/feature/rev-status-list-reg…
dbluhm 2fcd5f1
fix: remove url check for tails_public_uri
cjhowland a2bb0c2
fix: update init_issuer_registry calls to include issuer_id argument
cjhowland 2736000
feat: add generic tails file upload
dbluhm 6c9dc1a
feat: update anoncreds-rs build
cjhowland 40f065b
feat: update image for tails-server
cjhowland aa56931
fix: remove status list from revocation-list endpoint
cjhowland bad0784
fix: remove url check
cjhowland 4c1f36b
fix: pass issuer_id into init_issuer_registry()
cjhowland 44ed2c3
fix: update MasterSecret references
cjhowland c45170b
fix: remove RevocationRegistryDelta references
cjhowland 56640e0
Merge pull request #122 from Indicio-tech/fix/anoncreds-build-adjustm…
dbluhm 0eb5ac4
fix: object ids not necessarily known until finished
dbluhm 57d1e4b
feat(tailsfile): generic tails file upload
burdettadam d5135c4
fix(tailsfile): generic tails file upload
burdettadam 674c8da
refactor: shorten get rev reg def result object name
dbluhm 5ff529e
fix: get rev reg def in legacy indy registry
dbluhm 7d2e573
feat: use issuer create and register upgrade
dbluhm ac2776a
fix: tails location mismatch
dbluhm 81ab818
feat: issue revocable creds using anoncreds interface
dbluhm 34a67bc
Merge pull request #126 from Indicio-tech/feature/anoncreds-revocable…
dbluhm 52e12ff
fix(anoncreds): proof, rev reg def id
burdettadam bfacecd
fix: remove redundant get_revocation_registry_definitions() function …
cjhowland 08056f8
Merge pull request #127 from Indicio-tech/fix/anoncreds-proof-request
dbluhm 8a699bc
refactor: use anoncreds models in get_ledger_objects
dbluhm aa87a45
refactor: split rev methods from issuer
dbluhm ff62b91
feat: update to use tails server image with backwards compatible put,…
cjhowland 958cc7b
feat(revocation): update revocation to track pending state
burdettadam 5aebbd8
fix(revocation): pr feed back changes
burdettadam 6dc5971
fix: store states for rev reg def and rev list
dbluhm 298790c
feat: mark pending on rev list, set active registry
dbluhm d14199d
Merge pull request #130 from Indicio-tech/feature/anoncreds-pending-r…
dbluhm e3ff931
feat: implement update_revocation_list
dbluhm 524a89b
feat: implement get revocation list on legacy indy
dbluhm d964672
fix: revocation errors
dbluhm 3ae503b
fix: missing error info
dbluhm 2e2833a
Merge pull request #132 from Indicio-tech/feature/anoncreds-revocatio…
dbluhm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import os | ||
|
||
from controller.controller import Controller | ||
from controller.protocols import ( | ||
indy_anoncred_onboard, | ||
didexchange, | ||
indy_issue_credential_v2, | ||
indy_present_proof_v2, | ||
) | ||
from controller.logging import logging_to_stdout | ||
|
||
ALICE = os.getenv("ALICE", "http://alice:3001") | ||
BOB = os.getenv("BOB", "http://bob:3005") | ||
|
||
|
||
async def main(): | ||
logging_to_stdout() | ||
async with Controller(base_url=ALICE) as alice, Controller(base_url=BOB) as bob: | ||
# DID Setup | ||
public_did = await indy_anoncred_onboard(alice) | ||
|
||
# Register a Schema using legacy Indy | ||
response = await alice.post( | ||
"/anoncreds/schema", | ||
json={ | ||
"schema": { | ||
"attrNames": ["name", "age"], | ||
"issuerId": public_did.did, | ||
"name": "anoncreds-testing", | ||
"version": "0.1", | ||
}, | ||
"options": {}, | ||
}, | ||
) | ||
schema_id = response["schema_state"]["schema_id"] | ||
schema = await alice.get(f"/anoncreds/schema/{schema_id}") | ||
schemas = await alice.get("/anoncreds/schemas") | ||
|
||
cred_def = await alice.post( | ||
"/anoncreds/credential-definition", | ||
json={ | ||
"credential_definition": { | ||
"tag": "default", | ||
"schemaId": schema_id, | ||
"issuerId": public_did.did, | ||
}, | ||
"options": { | ||
"support_revocation": False, | ||
}, | ||
}, | ||
) | ||
cred_def_id = cred_def["credential_definition_state"][ | ||
"credential_definition_id" | ||
] | ||
cred_def = await alice.get(f"/anoncreds/credential-definition/{cred_def_id}") | ||
cred_defs = await alice.get("/anoncreds/credential-definitions") | ||
|
||
alice_conn, bob_conn = await didexchange(alice, bob) | ||
await indy_issue_credential_v2( | ||
alice, | ||
bob, | ||
alice_conn.connection_id, | ||
bob_conn.connection_id, | ||
cred_def_id, | ||
{"name": "Bob", "age": "42"}, | ||
) | ||
bob_pres, alice_pres = await indy_present_proof_v2( | ||
bob, | ||
alice, | ||
bob_conn.connection_id, | ||
alice_conn.connection_id, | ||
name="proof-1", | ||
version="0.1", | ||
comment="testing", | ||
requested_attributes=[ | ||
{"name": "name", "restrictions": [{"cred_def_id": cred_def_id}]}, | ||
{"name": "age", "restrictions": [{"cred_def_id": cred_def_id}]}, | ||
], | ||
) | ||
print(alice_pres.verified) | ||
|
||
|
||
if __name__ == "__main__": | ||
import asyncio | ||
|
||
asyncio.run(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import logging | ||
|
||
from ..config.injection_context import InjectionContext | ||
from ..config.provider import ClassProvider | ||
|
||
from .registry import AnonCredsRegistry | ||
|
||
LOGGER = logging.getLogger(__name__) | ||
|
||
|
||
async def setup(context: InjectionContext): | ||
"""Set up default resolvers.""" | ||
registry = context.inject_or(AnonCredsRegistry) | ||
if not registry: | ||
LOGGER.warning("No AnonCredsRegistry instance found in context") | ||
return | ||
|
||
indy_registry = ClassProvider( | ||
"aries_cloudagent.anoncreds.default.did_indy.registry.DIDIndyRegistry", | ||
# supported_identifiers=[], | ||
# method_name="did:indy", | ||
).provide(context.settings, context.injector) | ||
await indy_registry.setup(context) | ||
registry.register(indy_registry) | ||
|
||
web_registry = ClassProvider( | ||
"aries_cloudagent.anoncreds.default.did_web.registry.DIDWebRegistry", | ||
# supported_identifiers=[], | ||
# method_name="did:web", | ||
).provide(context.settings, context.injector) | ||
await web_registry.setup(context) | ||
registry.register(web_registry) | ||
|
||
legacy_indy_registry = ClassProvider( | ||
"aries_cloudagent.anoncreds.default.legacy_indy.registry.LegacyIndyRegistry", | ||
# supported_identifiers=[], | ||
# method_name="", | ||
).provide(context.settings, context.injector) | ||
await legacy_indy_registry.setup(context) | ||
registry.register(legacy_indy_registry) | ||
|
||
# TODO: add context.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
"""Base Registry""" | ||
from abc import ABC, abstractmethod | ||
from typing import Generic, Optional, Pattern, Tuple, TypeVar | ||
|
||
from ..config.injection_context import InjectionContext | ||
from ..core.error import BaseError | ||
from ..core.profile import Profile | ||
from .models.anoncreds_cred_def import ( | ||
CredDef, | ||
CredDefResult, | ||
GetCredDefResult, | ||
) | ||
from .models.anoncreds_revocation import ( | ||
GetRevStatusListResult, | ||
AnonCredsRegistryGetRevocationRegistryDefinition, | ||
RevRegDef, | ||
RevRegDefResult, | ||
RevStatusList, | ||
RevStatusListResult, | ||
) | ||
from .models.anoncreds_schema import AnonCredsSchema, GetSchemaResult, SchemaResult | ||
|
||
|
||
T = TypeVar("T") | ||
|
||
|
||
class BaseAnonCredsError(BaseError): | ||
"""Base error class for AnonCreds.""" | ||
|
||
|
||
class AnonCredsObjectNotFound(BaseAnonCredsError): | ||
"""Raised when object is not found in resolver.""" | ||
|
||
def __init__( | ||
self, message: Optional[str] = None, resolution_metadata: Optional[dict] = None | ||
): | ||
super().__init__(message, resolution_metadata) | ||
self.resolution_metadata = resolution_metadata | ||
|
||
|
||
class AnonCredsRegistrationError(BaseAnonCredsError): | ||
"""Raised when registering an AnonCreds object fails.""" | ||
|
||
|
||
class AnonCredsObjectAlreadyExists(AnonCredsRegistrationError, Generic[T]): | ||
"""Raised when an AnonCreds object already exists.""" | ||
|
||
def __init__( | ||
self, message: Optional[str] = None, obj: Optional[T] = None, *args, **kwargs | ||
): | ||
super().__init__(message, obj, *args, **kwargs) | ||
self.obj = obj | ||
|
||
@property | ||
def message(self): | ||
if self.args[0] and self.args[1]: | ||
return f"{self.args[0]}: {self.args[1]}" | ||
else: | ||
return super().message | ||
|
||
|
||
class AnonCredsSchemaAlreadyExists( | ||
AnonCredsObjectAlreadyExists[Tuple[str, AnonCredsSchema]] | ||
): | ||
"""Raised when a schema already exists.""" | ||
|
||
@property | ||
def schema_id(self): | ||
return self.obj[0] if self.obj else None | ||
|
||
@property | ||
def schema(self): | ||
return self.obj[1] if self.obj else None | ||
|
||
|
||
class AnonCredsResolutionError(BaseAnonCredsError): | ||
"""Raised when resolving an AnonCreds object fails.""" | ||
|
||
|
||
class BaseAnonCredsHandler(ABC): | ||
@property | ||
@abstractmethod | ||
def supported_identifiers_regex(self) -> Pattern: | ||
"""Regex to match supported identifiers.""" | ||
|
||
async def supports(self, identifier: str) -> bool: | ||
"""Determine whether this registry supports the given identifier.""" | ||
return bool(self.supported_identifiers_regex.match(identifier)) | ||
|
||
@abstractmethod | ||
async def setup(self, context: InjectionContext): | ||
"""Setup method.""" | ||
|
||
|
||
class BaseAnonCredsResolver(BaseAnonCredsHandler): | ||
@abstractmethod | ||
async def get_schema(self, profile: Profile, schema_id: str) -> GetSchemaResult: | ||
"""Get a schema from the registry.""" | ||
|
||
@abstractmethod | ||
async def get_credential_definition( | ||
self, profile: Profile, credential_definition_id: str | ||
) -> GetCredDefResult: | ||
"""Get a credential definition from the registry.""" | ||
|
||
@abstractmethod | ||
async def get_revocation_registry_definition( | ||
self, profile: Profile, revocation_registry_id: str | ||
) -> AnonCredsRegistryGetRevocationRegistryDefinition: | ||
"""Get a revocation registry definition from the registry.""" | ||
|
||
@abstractmethod | ||
async def get_revocation_status_list( | ||
self, profile: Profile, revocation_registry_id: str, timestamp: str | ||
) -> GetRevStatusListResult: | ||
"""Get a revocation list from the registry.""" | ||
|
||
|
||
class BaseAnonCredsRegistrar(BaseAnonCredsHandler): | ||
@abstractmethod | ||
async def register_schema( | ||
self, | ||
profile: Profile, | ||
schema: AnonCredsSchema, | ||
options: Optional[dict] = None, | ||
) -> SchemaResult: | ||
"""Register a schema on the registry.""" | ||
|
||
@abstractmethod | ||
async def register_credential_definition( | ||
self, | ||
profile: Profile, | ||
schema: GetSchemaResult, | ||
credential_definition: CredDef, | ||
options: Optional[dict] = None, | ||
) -> CredDefResult: | ||
"""Register a credential definition on the registry.""" | ||
|
||
@abstractmethod | ||
async def register_revocation_registry_definition( | ||
self, | ||
profile: Profile, | ||
revocation_registry_definition: RevRegDef, | ||
options: Optional[dict] = None, | ||
) -> RevRegDefResult: | ||
"""Register a revocation registry definition on the registry.""" | ||
|
||
@abstractmethod | ||
async def register_revocation_status_list( | ||
self, | ||
profile: Profile, | ||
rev_status_list: RevStatusList, | ||
options: Optional[dict] = None, | ||
) -> RevStatusListResult: | ||
"""Register a revocation list on the registry.""" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
"""DID Indy Registry""" | ||
import logging | ||
import re | ||
from typing import Pattern | ||
|
||
from ....config.injection_context import InjectionContext | ||
from ....core.profile import Profile | ||
from ...models.anoncreds_cred_def import ( | ||
GetCredDefResult, | ||
) | ||
from ...models.anoncreds_revocation import ( | ||
GetRevStatusListResult, | ||
AnonCredsRegistryGetRevocationRegistryDefinition, | ||
) | ||
from ...models.anoncreds_schema import GetSchemaResult | ||
from ...base import BaseAnonCredsRegistrar, BaseAnonCredsResolver | ||
|
||
LOGGER = logging.getLogger(__name__) | ||
|
||
|
||
class DIDIndyRegistry(BaseAnonCredsResolver, BaseAnonCredsRegistrar): | ||
"""DIDIndyRegistry""" | ||
|
||
def __init__(self): | ||
self._supported_identifiers_regex = re.compile(r"^did:indy:.*$") | ||
|
||
@property | ||
def supported_identifiers_regex(self) -> Pattern: | ||
return self._supported_identifiers_regex | ||
# TODO: fix regex (too general) | ||
|
||
async def setup(self, context: InjectionContext): | ||
"""Setup.""" | ||
print("Successfully registered DIDIndyRegistry") | ||
|
||
async def get_schema(self, profile: Profile, schema_id) -> GetSchemaResult: | ||
"""Get a schema from the registry.""" | ||
|
||
async def get_schemas(self, profile: Profile, filter: str): | ||
"""Get schema ids filtered by filter""" | ||
|
||
# TODO: determine keyword arguments | ||
async def register_schema( | ||
self, | ||
profile: Profile, | ||
options: dict, | ||
schema, | ||
): | ||
"""Register a schema on the registry.""" | ||
|
||
async def get_credential_definition( | ||
self, profile: Profile, cred_def_id: str | ||
) -> GetCredDefResult: | ||
"""Get a credential definition from the registry.""" | ||
|
||
async def get_credential_definitions(self, profile: Profile, filter: str): | ||
"""Get credential definition ids filtered by filter""" | ||
|
||
# TODO: determine keyword arguments | ||
async def register_credential_definition( | ||
self, | ||
profile: Profile, | ||
schema_id: str, | ||
support_revocation: bool, | ||
tag: str, | ||
rev_reg_size: int, | ||
issuer_id: str, | ||
): | ||
"""Register a credential definition on the registry.""" | ||
|
||
async def get_revocation_registry_definition( | ||
self, profile: Profile, rev_reg_id: str | ||
) -> AnonCredsRegistryGetRevocationRegistryDefinition: | ||
"""Get a revocation registry definition from the registry.""" | ||
|
||
# TODO: determine keyword arguments | ||
async def register_revocation_registry_definition( | ||
self, | ||
profile: Profile, | ||
rev_reg_id: str, | ||
issuer_id: str, | ||
): | ||
"""Register a revocation registry definition on the registry.""" | ||
|
||
async def get_revocation_registry_definitions(self, profile: Profile, filter: str): | ||
"""Get credential definition ids filtered by filter""" | ||
|
||
async def get_revocation_status_list( | ||
self, profile: Profile, revocation_registry_id: str, timestamp: str | ||
) -> GetRevStatusListResult: | ||
"""Get a revocation list from the registry.""" | ||
|
||
# TODO: determine keyword arguments | ||
async def register_revocation_status_list(self): | ||
"""Register a revocation list on the registry.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Routes for DID Indy Registry""" |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this
controller
package, does it need to be added?This demo might be better placed under
examples/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusion, this is part of a quick test script that I intend to remove before merging to main, replacing it with some proper testing. This script is run by a container built from
docker/Dockerfile.anoncreds-test
, which does a quickpip install
of the needed library. This gets run by thetests
service indocker-compose.yml
(which will also be removed before merging). We just found having a quick high-level test helpful while things are in flight.