Skip to content

Commit 5c37e41

Browse files
committed
added create_credential API endpoint that is new in Acapy 0.5.6
1 parent bb265a8 commit 5c37e41

File tree

1 file changed

+10
-0
lines changed
  • libs/aries-basic-controller/aries_basic_controller/controllers

1 file changed

+10
-0
lines changed

libs/aries-basic-controller/aries_basic_controller/controllers/issuer.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ async def get_records(self):
2424
async def get_record_by_id(self, cred_ex_id):
2525
return await self.admin_GET(f"{self.base_url}/records/{cred_ex_id}")
2626

27+
# Create a credential, automating the entire flow
28+
# TODO trace=True causes error. Not sure why
29+
# async def create_credential(self, connection_id, schema_id, cred_def_id, attributes, comment: str = "",
30+
# auto_remove: bool = True, trace: bool = False):
31+
#
32+
# body = await self.create_credential_body(connection_id, schema_id, cred_def_id, attributes, comment,
33+
# auto_remove, trace)
34+
async def create_credential(self, body):
35+
return await self.admin_POST(f"{self.base_url}/create", json_data=body)
36+
2737
# Send holder a credential, automating the entire flow
2838
# TODO trace=True causes error. Not sure why
2939
async def send_credential(self, connection_id, schema_id, cred_def_id, attributes, comment: str = "",

0 commit comments

Comments
 (0)