@openid4vc/openid4vci 0.3.0-alpha-20250328114752 → 0.3.0-alpha-20250329202257
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.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1396,15 +1396,15 @@ async function retrieveCredentials(options) {
|
|
|
1396
1396
|
);
|
|
1397
1397
|
if (credentialRequest.proofs) {
|
|
1398
1398
|
const { batch_credential_issuance } = options.issuerMetadata.credentialIssuer;
|
|
1399
|
-
if (
|
|
1399
|
+
if (options.issuerMetadata.originalDraftVersion === "Draft11" /* Draft11 */) {
|
|
1400
1400
|
throw new Oauth2Error4(
|
|
1401
1401
|
`Credential issuer '${options.issuerMetadata.credentialIssuer.credential_issuer}' does not support batch credential issuance using the 'proofs' request property. Only 'proof' is supported.`
|
|
1402
1402
|
);
|
|
1403
1403
|
}
|
|
1404
1404
|
const proofs = Object.values(credentialRequest.proofs)[0];
|
|
1405
|
-
if (proofs.length > batch_credential_issuance
|
|
1405
|
+
if (proofs.length > (batch_credential_issuance?.batch_size ?? 1)) {
|
|
1406
1406
|
throw new Oauth2Error4(
|
|
1407
|
-
`Credential issuer '${options.issuerMetadata.credentialIssuer.credential_issuer}' supports batch issuance, but the max batch size is '${batch_credential_issuance
|
|
1407
|
+
`Credential issuer '${options.issuerMetadata.credentialIssuer.credential_issuer}' supports batch issuance, but the max batch size is '${batch_credential_issuance?.batch_size ?? 1}'. A total of '${proofs.length}' proofs were provided.`
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|