credo-ts
credo-ts copied to clipboard
OOB invitations using public did not supported
@TimoGlastra maybe just a question: If we try to use the out-of-band invitations (created in an aca-py instance) and using the public did, the AFJ client cannot receive such invitation right now.
The agent.oob.receiveInvitationFromUrl currently fails with: TypeError: undefined is not an object (evaluating 'iter[Symbol.iterator]
We've identified the failure coming from this line: https://github.com/hyperledger/aries-framework-javascript/blob/main/packages/core/src/modules/oob/messages/OutOfBandInvitation.ts#L108
When adjusting the code to overcome the failure, we get:
AriesFrameworkError: Dids are not currently supported in out-of-band invitation services attribute.
Is it planned to add the support in the 0.2.0 release? I couldn't find any mention in https://github.com/hyperledger/aries-framework-javascript/issues/764 Thank you
Ah we should update the code snippet to the following to avoid the error posted above:
public getRecipientKeys(): Key[] {
return this.services
.filter((s): s is OutOfBandDidCommService => typeof s !== 'string' && !(s instanceof String))
.map((s) => s.recipientKeys)
.reduce((acc, curr) => [...acc, ...curr], [])
.map((didKey) => DidKey.fromDid(didKey).key)
}
But you're correct that receiving invitations from public dids are not supported yet. It's currently not top of my priority to work on this feature. @JamesKEbert mentioned that he'd be interested in working on this, but not sure of the status of this.