Closed kukgini closed 1 year ago
Maybe this is the ACA-Py issue the same as AFJ's: https://github.com/hyperledger/aries-framework-javascript/issues/1129
Maybe it's a bug because pthid is missing. When using aca-py as a holder, the credential-request is processed well. it seems to be the difference is pthid in the ~thread decorator. I am attaching an example of a payload that can be handled.
{"@type":"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/1.0/request-credential","@id":"eef9d40d-0cad-4e52-9042-38d452e64998","~thread":{"thid":"484c50bf-956d-4fb1-b165-1bd01820a660","pthid":"cfcb01af-ef8b-4243-a9e1-d5896ebbdfca"},"requests~attach":[{"@id":"libindy-cred-request-0","mime-type":"application/json","data":{"base64":"eyJwcm92ZXJfZGlkIjogIlR1dFRGWlM1Sno2SjFuOGo1NlhtNU4iLCAiY3JlZF9kZWZfaWQiOiAiU1hZRTNpQlNXckY4amg1N200eWhnYTozOkNMOjY1NjU0OTpkZWZhdWx0IiwgImJsaW5kZWRfbXMiOiB7InUiOiAiMzA1NTgyMzcxNjAyMTEzNTIxNTQ4OTE1OTc1NTQxODQzODY5MTg5Mzg3NTg2NzY5NzYxMTEyMDY2NzU2MzgwNzI4ODYwMjY5MDY1NDY5ODcyNDQyOTgxODQwOTI2MTA2ODY0ODY0ODE1MjY0NjI5MjEwNDkzMTY4ODkzNzcxNDY1NDUzMjk2MzE4MzUwNTExODc5MTI4OTIyMDQwODUwMzgwOTIxNDU2MTkwNzgwMjU1ODE4NDg3MjE2MjY2NTUwNTk2NDE5ODE0MjY3NzU5MjQzNjcwMDc1NTM3MTIzOTM5MTA0NDI0OTk2MDkxNzQ4ODA5NDE5ODA4MTAxODAzODI2MzEyNjExMzExNDQ2MDgxNjk3MjUwMzgxNjcyMTc4MzUwNDU2NTI0NDMwMDY4MzAzMzM2Mzc2OTk3MjA3OTE5ODI5MjUxMjcxNTEyNTM4NzMyNDAzMTg4NjgwNzg4NTI5NTY5MTIxMTQ4NDIxMjEyMDgzNTUxMjU3Njc0MTU5ODY2ODUwMzk2MTIxMDM5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TcxODU1MDU3MzU2MzEwNDE0MjA4MTA5MjE4MTk2MDM2MjE0ODU1Mzg0MjE3ODIyNTc3ODgyMDY0MDQ1Njc2MjM3NDIwOTY0Mzc5MTc1NDE3NTUzOTc2MjcxODczOTIyMDIyNDI1NDU1NzQ3NTA2NzA1MzQ5ODMwODEzNTY5MTc1MjgyMjcwNTY0NzYxNTgwODg0NjY2MDgwMjE3MDg2OTI0NjMwNjcwNzQ0NjcxMDY1OTY4NDMzMjgxNTc1MTk3MTE0NDM1MTQzNTYzNTk5MTU4NjIwNjAyNzIzNzIxNjI3MTk4NTQyNjI1NjM2NTUwMTk5MDAzODM1MTQ5Mjc2MjQ5MTcyNDUzMDcxODQ2NDgyMTQ5MTIwNDA1MzgzOTAxMTQ3MDM0NzAyMDEwNDM2MTczMjI0NTQ5MDM4MzQzMzc3MDgwNjk2NjE5Mzg1NzU2MjI3NDYxMDI1ODAzMjg1OTc0Njk3MjAwMTg0OTcyMTc2Nzk4NTYwNTE3Njk3IiwgIm1fY2FwcyI6IHsibWFzdGVyX3NlY3JldCI6ICIxOTEyMDY5MjE5OTg0MDMyOTAwNjc3NTA4MjkzNjQ0MzQzNjc2NzgxMDgxOTMzODIyMDUzMTEyMDA0Njc2MDQ3OTc5ODExNjE3MzA2MTY4MDQ0MTI4MTg2MTYzMDQ2MDg3Njk2NDY0NTQ0NjEzNjQ3NjI3Njk4OTA2MzUzMDc4MDU1NDc1NTY3NTQxMzU2MDQwOTQzNTIyNzU5NzY3NDk2MDMwOTYzMDU2MDEwOTE0MTg5MyJ9LCAicl9jYXBzIjoge319LCAibm9uY2UiOiAiOTc5NTY1MjQwNzg1OTMxNDE2ODI2ODEifQ=="}
You are right. I failed to include the parent thread ID in the message. The OOB spec requires this: https://github.com/hyperledger/aries-rfcs/blob/main/features/0434-outofband/README.md#correlating-responses-to-out-of-band-messages
Can you provide guidance on creating an OOB message with a credential offer attachment in ACA-py? In the case of AFJ, I've created a sample app for this. https://github.com/hyperledger/aries-framework-swift/tree/main/AriesFramework/AriesFrameworkTests/javascript
Of course. here is steps to build OOB invitation with offer attachment.
STEP 0. Setup, set the following environment variables when starting aca-py
so that it can respond to ~transport
decorator.
ACAPY_AUTO_ACCEPT_REQUESTS=true
ACAPY_AUTO_RESPOND_CREDENTIAL_REQUEST=true
STEP 1. setup schema POST {{issuerAdminUrl}}/schemas
{
"schema_name": "<schema name>",
"schema_version": "<schema version in semver style>",
"attributes": ["<attribute name>", ... ]
}
STEP 2. setup credential definition POST {{issuerAdminUrl}}/credential-definitions
{
"schema_id": "<schema id from STEP 1's response>",
"support_revocation": false,
"tag": "default"
}
STEP 3. create credential offering POST {{issuerAdminUrl}}/issue-credential/create-offer
{
"comment": "oob issuance test",
"cred_def_id": "<cred_def_id from STEP 2's response>",
"credential_preview": {
"@type": "issue-credential/1.0/credential-preview",
"attributes": [
{ "mime-type": "text/plain", "name": "<attribute-name>", "value": "<attribute-value>" },
...
]
}
}
STEP 4. create out of band invitation POST {{issuerAdminUrl}}/out-of-band/create-invitation
{
"alias": "<whatever you want>",
"handshake_protocols": [
"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"
],
"attachments": [
{
"id": "<credential_exchange_id from STEP 3's response>",
"type": "credential-offer"
}
]
}
When AF.Swift accepts an OOB invitation including credential-offer from Aca-Py, the credential-request message comes to Aca-Py, but Aca-Py gives the following error.
used Invitation Url was: out-of-band-invitation.txt
and the incomming credential-request message was: