From 6a1ff245742d8ebd6504b2b838f6da781fef54b2 Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Wed, 23 Oct 2024 14:38:24 -0400 Subject: [PATCH] Add DidWeb as a default resolover method (#827) This PR adds the `DidWeb` method as one of the default resolvers when using a DWN. After this PR the default resolvers will be: `DidJwk`, `DidKey`, `DidDht` and `DidWeb` --- src/dwn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dwn.ts b/src/dwn.ts index 01e2c82ae..47e7a8c3c 100644 --- a/src/dwn.ts +++ b/src/dwn.ts @@ -29,7 +29,7 @@ import { RecordsSubscribeHandler } from './handlers/records-subscribe.js'; import { RecordsWriteHandler } from './handlers/records-write.js'; import { ResumableTaskManager } from './core/resumable-task-manager.js'; import { StorageController } from './store/storage-controller.js'; -import { DidDht, DidJwk, DidKey, DidResolverCacheLevel, UniversalResolver } from '@web5/dids'; +import { DidDht, DidJwk, DidKey, DidResolverCacheLevel, DidWeb, UniversalResolver } from '@web5/dids'; import { DwnInterfaceName, DwnMethodName } from './enums/dwn-interface-method.js'; export class Dwn { @@ -126,7 +126,7 @@ export class Dwn { */ public static async create(config: DwnConfig): Promise { config.didResolver ??= new UniversalResolver({ - didResolvers : [DidDht, DidJwk, DidKey ], + didResolvers : [ DidDht, DidJwk, DidKey, DidWeb ], cache : new DidResolverCacheLevel({ location: 'RESOLVERCACHE' }), }); config.tenantGate ??= new AllowAllTenantGate();