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

📝 Update docstrings wallet/dids #817

Merged
merged 30 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
pass down acapy model
cl0ete committed Nov 19, 2024
commit 815db734809bed78d4fcb0fb58caa0a93ba45f2c
12 changes: 9 additions & 3 deletions app/routes/wallet/dids.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from typing import List, Optional

from aries_cloudcontroller import DID, DIDEndpoint, DIDEndpointWithType
from aries_cloudcontroller import DID
from aries_cloudcontroller import DIDCreate as DIDCreateAcaPy
from aries_cloudcontroller import DIDEndpoint, DIDEndpointWithType
from fastapi import APIRouter, Depends

from app.dependencies.acapy_clients import client_from_auth
@@ -50,12 +52,16 @@ async def create_did(
Returns the created DID object.

"""
logger.debug("POST request received: Create DID {}", did_create)
logger.debug("POST request received: Create DID")

acapy_did_create = None
if did_create:
acapy_did_create = DIDCreateAcaPy(**did_create.model_dump())

async with client_from_auth(auth) as aries_controller:
logger.debug("Creating DID")
result = await acapy_wallet.create_did(
did_create=did_create, controller=aries_controller
did_create=acapy_did_create, controller=aries_controller
)

logger.debug("Successfully created DID.")