Skip to content

w3c-ccg/did-resolution-mocha-test-suite

Repository files navigation

DID Resolution Test Suite

Table of Contents

Background

Provides interoperability tests for the DID Resolution specification

Install

$ npm i

Usage

$ npm test

Implementations

This test suite loads implementation descriptions from https://github.com/w3c-ccg/vc-test-suite-implementations

To add your implementation to this test suite, follow the instructions there.

This specific test suites needs a didResolvers section defined where implementation endpoints are tagged with did-resolution.

Additionally, a set of supportedDids providing test cases that the test suite will exercise. Implementations must provide at least one valid DID that can be successfully resolved, and where possible should a test case for deactivated and notFound DIDs.

Each test case is an object, defining a did and any additional resolutionOptions required for the resolver to resolve that DID.

See the example below:

  "didResolvers": [{
    "id": "...",
    "endpoint": "...",
    "tags": ["did-resolution"],
    "supportedDids": {
      "valid": [
        {
          "did": "did:key:z2J9gcGbsEDUmANXS8iJTVefK5t4eCx9x5k8jr8EyXWekTiEet6Jt6gwup2aWawzhHyMadvVMFcQ3ruwqg1Y8rYzjto1ccQu",
          "resolutionOptions": {}
        }
      ],
      "notFound": [
        {
          "did": "did:x:z2J9gcGbsEDUmANXS8iJTVefK5t4eCx9x5k8jr8EyXWekTiEet6Jt6gwup2aWawzhHyMadvVMFcQ3ruwqg1Y8rYzjto1ccQu",
          "resolutionOptions": {}
        }
      ],
      "deactivated": [
        {
          "did": "did:y:z2J9gcGbsEDUmANXS8iJTVefK5t4eCx9x5k8jr8EyXWekTiEet6Jt6gwup2aWawzhHyMadvVMFcQ3ruwqg1Y8rYzjto1ccQu",
          "resolutionOptions": {}
        }
      ]
    }
  }]

LICENSE

BSD-3-Clause Copyright 2022-2025 Digital Bazaar, Inc.

Releases

No releases published

Packages

 
 
 

Contributors