@openid4vc/openid4vp 0.3.0-alpha-20250511130123 → 0.3.0-alpha-20250511195407

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1292,7 +1292,7 @@ import {
1292
1292
  Oauth2ServerErrorResponseError as Oauth2ServerErrorResponseError11,
1293
1293
  fetchJwks
1294
1294
  } from "@openid4vc/oauth2";
1295
- import { dateToSeconds as dateToSeconds3 } from "@openid4vc/utils";
1295
+ import { dateToSeconds as dateToSeconds3, encodeToBase64Url } from "@openid4vc/utils";
1296
1296
 
1297
1297
  // ../utils/src/date.ts
1298
1298
  function addSecondsToDate2(date, seconds) {
@@ -1470,8 +1470,8 @@ async function createOpenid4vpAuthorizationResponse(options) {
1470
1470
  jweEncryptor: jarm?.encryption && (supportedJarmMetadata.type === "encrypt" || supportedJarmMetadata.type === "sign_encrypt") ? {
1471
1471
  method: "jwk",
1472
1472
  publicJwk: clientMetaJwks.encJwk,
1473
- apu: jarm.encryption?.nonce,
1474
- apv: authorizationRequestPayload.nonce,
1473
+ apu: jarm.encryption.nonce ? encodeToBase64Url(jarm.encryption.nonce) : void 0,
1474
+ apv: encodeToBase64Url(authorizationRequestPayload.nonce),
1475
1475
  alg: supportedJarmMetadata.client_metadata.authorization_encrypted_response_alg,
1476
1476
  enc: supportedJarmMetadata.client_metadata.authorization_encrypted_response_enc
1477
1477
  } : void 0,
@@ -1774,7 +1774,7 @@ import {
1774
1774
  Oauth2ErrorCodes as Oauth2ErrorCodes11,
1775
1775
  Oauth2ServerErrorResponseError as Oauth2ServerErrorResponseError13
1776
1776
  } from "@openid4vc/oauth2";
1777
- import { decodeUtf8String, encodeToBase64Url } from "@openid4vc/utils";
1777
+ import { decodeUtf8String, encodeToBase64Url as encodeToBase64Url2 } from "@openid4vc/utils";
1778
1778
  async function verifyTransactionData(options) {
1779
1779
  const parsedTransactionData = parseTransactionData({
1780
1780
  transactionData: options.transactionData
@@ -1801,7 +1801,7 @@ async function verifyTransactionDataEntry({
1801
1801
  );
1802
1802
  const hashes = {};
1803
1803
  for (const alg of supportedAlgs) {
1804
- hashes[alg] = encodeToBase64Url(await callbacks.hash(decodeUtf8String(entry.encoded), alg));
1804
+ hashes[alg] = encodeToBase64Url2(await callbacks.hash(decodeUtf8String(entry.encoded), alg));
1805
1805
  }
1806
1806
  for (const credentialId of entry.transactionData.credential_ids) {
1807
1807
  const transactionDataHashesCredential = credentials[credentialId];