Skip to content
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(cheqd): Add universal registrar support #1376

Merged
merged 18 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
363 changes: 238 additions & 125 deletions cheqd/cheqd/anoncreds/registry.py

Large diffs are not rendered by default.

33 changes: 28 additions & 5 deletions cheqd/cheqd/anoncreds/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
from acapy_agent.wallet.did_method import DIDMethods
from acapy_agent.wallet.key_type import KeyTypes

from ...did.base import ResourceCreateRequestOptions, ResourceUpdateRequestOptions
from ...did_method import CHEQD
from ..registry import PublishResourceResponse


@pytest.fixture
Expand Down Expand Up @@ -54,11 +56,18 @@ def mock_schema():

@pytest.fixture
def mock_create_and_publish_resource():
return {
"jobId": "MOCK_JOB_ID",
"resource": {"id": "MOCK_RESOURCE_ID"},
"id": "MOCK_ID",
}
return PublishResourceResponse(
did_url="MOCK_ISSUER_ID/resources/MOCK_RESOURCE_ID",
content="MOCK_VALUE",
)


@pytest.fixture
def mock_update_and_publish_resource():
return PublishResourceResponse(
did_url="MOCK_ISSUER_ID/resources/MOCK_RESOURCE_ID",
content="MOCK_VALUE",
)


@pytest.fixture
Expand Down Expand Up @@ -130,3 +139,17 @@ async def mock_profile_for_manager():
profile.context.injector.bind_instance(BaseCache, InMemoryCache())

return profile


@pytest.fixture
def mock_resource_create_options():
return ResourceCreateRequestOptions(
did="MOCK_VALUE", content="MOCK_VALUE", name="MOCK_VALUE", type="MOCK_VALUE"
)


@pytest.fixture
def mock_resource_update_options():
return ResourceUpdateRequestOptions(
did="MOCK_VALUE", content=["MOCK_VALUE"], name="MOCK_VALUE", type="MOCK_VALUE"
)
Loading
Loading