From 3add866e8dee7036fe584f976941c1e7cc4245ee Mon Sep 17 00:00:00 2001 From: phoebe-lew Date: Wed, 29 Nov 2023 10:31:47 +0000 Subject: [PATCH] resolve did:dht in VCs (#321) --- packages/credentials/src/verifiable-credential.ts | 4 ++-- packages/credentials/tests/verifiable-credential.spec.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/credentials/src/verifiable-credential.ts b/packages/credentials/src/verifiable-credential.ts index 0fc754f5d..4b8ef4a94 100644 --- a/packages/credentials/src/verifiable-credential.ts +++ b/packages/credentials/src/verifiable-credential.ts @@ -8,7 +8,7 @@ import { v4 as uuidv4 } from 'uuid'; import { getCurrentXmlSchema112Timestamp } from './utils.js'; import { Convert } from '@web5/common'; import { verifyJWT } from 'did-jwt'; -import { DidIonMethod, DidKeyMethod, DidResolver } from '@web5/dids'; +import { DidDhtMethod, DidIonMethod, DidKeyMethod, DidResolver } from '@web5/dids'; import { SsiValidator } from './validators.js'; export const DEFAULT_CONTEXT = 'https://www.w3.org/2018/credentials/v1'; @@ -62,7 +62,7 @@ type DecodedVcJwt = { signature: string } -const didResolver = new DidResolver({ didResolvers: [DidIonMethod, DidKeyMethod] }); +const didResolver = new DidResolver({ didResolvers: [DidIonMethod, DidKeyMethod, DidDhtMethod] }); class TbdResolver implements Resolvable { async resolve(didUrl: string): Promise { diff --git a/packages/credentials/tests/verifiable-credential.spec.ts b/packages/credentials/tests/verifiable-credential.spec.ts index d4f9bfbe0..3142e9c5a 100644 --- a/packages/credentials/tests/verifiable-credential.spec.ts +++ b/packages/credentials/tests/verifiable-credential.spec.ts @@ -16,7 +16,6 @@ describe('Verifiable Credential Tests', () => { ) {} } - beforeEach(async () => { const alice = await DidKeyMethod.create(); const [signingKeyPair] = alice.keySet.verificationMethodKeys!;