@sphereon/ssi-sdk.oid4vci-holder 0.34.1-fix.223 → 0.34.1-fix.226
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.cjs +5 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -16
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
- package/src/agent/OID4VCIHolder.ts +10 -17
- package/src/services/OID4VCIHolderService.ts +0 -3
package/dist/index.cjs
CHANGED
|
@@ -1890,9 +1890,6 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
|
|
|
1890
1890
|
}
|
|
1891
1891
|
__name(createIdFromTypes, "createIdFromTypes");
|
|
1892
1892
|
if (configurationId) {
|
|
1893
|
-
if (!format) {
|
|
1894
|
-
return Promise.reject(Error("format parameter missing from input"));
|
|
1895
|
-
}
|
|
1896
1893
|
const allSupported2 = client.getCredentialsSupported(format);
|
|
1897
1894
|
return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
|
|
1898
1895
|
}
|
|
@@ -2370,7 +2367,6 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2370
2367
|
formats = Array.from(new Set(authFormats));
|
|
2371
2368
|
}
|
|
2372
2369
|
let oid4vciClient;
|
|
2373
|
-
let types = void 0;
|
|
2374
2370
|
let offer;
|
|
2375
2371
|
if (requestData.existingClientState) {
|
|
2376
2372
|
oid4vciClient = await import_oid4vci_client3.OpenID4VCIClient.fromState({
|
|
@@ -2406,23 +2402,18 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2406
2402
|
});
|
|
2407
2403
|
}
|
|
2408
2404
|
}
|
|
2405
|
+
let configurationIds = [];
|
|
2409
2406
|
if (offer) {
|
|
2410
|
-
|
|
2411
|
-
const config = oid4vciClient.endpointMetadata.credentialIssuerMetadata?.credential_configurations_supported[configId];
|
|
2412
|
-
return config ? [
|
|
2413
|
-
config
|
|
2414
|
-
] : [];
|
|
2415
|
-
});
|
|
2416
|
-
types = credentialsSupported2.map((credentialSupported) => (0, import_oid4vci_common4.getTypesFromCredentialSupported)(credentialSupported));
|
|
2407
|
+
configurationIds = offer.original_credential_offer.credential_configuration_ids;
|
|
2417
2408
|
} else {
|
|
2418
|
-
|
|
2409
|
+
configurationIds = (0, import_utils2.asArray)(authorizationRequestOpts.authorizationDetails).filter((authDetails) => typeof authDetails !== "string").map((authReqOpts) => authReqOpts.credential_configuration_id).filter((id) => !!id);
|
|
2419
2410
|
}
|
|
2420
|
-
const serverMetadata = await oid4vciClient.retrieveServerMetadata();
|
|
2421
2411
|
const credentialsSupported = await getCredentialConfigsSupportedMerged({
|
|
2422
2412
|
client: oid4vciClient,
|
|
2423
2413
|
vcFormatPreferences: formats,
|
|
2424
|
-
|
|
2414
|
+
configurationIds
|
|
2425
2415
|
});
|
|
2416
|
+
const serverMetadata = await oid4vciClient.retrieveServerMetadata();
|
|
2426
2417
|
const credentialBranding = await getCredentialBranding({
|
|
2427
2418
|
credentialsSupported,
|
|
2428
2419
|
context
|