From caa7b8011640c7a2edb213429114a0a0b0414542 Mon Sep 17 00:00:00 2001 From: Tom Lanser Date: Mon, 7 Oct 2024 15:07:47 +0200 Subject: [PATCH] feat: Also add correlationId Signed-off-by: Tom Lanser --- packages/core/src/modules/vc/W3cCredentialServiceOptions.ts | 3 ++- packages/core/src/modules/vc/jwt-vc/W3cJwtCredentialService.ts | 1 + packages/core/src/modules/x509/X509ModuleConfig.ts | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/src/modules/vc/W3cCredentialServiceOptions.ts b/packages/core/src/modules/vc/W3cCredentialServiceOptions.ts index caaaab7eb..ef732e76d 100644 --- a/packages/core/src/modules/vc/W3cCredentialServiceOptions.ts +++ b/packages/core/src/modules/vc/W3cCredentialServiceOptions.ts @@ -181,7 +181,8 @@ interface W3cVerifyPresentationOptionsBase { export interface W3cJwtVerifyPresentationOptions extends W3cVerifyPresentationOptionsBase { presentation: W3cJwtVerifiablePresentation | string // string must be encoded VP JWT - proofRecordId: string + proofRecordId?: string + correlationId?: string } export interface W3cJsonLdVerifyPresentationOptions extends W3cVerifyPresentationOptionsBase { diff --git a/packages/core/src/modules/vc/jwt-vc/W3cJwtCredentialService.ts b/packages/core/src/modules/vc/jwt-vc/W3cJwtCredentialService.ts index 12f9ed2c6..b1a641276 100644 --- a/packages/core/src/modules/vc/jwt-vc/W3cJwtCredentialService.ts +++ b/packages/core/src/modules/vc/jwt-vc/W3cJwtCredentialService.ts @@ -322,6 +322,7 @@ export class W3cJwtCredentialService { jwkResolver: () => proverPublicJwk, trustedCertificates: await getTrustedCertificatesForProof?.(agentContext, { proofRecordId: options.proofRecordId, + correlationId: options.correlationId, }), }) diff --git a/packages/core/src/modules/x509/X509ModuleConfig.ts b/packages/core/src/modules/x509/X509ModuleConfig.ts index 10a2b82ed..db475efe8 100644 --- a/packages/core/src/modules/x509/X509ModuleConfig.ts +++ b/packages/core/src/modules/x509/X509ModuleConfig.ts @@ -1,7 +1,8 @@ import type { AgentContext } from '../../agent' type GetTrustedCertificatesForProofOptions = { - proofRecordId: string + proofRecordId?: string + correlationId?: string } export interface X509ModuleConfigOptions {