@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.62.226 → 0.34.1-feature.SSISDK.62.239
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 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -12
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +9 -16
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ var require_nl = __commonJS({
|
|
|
56
56
|
|
|
57
57
|
// src/agent/OID4VCIHolder.ts
|
|
58
58
|
import { CredentialOfferClient, MetadataClient, OpenID4VCIClient as OpenID4VCIClient2 } from "@sphereon/oid4vci-client";
|
|
59
|
-
import { DefaultURISchemes,
|
|
59
|
+
import { DefaultURISchemes, getTypesFromObject as getTypesFromObject2 } from "@sphereon/oid4vci-common";
|
|
60
60
|
import { SupportedDidMethodEnum as SupportedDidMethodEnum2 } from "@sphereon/ssi-sdk-ext.did-utils";
|
|
61
61
|
import { isManagedIdentifierDidOpts, isManagedIdentifierDidResult as isManagedIdentifierDidResult2, isManagedIdentifierJwkResult, isManagedIdentifierKidResult, isManagedIdentifierResult as isManagedIdentifierResult2, isManagedIdentifierX5cOpts, isManagedIdentifierX5cResult } from "@sphereon/ssi-sdk-ext.identifier-resolution";
|
|
62
62
|
import { signatureAlgorithmFromKey } from "@sphereon/ssi-sdk-ext.key-utils";
|
|
@@ -2288,7 +2288,6 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2288
2288
|
formats = Array.from(new Set(authFormats));
|
|
2289
2289
|
}
|
|
2290
2290
|
let oid4vciClient;
|
|
2291
|
-
let types = void 0;
|
|
2292
2291
|
let offer;
|
|
2293
2292
|
if (requestData.existingClientState) {
|
|
2294
2293
|
oid4vciClient = await OpenID4VCIClient2.fromState({
|
|
@@ -2324,23 +2323,18 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2324
2323
|
});
|
|
2325
2324
|
}
|
|
2326
2325
|
}
|
|
2326
|
+
let configurationIds = [];
|
|
2327
2327
|
if (offer) {
|
|
2328
|
-
|
|
2329
|
-
const config = oid4vciClient.endpointMetadata.credentialIssuerMetadata?.credential_configurations_supported[configId];
|
|
2330
|
-
return config ? [
|
|
2331
|
-
config
|
|
2332
|
-
] : [];
|
|
2333
|
-
});
|
|
2334
|
-
types = credentialsSupported2.map((credentialSupported) => getTypesFromCredentialSupported2(credentialSupported));
|
|
2328
|
+
configurationIds = offer.original_credential_offer.credential_configuration_ids;
|
|
2335
2329
|
} else {
|
|
2336
|
-
|
|
2330
|
+
configurationIds = asArray2(authorizationRequestOpts.authorizationDetails).filter((authDetails) => typeof authDetails !== "string").map((authReqOpts) => authReqOpts.credential_configuration_id).filter((id) => !!id);
|
|
2337
2331
|
}
|
|
2338
|
-
const serverMetadata = await oid4vciClient.retrieveServerMetadata();
|
|
2339
2332
|
const credentialsSupported = await getCredentialConfigsSupportedMerged({
|
|
2340
2333
|
client: oid4vciClient,
|
|
2341
2334
|
vcFormatPreferences: formats,
|
|
2342
|
-
|
|
2335
|
+
configurationIds
|
|
2343
2336
|
});
|
|
2337
|
+
const serverMetadata = await oid4vciClient.retrieveServerMetadata();
|
|
2344
2338
|
const credentialBranding = await getCredentialBranding({
|
|
2345
2339
|
credentialsSupported,
|
|
2346
2340
|
context
|