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

Support DIDComm Messaging attachments #612

Closed
awoie opened this issue Jul 9, 2021 · 2 comments · Fixed by #1087
Closed

Support DIDComm Messaging attachments #612

awoie opened this issue Jul 9, 2021 · 2 comments · Fixed by #1087
Assignees
Labels
incomplete Issue is not well defined. Please ask for clarification before starting to work on it! wontfix This will not be worked on

Comments

@awoie
Copy link
Member

awoie commented Jul 9, 2021

TBD: needs more refinement

Extend the current DIDCommMessage and Message interfaces to support DIDCommV2 attachments as defined here: https://identity.foundation/didcomm-messaging/spec/#attachments

@awoie awoie added the incomplete Issue is not well defined. Please ask for clarification before starting to work on it! label Jul 9, 2021
@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 21, 2021
@stale stale bot closed this as completed Oct 1, 2021
@codynhat
Copy link
Contributor

I currently have a use case where attachments is needed. Currently, the DIDCommMessageHandler drops the attachments header before forwarding any unpacked messages. I am interested in taking on this work and opening a PR.

A little more context about my use case. I am developing a set of DIDComm protocols that will use the IPLD DAG-JSON codec as a way to specify links to other content-addressable content. This content could be external to the DIDComm message, or can be an attachment in the message. I would like to be able to handle these attachments using Veramo, and also develop a new message handler that does the following:

  1. Decodes a DIDComm body from the DIDCommMessageHandler as DAG-JSON, essentially turning links into CID objects
  2. Packages the body and all attachments into an in-memory CAR as the raw field on the Message

Message handlers specific to these DIDComm protocols that use DAG-JSON can then use IPLD tooling internally to traverse the message and its links to attachments using the CAR.

Here is an example of what a message using DAG-JSON and some attachments would look like:

{
    "id": "...",
    "type": "...",
    "body": {
        "someLinkedContent": { "/": "<CID of offer>" },
    },
    "attachments": [
        {
          "data": {
            "hash": "<multi hash of content>"
            "json": {
              ... some attached JSON content
            }
          }
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete Issue is not well defined. Please ask for clarification before starting to work on it! wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants