Skip to content

Experiments with service, serviceType, relativeRef vs. PathService #332

Description

@peacekeeper

During the 14th May 2026 W3C DID WG meeting there were proposals for deprecating the service, serviceType, and relativeRef DID parameters, and there was a claim that the new proposed PathService path handling was a superset of those parameters.

So, here’s a challenge. Please explain how this use case could be fulfilled with PathService instead of the mentioned DID parameters. Please do this without imposing changes or constraints to the resulting final service endpoint URLs.

Given a DID: did:ex:1234

And given this DID document:

{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/suites/ed25519-2020/v1"
  ],
  "id": "did:ex:1234",
  "verificationMethod": [
    {
      "id": "did:ex:1234#key-1",
      "type": "Ed25519VerificationKey2020",
      "controller": "did:ex:1234",
      "publicKeyMultibase": "z6Mkn7s7ofHS6YMFqqUnevNWmKqcytnnyBRRuopt8YVgEUnf"
    }
  ],
  "authentication": [
    "did:ex:1234#key-1"
  ],
  "assertionMethod": [
    "did:ex:1234#key-1"
  ],
  "service": [
    {
      "id": "did:ex:1234#dpp-1",
      "type": "ProductPassport",
      "serviceEndpoint": "https://example.dpp-provider.com/"
    }
  ]
}

I am now constructing two DID URLs:

DID URL 1:

did:ex:1234?service=dpp-1&relativeRef=%2Fproduct%2F9f7866e1-4bc5-4495-9f75-308350a37280%3Fversion%3Dlatest

How this is dereferenced with the current DID URL Dereferencing algorithm:

  1. Resolve did:ex:1234 to the current DID document.
  2. Select the service with relative id #dpp-1.
  3. Apply the relative reference in relativeRef to the service endpoint URL https://service.dpp-provider.com/

The final service endpoint URL is:

https://example.dpp-provider.com/product/9f7866e1-4bc5-4495-9f75-308350a37280?version=latest

DID URL 2:

did:ex:1234?versionTime=2020-12-20T19:17:47Z&service=dpp-1&relativeRef=%2Fproduct%2F9f7866e1-4bc5-4495-9f75-308350a37280%3Fversion%3Dlatest

How this is dereferenced with the current DID URL Dereferencing algorithm:

  1. Resolve did:ex:1234 to the DID document at the time 2020-12-20T19:17:47Z.
  2. Select the service with relative id #dpp-1.
  3. Apply the relative reference in relativeRef to the service endpoint URL https://old-service.dpp-provider.com/

The final service endpoint URL is:

https://old-service.dpp-provider.com/product/9f7866e1-4bc5-4495-9f75-308350a37280?version=latest

Bonus Question:

Try the same exercise with serviceType=ProductPassport instead of service=dpp-1.

Bonus Materials:

Video related to this topic: https://www.youtube.com/watch?v=iRqMjNzo3M8 (from 2023)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions