@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.js
CHANGED
|
@@ -978,7 +978,7 @@ var OID4VCIMachine = class {
|
|
|
978
978
|
|
|
979
979
|
// src/services/OID4VCIHolderService.ts
|
|
980
980
|
import { LOG } from "@sphereon/oid4vci-client";
|
|
981
|
-
import { getSupportedCredentials, getTypesFromCredentialSupported, getTypesFromObject
|
|
981
|
+
import { getSupportedCredentials, getTypesFromCredentialSupported, getTypesFromObject } from "@sphereon/oid4vci-common";
|
|
982
982
|
import { KeyUse } from "@sphereon/ssi-sdk-ext.did-resolver-jwk";
|
|
983
983
|
import { getOrCreatePrimaryIdentifier, SupportedDidMethodEnum } from "@sphereon/ssi-sdk-ext.did-utils";
|
|
984
984
|
import { isIIdentifier, isManagedIdentifierDidResult, isManagedIdentifierResult, managedIdentifierToJwk } from "@sphereon/ssi-sdk-ext.identifier-resolution";
|
|
@@ -1810,24 +1810,22 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
|
|
|
1810
1810
|
}
|
|
1811
1811
|
__name(createIdFromTypes, "createIdFromTypes");
|
|
1812
1812
|
if (configurationId) {
|
|
1813
|
-
|
|
1813
|
+
if (!format) {
|
|
1814
|
+
return Promise.reject(Error("format parameter missing from input"));
|
|
1815
|
+
}
|
|
1816
|
+
const allSupported2 = client.getCredentialsSupported(format);
|
|
1814
1817
|
return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
|
|
1815
1818
|
}
|
|
1816
|
-
if (!
|
|
1817
|
-
return Promise.reject(Error("openID4VCIClient has no credentialOffer
|
|
1819
|
+
if (!client.credentialOffer) {
|
|
1820
|
+
return Promise.reject(Error("openID4VCIClient has no credentialOffer"));
|
|
1818
1821
|
}
|
|
1819
|
-
if (!
|
|
1820
|
-
|
|
1821
|
-
format = client.credentialOffer.credential_offer.credentials.filter((cred) => typeof cred !== "string").map((cred) => cred.format);
|
|
1822
|
-
if (format?.length === 0) {
|
|
1823
|
-
format = void 0;
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1822
|
+
if (!types) {
|
|
1823
|
+
return Promise.reject(Error("openID4VCIClient has no types"));
|
|
1826
1824
|
}
|
|
1827
1825
|
const offerSupported = getSupportedCredentials({
|
|
1828
|
-
types:
|
|
1826
|
+
types: [
|
|
1829
1827
|
types
|
|
1830
|
-
]
|
|
1828
|
+
],
|
|
1831
1829
|
format,
|
|
1832
1830
|
version: client.version(),
|
|
1833
1831
|
issuerMetadata: client.endpointMetadata.credentialIssuerMetadata
|
|
@@ -2002,7 +2000,7 @@ var getIssuanceCryptoSuite = /* @__PURE__ */ __name(async (opts) => {
|
|
|
2002
2000
|
case "jwt":
|
|
2003
2001
|
case "jwt_vc_json":
|
|
2004
2002
|
case "jwt_vc":
|
|
2005
|
-
case
|
|
2003
|
+
//case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
|
|
2006
2004
|
case "dc+sd-jwt":
|
|
2007
2005
|
case "mso_mdoc": {
|
|
2008
2006
|
const supportedPreferences = jwtCryptographicSuitePreferences.filter((suite) => signing_algs_supported.includes(suite));
|