From efc134ef41bdbd3128c0e3cbde124db31c0b1259 Mon Sep 17 00:00:00 2001 From: David McFadzean Date: Wed, 26 Nov 2025 10:29:44 -0500 Subject: [PATCH 1/2] Added MDIP --- .../suites/did-consumption/default.js | 1 + .../suites/did-core-properties/default.js | 1 + .../suites/did-identifier/default.js | 1 + .../suites/did-resolution/default.js | 3 +- .../suites/implementations/did-mdip.json | 59 ++++++++++ .../implementations/resolver-did-mdip.json | 110 ++++++++++++++++++ 6 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 packages/did-core-test-server/suites/implementations/did-mdip.json create mode 100644 packages/did-core-test-server/suites/implementations/resolver-did-mdip.json diff --git a/packages/did-core-test-server/suites/did-consumption/default.js b/packages/did-core-test-server/suites/did-consumption/default.js index d92f1a1..3917998 100644 --- a/packages/did-core-test-server/suites/did-consumption/default.js +++ b/packages/did-core-test-server/suites/did-consumption/default.js @@ -47,6 +47,7 @@ module.exports = { require('../implementations/did-knox.json'), require('../implementations/did-webvh-dif-py.json'), require('../implementations/did-webvh-dif-ts.json'), + require('../implementations/did-mdip.json'), ...brokenFixtures ] }; diff --git a/packages/did-core-test-server/suites/did-core-properties/default.js b/packages/did-core-test-server/suites/did-core-properties/default.js index 1234f88..02cc731 100644 --- a/packages/did-core-test-server/suites/did-core-properties/default.js +++ b/packages/did-core-test-server/suites/did-core-properties/default.js @@ -47,6 +47,7 @@ module.exports = { require('../implementations/did-knox.json'), require('../implementations/did-webvh-dif-py.json'), require('../implementations/did-webvh-dif-ts.json'), + require('../implementations/did-mdip.json'), ...brokenFixtures ], }; diff --git a/packages/did-core-test-server/suites/did-identifier/default.js b/packages/did-core-test-server/suites/did-identifier/default.js index 7831f2b..9c24ba1 100644 --- a/packages/did-core-test-server/suites/did-identifier/default.js +++ b/packages/did-core-test-server/suites/did-identifier/default.js @@ -49,6 +49,7 @@ module.exports = { require('../implementations/did-knox.json'), require('../implementations/did-webvh-dif-py.json'), require('../implementations/did-webvh-dif-ts.json'), + require('../implementations/did-mdip.json'), ...brokenFixtures ], }; diff --git a/packages/did-core-test-server/suites/did-resolution/default.js b/packages/did-core-test-server/suites/did-resolution/default.js index dc9d4cc..587938c 100644 --- a/packages/did-core-test-server/suites/did-resolution/default.js +++ b/packages/did-core-test-server/suites/did-resolution/default.js @@ -43,7 +43,7 @@ module.exports = { require('../implementations/universal-resolver-did-work.json'), require('../implementations/universal-resolver-resolver-tests.json'), require('../implementations/universal-resolver-did-art.json'), - require('../implementations/universal-resolver-did-rm.json'), + require('../implementations/universal-resolver-did-rm.json'), require('../implementations/universal-resolver-did-knox.json'), require('../implementations/universal-resolver-did-webvh.json'), require('../implementations/resolver-did-orb.json'), @@ -62,6 +62,7 @@ module.exports = { require('../implementations/resolver-ssb.json'), require('../implementations/resolver-did-cheqd.json'), require('../implementations/resolver-knox.json'), + require('../implementations/resolver-did-mdip.json'), ...brokenFixtures ], }; diff --git a/packages/did-core-test-server/suites/implementations/did-mdip.json b/packages/did-core-test-server/suites/implementations/did-mdip.json new file mode 100644 index 0000000..1ccb6a2 --- /dev/null +++ b/packages/did-core-test-server/suites/implementations/did-mdip.json @@ -0,0 +1,59 @@ +{ + "didMethod": "did:mdip", + "implementation": "MDIP DID Method", + "implementer": "Self ID", + "supportedContentTypes": [ + "application/did+json" + ], + "dids": [ + "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb" + ], + "didParameters": { + "atVersion": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb?atVersion=1", + "atTime": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb?atTime=2025-11-24T20:36:52Z" + }, + "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb": { + "didDocumentDataModel": { + "properties": { + "id": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "verificationMethod": [ + { + "id": "#key-1", + "controller": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "type": "EcdsaSecp256k1VerificationKey2019", + "publicKeyJwk": { + "kty": "EC", + "crv": "secp256k1", + "x": "rRYs-Obi7HSuk7Jwns8mbW96Yb2m97ORQ4PqzRkFLAc", + "y": "gWAYGcry2GrHRvaAdZLUeXuTxikb_g0v0I_gnqD8IL4" + } + } + ], + "authentication": [ + "#key-1" + ], + "bespokeDatetime": "2020-09-26T20:14:02Z", + "bespokeDouble": 1.2, + "bespokeInteger": 5, + "bespokeBoolean": true, + "bespokeNull": null + } + }, + "application/did+json": { + "didDocumentDataModel": { + "representationSpecificEntries": {} + }, + "representation": "{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"verificationMethod\":[{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb#key-0\",\"type\":\"JsonWebKey2020\",\"controller\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"publicKeyJwk\":{\"kty\":\"OKP\",\"crv\":\"Ed25519\",\"x\":\"VDXDwuGKVq91zxU6q7__jLDUq8_C5cuxECgd-1feFTE\"}},{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb#key-1\",\"type\":\"JsonWebKey2020\",\"controller\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"publicKeyJwk\":{\"kty\":\"OKP\",\"crv\":\"X25519\",\"x\":\"3kY9jl1by7pLzgJktUH-e9H6fihdVUb00-sTzkfmIl8\"}}],\"authentication\":[\"#key-0\"],\"assertionMethod\":[\"#key-0\"],\"capabilityInvocation\":[\"#key-0\"],\"capabilityDelegation\":[\"#key-0\"],\"keyAgreement\":[\"#key-1\"],\"bespokeDatetime\":\"2020-09-26T20:14:02Z\",\"bespokeDouble\":1.2,\"bespokeInteger\":5,\"bespokeBoolean\":true,\"bespokeNull\":null}", + "didDocumentMetadata": { + "created": "2025-11-24T20:36:52Z", + "versionId": "z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "version": "1", + "confirmed": true, + "isOwned": true + }, + "didResolutionMetadata": { + "contentType": "application/did+json" + } + } + } +} diff --git a/packages/did-core-test-server/suites/implementations/resolver-did-mdip.json b/packages/did-core-test-server/suites/implementations/resolver-did-mdip.json new file mode 100644 index 0000000..ccd5b3d --- /dev/null +++ b/packages/did-core-test-server/suites/implementations/resolver-did-mdip.json @@ -0,0 +1,110 @@ +{ + "didMethod": "did:mdip", + "implementation": "DID MDIP Test Suite", + "implementer": "Self ID", + "expectedOutcomes": { + "defaultOutcome": [ + 0, + 2 + ], + "invalidDidErrorOutcome": [], + "notFoundErrorOutcome": [], + "representationNotSupportedErrorOutcome": [], + "deactivatedOutcome": [ + 1 + ] + }, + "executions": [ + { + "function": "resolve", + "input": { + "did": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "resolutionOptions": {} + }, + "output": { + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": {}, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1" + ], + "id": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "verificationMethod": [ + { + "id": "#key-1", + "controller": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "type": "EcdsaSecp256k1VerificationKey2019", + "publicKeyJwk": { + "kty": "EC", + "crv": "secp256k1", + "x": "rRYs-Obi7HSuk7Jwns8mbW96Yb2m97ORQ4PqzRkFLAc", + "y": "gWAYGcry2GrHRvaAdZLUeXuTxikb_g0v0I_gnqD8IL4" + } + } + ], + "authentication": [ + "#key-1" + ] + }, + "didDocumentMetadata": { + "created": "2025-11-24T20:36:52Z", + "versionId": "z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "version": 1, + "confirmed": true, + "isOwned": true + }, + "didDocumentData": {}, + "mdip": { + "version": 1, + "type": "agent", + "registry": "hyperswarm" + } + } + }, + { + "function": "resolve", + "input": { + "did": "did:mdip:z3v8AuahkSHcnQsmZ7hExbAXnDCXFQmgy4eM7MYRxYzJzRSQXRo", + "resolutionOptions": {} + }, + "output": { + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": {}, + "didDocument": { + "id": "did:mdip:z3v8AuahkSHcnQsmZ7hExbAXnDCXFQmgy4eM7MYRxYzJzRSQXRo" + }, + "didDocumentMetadata": { + "deactivated": true, + "created": "2025-11-24T20:39:44Z", + "deleted": "2025-11-24T20:39:57Z", + "versionId": "z3v8Auae2mC5d2moXWVcNRQhKgK34K8NbFLFwX5anf6qdRkbsFX", + "version": 2, + "confirmed": false, + "isOwned": true + }, + "didDocumentData": {}, + "mdip": { + "version": 1, + "type": "asset", + "registry": "hyperswarm" + } + } + }, + { + "function": "resolveRepresentation", + "input": { + "did": "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "resolutionOptions": { + "accept": "application/did+json" + } + }, + "output": { + "didResolutionMetadata": { + "contentType": "application/did+json" + }, + "didDocumentStream": "{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"verificationMethod\":[],\"service\":[]}", + "didDocumentMetadata": {} + } + } + ] +} From 85bb968eee0e0447823c6d8a362ca64a998ab60b Mon Sep 17 00:00:00 2001 From: David McFadzean Date: Wed, 26 Nov 2025 10:56:02 -0500 Subject: [PATCH 2/2] Added did+ld+json representation --- .../suites/implementations/did-mdip.json | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/packages/did-core-test-server/suites/implementations/did-mdip.json b/packages/did-core-test-server/suites/implementations/did-mdip.json index 1ccb6a2..995383c 100644 --- a/packages/did-core-test-server/suites/implementations/did-mdip.json +++ b/packages/did-core-test-server/suites/implementations/did-mdip.json @@ -3,7 +3,8 @@ "implementation": "MDIP DID Method", "implementer": "Self ID", "supportedContentTypes": [ - "application/did+json" + "application/did+json", + "application/did+ld+json" ], "dids": [ "did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb" @@ -31,29 +32,44 @@ ], "authentication": [ "#key-1" - ], - "bespokeDatetime": "2020-09-26T20:14:02Z", - "bespokeDouble": 1.2, - "bespokeInteger": 5, - "bespokeBoolean": true, - "bespokeNull": null + ] } }, "application/did+json": { "didDocumentDataModel": { "representationSpecificEntries": {} }, - "representation": "{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"verificationMethod\":[{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb#key-0\",\"type\":\"JsonWebKey2020\",\"controller\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"publicKeyJwk\":{\"kty\":\"OKP\",\"crv\":\"Ed25519\",\"x\":\"VDXDwuGKVq91zxU6q7__jLDUq8_C5cuxECgd-1feFTE\"}},{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb#key-1\",\"type\":\"JsonWebKey2020\",\"controller\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"publicKeyJwk\":{\"kty\":\"OKP\",\"crv\":\"X25519\",\"x\":\"3kY9jl1by7pLzgJktUH-e9H6fihdVUb00-sTzkfmIl8\"}}],\"authentication\":[\"#key-0\"],\"assertionMethod\":[\"#key-0\"],\"capabilityInvocation\":[\"#key-0\"],\"capabilityDelegation\":[\"#key-0\"],\"keyAgreement\":[\"#key-1\"],\"bespokeDatetime\":\"2020-09-26T20:14:02Z\",\"bespokeDouble\":1.2,\"bespokeInteger\":5,\"bespokeBoolean\":true,\"bespokeNull\":null}", + "representation": "{\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"verificationMethod\":[{\"id\":\"#key-1\",\"controller\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"type\":\"EcdsaSecp256k1VerificationKey2019\",\"publicKeyJwk\":{\"kty\":\"EC\",\"crv\":\"secp256k1\",\"x\":\"rRYs-Obi7HSuk7Jwns8mbW96Yb2m97ORQ4PqzRkFLAc\",\"y\":\"gWAYGcry2GrHRvaAdZLUeXuTxikb_g0v0I_gnqD8IL4\"}}],\"authentication\":[\"#key-1\"]}", "didDocumentMetadata": { - "created": "2025-11-24T20:36:52Z", - "versionId": "z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", - "version": "1", - "confirmed": true, - "isOwned": true + "created": "2025-11-24T20:36:52Z", + "versionId": "z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "version": "1", + "confirmed": true, + "isOwned": true }, "didResolutionMetadata": { "contentType": "application/did+json" } + }, + "application/did+ld+json": { + "didDocumentDataModel": { + "representationSpecificEntries": { + "@context": [ + "https://www.w3.org/ns/did/v1" + ] + } + }, + "representation": "{\"@context\":[\"https://www.w3.org/ns/did/v1\"],\"id\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"verificationMethod\":[{\"id\":\"#key-1\",\"controller\":\"did:mdip:z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb\",\"type\":\"EcdsaSecp256k1VerificationKey2019\",\"publicKeyJwk\":{\"kty\":\"EC\",\"crv\":\"secp256k1\",\"x\":\"rRYs-Obi7HSuk7Jwns8mbW96Yb2m97ORQ4PqzRkFLAc\",\"y\":\"gWAYGcry2GrHRvaAdZLUeXuTxikb_g0v0I_gnqD8IL4\"}}],\"authentication\":[\"#key-1\"]}", + "didDocumentMetadata": { + "created": "2025-11-24T20:36:52Z", + "versionId": "z3v8AuacfyAXsREoDzbCMvvdjSpwegxkZdDHhhFTrvNaFvE5dHb", + "version": "1", + "confirmed": true, + "isOwned": true + }, + "didResolutionMetadata": { + "contentType": "application/did+ld+json" + } } } }