Skip to content

Commit

Permalink
feat: Include fetchRemoteContexts in verify apis (#305)
Browse files Browse the repository at this point in the history
* feat: Include fetchRemoteContexts in verify apis

* Switched to bubbled up lower-level args

---------

Co-authored-by: Tasos Derisiotis <50984242+Eengineer1@users.noreply.github.com>
  • Loading branch information
DaevMithran and Eengineer1 authored Jul 10, 2023
1 parent 8507a53 commit ae6632f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/agent/ICheqd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export interface ICheqdIssueSuspendableCredentialWithStatusList2021Args {

export interface ICheqdVerifyCredentialWithStatusList2021Args {
credential: W3CVerifiableCredential
policies?: VerificationPolicies
verificationArgs?: IVerifyCredentialArgs
fetchList?: boolean
encryptedSymmetricKey?: string
options?: ICheqdStatusList2021Options
Expand All @@ -316,8 +316,7 @@ export interface ICheqdVerifyCredentialWithStatusList2021Args {

export interface ICheqdVerifyPresentationWithStatusList2021Args {
presentation: VerifiablePresentation
domain?: string
policies?: VerificationPolicies
verificationArgs?: IVerifyPresentationArgs
fetchList?: boolean
encryptedSymmetricKey?: string
options?: ICheqdStatusList2021Options
Expand Down Expand Up @@ -1621,11 +1620,12 @@ export class Cheqd implements IAgentPlugin {
private async VerifyCredentialWithStatusList2021(args: ICheqdVerifyCredentialWithStatusList2021Args, context: IContext): Promise<VerificationResult> {
// verify default policies
const verificationResult = await context.agent.verifyCredential({
...args?.verificationArgs,
credential: args.credential,
policies: {
...args.policies,
...args?.verificationArgs?.policies,
credentialStatus: false
}
},
} satisfies IVerifyCredentialArgs)

// early return if verification failed
Expand All @@ -1652,12 +1652,12 @@ export class Cheqd implements IAgentPlugin {
private async VerifyPresentationWithStatusList2021(args: ICheqdVerifyPresentationWithStatusList2021Args, context: IContext): Promise<VerificationResult> {
// verify default policies
const verificationResult = await context.agent.verifyPresentation({
...args?.verificationArgs,
presentation: args.presentation,
domain: args.domain,
policies: {
...args.policies,
...args?.verificationArgs?.policies,
credentialStatus: false
}
},
} satisfies IVerifyPresentationArgs)

// early return if verification failed
Expand Down

0 comments on commit ae6632f

Please sign in to comment.