Skip to content

Service encoding according to DIDComm v2 #48

@dbluhm

Description

@dbluhm

Linked below is the current service encoding done by this library:
https://github.com/sicpa-dlab/peer-did-python/blob/main/peerdid/core/peer_did_helper.py#L42-L139

Notice that the encoding does not recursively descend into the service object.

Linked here is the spec for service endpoints for DIDComm v2 messaging:
https://identity.foundation/didcomm-messaging/spec/v2.0/#service-endpoint

Notice that the structure has changed from:

{
    "id": "did:example:123456789abcdefghi#didcomm-1",
    "type": "DIDCommMessaging",
    "serviceEndpoint": "https://example.com/path",
    "accept": [
        "didcomm/v2",
        "didcomm/aip2;env=rfc587"
    ],
    "routingKeys": ["did:example:somemediator#somekey"]
}

To:

{
    "id": "did:example:123456789abcdefghi#didcomm-1",
    "type": "DIDCommMessaging",
    "serviceEndpoint": [{
        "uri": "https://example.com/path",
        "accept": [
            "didcomm/v2",
            "didcomm/aip2;env=rfc587"
        ],
        "routingKeys": ["did:example:somemediator#somekey"]
    }]
}

This library should probably support both the "original" service format and the current spec defined service format.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions