diff --git a/lib/PEX.ts b/lib/PEX.ts index e6d857d3..24328075 100644 --- a/lib/PEX.ts +++ b/lib/PEX.ts @@ -337,7 +337,7 @@ export class PEX { // aud MUST be set by the signer or provided by e.g. SIOP/OpenID4VP lib payload: { iat: new Date().getTime(), - _sd_hash: sdHash, + sd_hash: sdHash, }, } satisfies SdJwtKbJwtInput; @@ -526,7 +526,7 @@ export class PEX { payload: { iat: new Date().getTime(), nonce: proofOptions?.nonce, - _sd_hash: sdHash, + sd_hash: sdHash, }, } satisfies SdJwtKbJwtInput; diff --git a/lib/signing/types.ts b/lib/signing/types.ts index b2f84c12..61472200 100644 --- a/lib/signing/types.ts +++ b/lib/signing/types.ts @@ -90,7 +90,7 @@ export interface SdJwtKbJwtInput { }; payload: { iat: number; - _sd_hash: string; + sd_hash: string; nonce?: string; }; } diff --git a/test/SdJwt.spec.ts b/test/SdJwt.spec.ts index 72bb173a..bde09626 100644 --- a/test/SdJwt.spec.ts +++ b/test/SdJwt.spec.ts @@ -223,7 +223,7 @@ describe('evaluate', () => { payload: { iat: expect.any(Number), nonce: undefined, - _sd_hash: calculateSdHash(decodedSdJwtVcWithDisclosuresRemoved.compactSdJwtVc, 'sha-256', hasher), + sd_hash: calculateSdHash(decodedSdJwtVcWithDisclosuresRemoved.compactSdJwtVc, 'sha-256', hasher), }, }, });