diff --git a/packages/cheqd/src/CheqdApi.ts b/packages/cheqd/src/CheqdApi.ts index 3afe052587..205707d814 100644 --- a/packages/cheqd/src/CheqdApi.ts +++ b/packages/cheqd/src/CheqdApi.ts @@ -1,7 +1,7 @@ import { AgentContext } from '@credo-ts/core' import { injectable } from 'tsyringe' -import { CheqdCreateResourceOptions, CheqdDidRegistrar } from './dids' +import { CheqdCreateResourceOptions, CheqdDidRegistrar, CheqdDidResolver } from './dids' @injectable() export class CheqdApi { @@ -15,4 +15,9 @@ export class CheqdApi { const cheqdDidRegistrar = this.agentContext.dependencyManager.resolve(CheqdDidRegistrar) return await cheqdDidRegistrar.createResource(this.agentContext, did, options) } + + public async resolveResource(resourceUrl: string) { + const cheqdDidResolver = this.agentContext.dependencyManager.resolve(CheqdDidResolver) + return await cheqdDidResolver.resolveResource(this.agentContext, resourceUrl) + } }