diff --git a/README.md b/README.md index a1ff3b28..f6e74e6b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ the registry looks like this: { "@context": [ "https://www.w3.org/ns/did/v1", - "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld" + "https://w3id.org/security/suites/secp256k1recovery-2020/v2" ], "id": "did:ethr:0xb9c5714089478a327f09197987f16f9e5d936e8a", "verificationMethod": [ diff --git a/doc/did-method-spec.md b/doc/did-method-spec.md index 9cd94588..a75e32cf 100644 --- a/doc/did-method-spec.md +++ b/doc/did-method-spec.md @@ -74,7 +74,7 @@ To enable JSON-LD processing, the `@context` used when constructing DID document ```javascript "@context": [ "https://www.w3.org/ns/did/v1", - "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld" + "https://w3id.org/security/suites/secp256k1recovery-2020/v2" ] ``` @@ -149,7 +149,7 @@ The default DID document for an `did:ethr` on mainnet, e.g. { "@context": [ "https://www.w3.org/ns/did/v1", - "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld" + "https://w3id.org/security/suites/secp256k1recovery-2020/v2" ], "id": "did:ethr:0xb9c5714089478a327f09197987f16f9e5d936e8a", "verificationMethod": [ @@ -172,7 +172,7 @@ looks like this: { "@context": [ "https://www.w3.org/ns/did/v1", - "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld" + "https://w3id.org/security/suites/secp256k1recovery-2020/v2" ], "id": "did:ethr:0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "verificationMethod": [ diff --git a/src/__tests__/networks.integration.test.ts b/src/__tests__/networks.integration.test.ts index 3950cb98..4db524b2 100644 --- a/src/__tests__/networks.integration.test.ts +++ b/src/__tests__/networks.integration.test.ts @@ -24,7 +24,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: 'did:ethr:0x26bf14321004e770e7a8b080b7a526d8eed8b388', verificationMethod: [ @@ -54,7 +54,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -84,7 +84,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -114,7 +114,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -142,7 +142,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -170,7 +170,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -198,7 +198,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -244,7 +244,7 @@ describe('ethrResolver (alt-chains)', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ diff --git a/src/__tests__/resolver.test.ts b/src/__tests__/resolver.test.ts index 3376426a..22735146 100644 --- a/src/__tests__/resolver.test.ts +++ b/src/__tests__/resolver.test.ts @@ -54,7 +54,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -81,7 +81,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: pubdid, verificationMethod: [ @@ -117,7 +117,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -142,7 +142,7 @@ describe('ethrResolver', () => { expect(didDocument).toEqual({ '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: pubdid, verificationMethod: [ @@ -176,7 +176,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -214,7 +214,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: did, verificationMethod: [ @@ -891,7 +891,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: virginDID, verificationMethod: [ @@ -923,7 +923,7 @@ describe('ethrResolver', () => { didDocument: { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', + 'https://w3id.org/security/suites/secp256k1recovery-2020/v2', ], id: deactivatedDid, verificationMethod: [ diff --git a/src/resolver.ts b/src/resolver.ts index d124d661..4d0fd305 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -121,10 +121,7 @@ export class EthrDidResolver { now: BigNumber ): { didDocument: DIDDocument; deactivated: boolean; versionId: number; nextVersionId: number } { const baseDIDDocument: DIDDocument = { - '@context': [ - 'https://www.w3.org/ns/did/v1', - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', - ], + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'], id: did, verificationMethod: [], authentication: [],