@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.50.101 → 0.34.1-feature.SSISDK.50.117
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 +11 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -14
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/services/OID4VCIHolderService.ts +10 -23
- package/src/types/FirstPartyMachine.ts +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1890,24 +1890,22 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
|
|
|
1890
1890
|
}
|
|
1891
1891
|
__name(createIdFromTypes, "createIdFromTypes");
|
|
1892
1892
|
if (configurationId) {
|
|
1893
|
-
|
|
1893
|
+
if (!format) {
|
|
1894
|
+
return Promise.reject(Error("format parameter missing from input"));
|
|
1895
|
+
}
|
|
1896
|
+
const allSupported2 = client.getCredentialsSupported(format);
|
|
1894
1897
|
return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
|
|
1895
1898
|
}
|
|
1896
|
-
if (!
|
|
1897
|
-
return Promise.reject(Error("openID4VCIClient has no credentialOffer
|
|
1899
|
+
if (!client.credentialOffer) {
|
|
1900
|
+
return Promise.reject(Error("openID4VCIClient has no credentialOffer"));
|
|
1898
1901
|
}
|
|
1899
|
-
if (!
|
|
1900
|
-
|
|
1901
|
-
format = client.credentialOffer.credential_offer.credentials.filter((cred) => typeof cred !== "string").map((cred) => cred.format);
|
|
1902
|
-
if (format?.length === 0) {
|
|
1903
|
-
format = void 0;
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1902
|
+
if (!types) {
|
|
1903
|
+
return Promise.reject(Error("openID4VCIClient has no types"));
|
|
1906
1904
|
}
|
|
1907
1905
|
const offerSupported = (0, import_oid4vci_common3.getSupportedCredentials)({
|
|
1908
|
-
types:
|
|
1906
|
+
types: [
|
|
1909
1907
|
types
|
|
1910
|
-
]
|
|
1908
|
+
],
|
|
1911
1909
|
format,
|
|
1912
1910
|
version: client.version(),
|
|
1913
1911
|
issuerMetadata: client.endpointMetadata.credentialIssuerMetadata
|
|
@@ -2082,7 +2080,7 @@ var getIssuanceCryptoSuite = /* @__PURE__ */ __name(async (opts) => {
|
|
|
2082
2080
|
case "jwt":
|
|
2083
2081
|
case "jwt_vc_json":
|
|
2084
2082
|
case "jwt_vc":
|
|
2085
|
-
case
|
|
2083
|
+
//case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
|
|
2086
2084
|
case "dc+sd-jwt":
|
|
2087
2085
|
case "mso_mdoc": {
|
|
2088
2086
|
const supportedPreferences = jwtCryptographicSuitePreferences.filter((suite) => signing_algs_supported.includes(suite));
|