Skip to content
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
28 changes: 24 additions & 4 deletions aries_cloudcontroller/controllers/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ async def create_invitation(
auto_accept: bool = None,
public: str = None,
multi_use: str = None,
invite_options: {} = None,
):
params = {}
if alias:
Expand All @@ -87,10 +88,29 @@ async def create_invitation(
params["public"] = public
if multi_use:
params["multi_use"] = multi_use

invite_details = await self.admin_POST(
"/connections/create-invitation", params=params
)
if invite_options:
"""A dictionary of the form:
{
"mediation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": {},
"recipient_keys": [
"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
],
"routing_keys": [
"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
],
"service_endpoint": "http://192.168.56.102:8020"
}
"""
invite_details = await self.admin_POST(
"/connections/create-invitation",
params=params,
json_data=invite_options,
)
else:
invite_details = await self.admin_POST(
"/connections/create-invitation", params=params
)
connection = Connection(invite_details["connection_id"], "invitation")
self.connections.append(connection)
return invite_details
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudcontroller/controllers/issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def issue_credential(self, cred_ex_id, comment, attributes):
async def store_credential(self, cred_ex_id, credential_id: str = None):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be in this commit. It is also added in separate P.R. #21

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll address that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wip-abramson just looked at that and now I'm confused what you mean. The PR you referenced is this PR? Not sure what you mean now. Issue is 14 PR is 21. Happy to change however you like it, please, clarify though😅

body = {}
if credential_id:
body['credential_id'] = credential_id
body["credential_id"] = credential_id
return await self.admin_POST(
f"{self.base_url}/records/{cred_ex_id}/store", json_data=body
)
Expand Down