diff --git a/packages/agent/src/agent-did-resolver-cache.ts b/packages/agent/src/agent-did-resolver-cache.ts index a10d325d9..15ea9006a 100644 --- a/packages/agent/src/agent-did-resolver-cache.ts +++ b/packages/agent/src/agent-did-resolver-cache.ts @@ -1,5 +1,5 @@ -import { DidResolutionResult, DidResolverCache, DidResolverCacheLevel, DidResolverCacheLevelParams } from "@web5/dids"; -import { Web5PlatformAgent } from "./types/agent.js"; +import { DidResolutionResult, DidResolverCache, DidResolverCacheLevel, DidResolverCacheLevelParams } from '@web5/dids'; +import { Web5PlatformAgent } from './types/agent.js'; export class AgentDidResolverCache extends DidResolverCacheLevel implements DidResolverCache { @@ -15,8 +15,8 @@ export class AgentDidResolverCache extends DidResolverCacheLevel implements DidR get agent() { if (!this._agent) { - throw new Error("Agent not initialized"); - } + throw new Error('Agent not initialized'); + } return this._agent; } @@ -36,7 +36,7 @@ export class AgentDidResolverCache extends DidResolverCacheLevel implements DidR if (!result.didResolutionMetadata.error) { this.set(did, result); } - }).finally(() => delete this._resolving[did]) + }).finally(() => delete this._resolving[did]); } else { delete this._resolving[did]; diff --git a/packages/agent/src/did-api.ts b/packages/agent/src/did-api.ts index 4df8c896b..63e06f6cc 100644 --- a/packages/agent/src/did-api.ts +++ b/packages/agent/src/did-api.ts @@ -89,7 +89,7 @@ export interface DidApiParams { /** * An optional `AgentDidResolverCache` instance used for caching resolved DID documents. - * + * * If omitted, the default LevelDB and parameters are used to create a new cache instance. */ resolverCache?: DidResolverCache; @@ -128,8 +128,8 @@ export class AgentDidApi this._cache = resolverCache ?? new AgentDidResolverCache({ location: 'DATA/AGENT/DID_CACHE' }); this._resolver = new UniversalResolver({ - cache: this._cache, - didResolvers: didMethods + cache : this._cache, + didResolvers : didMethods }); this._agent = agent;