Skip to content
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

ACA-Py OOB invitation not accepted by Credo #2040

Open
nodlesh opened this issue Sep 20, 2024 · 1 comment
Open

ACA-Py OOB invitation not accepted by Credo #2040

nodlesh opened this issue Sep 20, 2024 · 1 comment

Comments

@nodlesh
Copy link

nodlesh commented Sep 20, 2024

I've got an ACA-Py agent that created an OOB invitation. I cannot get that invitation to be successfully process by Credo in oob/receiveInvitation.
This is the invitation,

{
        "@type": "https://didcomm.org/out-of-band/1.1/invitation",
        "@id": "b457aaf1-9870-48f3-ac43-eeb6ed59ce7f",
        "label": "aca-py.Bob",
        "handshake_protocols": [
            "https://didcomm.org/didexchange/1.0"
        ],
        "services": [
            {
                "id": "#inline",
                "type": "did-communication",
                "recipientKeys": [
                    "did:key:z6MksYLeLLcGuHUcewRgo8Zzm8xapPGoUiRaMm6CdiPA77QB#z6MksYLeLLcGuHUcewRgo8Zzm8xapPGoUiRaMm6CdiPA77QB"
                ],
                "serviceEndpoint": "http://host.docker.internal:9031"
            }
        ]
    }

Initially I would get errors that the recioientKeys and serviceEndpoint were missing. I moved them out of the services section and that seemed to clear up those errors. However, now I get that the type isn't valid.

error: {
    name: 'ClassValidationError',
    message: 'ConnectionInvitationMessage: Failed to validate class.\n' +
      'An instance of ConnectionInvitationMessage has failed the validation:\n' +
      ' - property type has failed the following constraints: type does not match the expected message type (only minor version may be lower) \n',
    status: 500,

How can I get this ACA-Py OOB invitation to be accepted by Credo?

@TimoGlastra
Copy link
Contributor

What method are you using to accept the oob invitation? I think the invitation is directly transformed into a ConnectionInvitationMessage. Usually we use agent.oob.receiveInvitationFromUrl which handles the different invitation types. If you only have the json you need to look at the @type and based on that you need to either parse it to ConnectionInvitationMessage or OutOfBandInvitation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants