Skip to content

Commit

Permalink
Issuerv2 (#50)
Browse files Browse the repository at this point in the history
* Made Changes to Issuer.py

* Issuerv2
*added issuer_did to the body
*formatted issuer_v2.py

* Fixed typo

* Formatted wallet.py

* Bump version from 0.2.8 to 0.2.9

Co-authored-by: morrieinmaas <[email protected]>
  • Loading branch information
vineeth14 and morrieinmaas authored Jul 27, 2021
1 parent d04fc0e commit c0d6b1c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion aries_cloudcontroller/controllers/issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async def remove_record(self, cred_ex_id):

# Send a problem report for a credential exchange
async def send_problem_report(self, cred_ex_id, explanation: str):
body = {"explain_ltxt": explanation}
body = {"description": explanation}

return await self.admin_POST(
f"{self.base_url}/records/{cred_ex_id}/problem-report", json_data=body
Expand Down
20 changes: 14 additions & 6 deletions aries_cloudcontroller/controllers/issuer_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async def remove_record(self, cred_ex_id):

# Send a problem report for a credential exchange
async def problem_report(self, cred_ex_id, explanation: str):
body = {"explain_ltxt": explanation}
body = {"description": explanation}

return await self.admin_POST(
f"{self.base_url}/records/{cred_ex_id}/problem-report", json_data=body
Expand All @@ -182,6 +182,7 @@ async def create_credential_body(
comment: str = "",
auto_remove: bool = True,
trace: bool = False,
dif_criterion: str = "",
):
# raises error if connection not active
await self.connections.is_active(connection_id)
Expand All @@ -191,14 +192,21 @@ async def create_credential_body(
issuer_did = extract_did(cred_def_id)

body = {
"issuer_did": issuer_did,
"auto_remove": auto_remove,
"credential_proposal": {"@type": CRED_PREVIEW, "attributes": attributes},
"comment": comment,
"connection_id": connection_id,
"credential_preview": {
"@type": "issue-credential/2.0/credential-preview",
"attributes": attributes,
},
"filter": {
"indy": {
"cred_def_id": cred_def_id,
"schema_id": schema_id,
"issuer_did": issuer_did,
},
},
"trace": trace,
"comment": comment,
"cred_def_id": cred_def_id,
}

credential_body = {**body, **schema_details}
return credential_body
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def parse_requirements(filename):
if __name__ == "__main__":
setup(
name=PACKAGE_NAME,
version="0.2.8",
version="0.2.9",
description="A simple python package for controlling an aries agent through the admin-api interface",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit c0d6b1c

Please sign in to comment.