-
Notifications
You must be signed in to change notification settings - Fork 9
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
move to uplink acapy client #98
Conversation
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
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've updated the connections endpoints to use the generated cloud controller and added some comments for context.
app/acapy_ledger_facade.py
Outdated
@@ -2,14 +2,14 @@ | |||
|
|||
import acapy_wallet_facade as wallet_facade | |||
import ledger_facade | |||
from aries_cloudcontroller import AriesAgentControllerBase | |||
from aries_cloudcontroller import AcaPyClient |
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.
AriesAgentControllerBase
is now AcaPyClient
app/dependencies.py
Outdated
agent = AcaPyClient( | ||
YOMA_AGENT_URL, api_key=x_api_key, admin_insecure=x_api_key == None |
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.
Client intialization is a bit different, but mostly the same
@@ -10,37 +10,38 @@ | |||
router = APIRouter(prefix="/generic/connections", tags=["connections"]) | |||
|
|||
|
|||
@router.get("/create-invite") | |||
@router.get("/create-invite", response_model=InvitationResult) |
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.
We can now specify the response models for API endpoints. These are generated, and exported in the cloud controller project.
The OpenAPI will automatically include the models in the generated open api spec.
app/generic/connections.py
Outdated
): | ||
""" | ||
Create connection invite. | ||
""" | ||
invite = await aries_controller.connections.create_invitation() | ||
invite = await aries_controller.connection.create_invitation() |
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.
Calls are almost the same, connection
is also generated, which is based on the tag name as used by ACA-Py
async def accept_invite( | ||
invite: dict, | ||
aries_controller: AriesAgentControllerBase = Depends(agent_selector), | ||
invite: ReceiveInvitationRequest, |
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.
Input models can also be specified based on the cloud controller models
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
I've updated the cloud controller to 0.3.0a7, which contains some fixes:
|
@morrieinmaas @vineeth14 Have you run into any issues with using the cloud controller? |
…ython into feature/uplink
* Admin Wallet endpoint compatible with controller 0.3.0a6 * Updated issuerv1, issuerv2, messaging, wallets endpoints * Updated credential_definition, schema and connections endpoints * Minor fix Co-authored-by: morrieinmaas <motechnix@gmail.com>
…ecosystem-partner
…x-xyz/aries-cloudapi-python into feature/99/ecosystem-partner
Tidy up some unused vars
932b2cc
to
897e37e
Compare
…aries-cloudapi-python into feature/uplink
897e37e
to
d56ca9d
Compare
7f127f8
to
5a5d93d
Compare
5a5d93d
to
a5c4cbb
Compare
* test_send_credential_proposal in issuer_v2 * see also didx-xyz/aries-cloudcontroller-python#62 * NOTE tests require tweaked version of controller that address return type validation errors for pydantic types
916284c
to
dadbca4
Compare
fixed/tweaked version of cloudcontroller. That version has Any type replacements for return types that are currently under investigation and presumably wrong.
a6b2b93
to
449df90
Compare
@TimoGlastra I made the tests pass now and removed some code smells. There is one test that needs fixing which is Please also have a look at issues 55-61 in the cloudcontroller. I've tweaked the controller for those issue on am now installing the controller from a branch via git+https://github.com/didx-xyz/aries-cloudcontroller-python@1162bb8b51ef5ddcaec916708c66966e3f18c358 as dependency. Before we we fully move to uplink version of the controller I'd say we should fix the issues and return types. That said, as you'll see in the code replacing a PyDantic model with an ANy type returns a couroutine object instead of a model object so I had to await it's JSOn response seprately. That is not ideal either, but works for now and will disappear when types are fixed. Do NOT merge yet. |
Kudos, SonarCloud Quality Gate passed! |
the wallet_id variable si not required for the controller, hence I removed it.
ae97033
to
052c31d
Compare
* [WIP] Enable out-of-band connection establishment * [WIP] [skip ci] add endpoint to create static connections. TODOs: * retrieve missing params within endpoint * create pub did in corresponding tests to test the endpoint * [WIP] Working endpoints, needs better testing. Also the trusted partner endpoint seems off. That needs fixing to make connections auto work properly. * Ability to connect to OPs etc via public DID. TODO: * Design and decide on trusted registry so that users can pic a public did.
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: Timo Glastra timo@animo.id