From 1f05da465a1a6373dfe70afcf8eb5b69c8b61c97 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Sat, 24 Aug 2024 15:52:32 +0530 Subject: [PATCH] Add resolveResource api Signed-off-by: DaevMithran --- packages/cheqd/src/CheqdApi.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) + } }