Skip to content

Commit

Permalink
Add resolveResource api
Browse files Browse the repository at this point in the history
Signed-off-by: DaevMithran <[email protected]>
  • Loading branch information
DaevMithran committed Aug 24, 2024
1 parent 81252db commit 1f05da4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/cheqd/src/CheqdApi.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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)
}
}

0 comments on commit 1f05da4

Please sign in to comment.