Skip to content

Commit

Permalink
Add DidWeb as a default resolover method (#827)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
LiranCohen authored Oct 23, 2024
1 parent 04216e4 commit 6a1ff24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dwn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -126,7 +126,7 @@ export class Dwn {
*/
public static async create(config: DwnConfig): Promise<Dwn> {
config.didResolver ??= new UniversalResolver({
didResolvers : [DidDht, DidJwk, DidKey ],
didResolvers : [ DidDht, DidJwk, DidKey, DidWeb ],
cache : new DidResolverCacheLevel({ location: 'RESOLVERCACHE' }),
});
config.tenantGate ??= new AllowAllTenantGate();
Expand Down

0 comments on commit 6a1ff24

Please sign in to comment.