@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.17.bitstring.sl.9 → 0.34.1-feature.SSISDK.26.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.oid4vci-holder",
3
- "version": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
3
+ "version": "0.34.1-feature.SSISDK.26.48+3a1355b4",
4
4
  "source": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -26,27 +26,27 @@
26
26
  "build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
27
27
  },
28
28
  "dependencies": {
29
- "@sphereon/did-auth-siop": "0.19.0",
29
+ "@sphereon/did-auth-siop": "0.19.1-feature.SSISDK.26.23",
30
30
  "@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
31
- "@sphereon/oid4vci-client": "0.19.0",
32
- "@sphereon/oid4vci-common": "0.19.0",
33
- "@sphereon/ssi-sdk-ext.did-utils": "0.29.0",
34
- "@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.0",
35
- "@sphereon/ssi-sdk-ext.jwt-service": "0.29.0",
36
- "@sphereon/ssi-sdk-ext.key-utils": "0.29.0",
37
- "@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
38
- "@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
39
- "@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
40
- "@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
41
- "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
42
- "@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
43
- "@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
44
- "@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
45
- "@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
46
- "@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
47
- "@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
48
- "@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
49
- "@sphereon/ssi-types": "0.34.1-feature.SSISDK.17.bitstring.sl.9+a052acba",
31
+ "@sphereon/oid4vci-client": "0.19.1-feature.SSISDK.26.23",
32
+ "@sphereon/oid4vci-common": "0.19.1-feature.SSISDK.26.23",
33
+ "@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.26.48+3a1355b4",
34
+ "@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.26.48+3a1355b4",
35
+ "@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.26.48+3a1355b4",
36
+ "@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.26.48+3a1355b4",
37
+ "@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.26.48+3a1355b4",
38
+ "@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.26.48+3a1355b4",
39
+ "@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.26.48+3a1355b4",
40
+ "@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.26.48+3a1355b4",
41
+ "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.26.48+3a1355b4",
42
+ "@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.26.48+3a1355b4",
43
+ "@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.26.48+3a1355b4",
44
+ "@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.26.48+3a1355b4",
45
+ "@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.26.48+3a1355b4",
46
+ "@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.26.48+3a1355b4",
47
+ "@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.26.48+3a1355b4",
48
+ "@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.26.48+3a1355b4",
49
+ "@sphereon/ssi-types": "0.34.1-feature.SSISDK.26.48+3a1355b4",
50
50
  "@veramo/core": "4.2.0",
51
51
  "@veramo/data-store": "4.2.0",
52
52
  "@veramo/utils": "4.2.0",
@@ -58,8 +58,8 @@
58
58
  "xstate": "^4.38.3"
59
59
  },
60
60
  "devDependencies": {
61
- "@sphereon/oid4vc-common": "0.19.0",
62
- "@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.29.0",
61
+ "@sphereon/oid4vc-common": "0.19.1-feature.SSISDK.26.23",
62
+ "@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.26.48+3a1355b4",
63
63
  "@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
64
64
  "@types/i18n-js": "^3.8.9",
65
65
  "@types/lodash.memoize": "^4.1.9",
@@ -89,5 +89,5 @@
89
89
  "OID4VCI",
90
90
  "State Machine"
91
91
  ],
92
- "gitHead": "a052acbaa88acf4be22236ca3afaadd5b2821fe1"
92
+ "gitHead": "3a1355b4d72e107aaff8562dfe0fdf4296323589"
93
93
  }
@@ -4,8 +4,8 @@ import {
4
4
  AuthorizationRequestOpts,
5
5
  AuthorizationServerClientOpts,
6
6
  AuthorizationServerOpts,
7
- CredentialConfigurationSupportedJwtVcJsonLdAndLdpVcV1_0_13,
8
- CredentialDefinitionJwtVcJsonLdAndLdpVcV1_0_13,
7
+ CredentialConfigurationSupportedJwtVcJsonLdAndLdpVcV1_0_15,
8
+ CredentialDefinitionJwtVcJsonLdAndLdpVcV1_0_15,
9
9
  CredentialOfferRequestWithBaseUrl,
10
10
  DefaultURISchemes,
11
11
  EndpointMetadataResult,
@@ -229,7 +229,7 @@ export class OID4VCIHolder implements IAgentPlugin {
229
229
  oid4vciHolderStoreIssuerBranding: this.oid4vciHolderStoreIssuerBranding.bind(this),
230
230
  }
231
231
 
232
- private readonly vcFormatPreferences: Array<string> = ['vc+sd-jwt', 'mso_mdoc', 'jwt_vc_json', 'jwt_vc', 'ldp_vc']
232
+ private readonly vcFormatPreferences: Array<string> = ['dc+sd-jwt', 'mso_mdoc', 'jwt_vc_json', 'jwt_vc', 'ldp_vc']
233
233
  private readonly jsonldCryptographicSuitePreferences: Array<string> = [
234
234
  'Ed25519Signature2018',
235
235
  'EcdsaSecp256k1Signature2019',
@@ -849,11 +849,30 @@ export class OID4VCIHolder implements IAgentPlugin {
849
849
 
850
850
  let counter = 0
851
851
  for (const credentialId of selectedCredentials) {
852
- const localeBranding: Array<IBasicCredentialLocaleBranding> | undefined = credentialBranding?.[credentialId]
852
+ // The selectedCredential from context is the configurationId, whilst we store the branding by type. We need to map
853
+ const configId = credentialId
854
+ const types =
855
+ credentialsToAccept
856
+ .find((ac) => ac.correlationId === configId || ac.credentialToAccept.id === configId || ac.types.includes(configId))
857
+ ?.types?.filter((type) => type != 'VerifiableCredential') ?? []
858
+
859
+ const localeBranding: Array<IBasicCredentialLocaleBranding> = credentialBranding?.[configId] ?? []
860
+ if (localeBranding.length === 0) {
861
+ for (const type of types) {
862
+ const branding = credentialBranding?.[type] ?? []
863
+ if (branding.length > 0) {
864
+ localeBranding.push(...branding)
865
+ }
866
+ }
867
+ }
868
+
853
869
  if (localeBranding && localeBranding.length > 0) {
854
870
  const credential = credentialsToAccept.find(
855
871
  (credAccept) =>
856
- credAccept.credentialToAccept.id === credentialId || JSON.stringify(credAccept.types) === credentialId || credentialsToAccept[counter],
872
+ credAccept.credentialToAccept.id === credentialId ||
873
+ JSON.stringify(credAccept.types) === credentialId ||
874
+ JSON.stringify(credAccept.types.filter((cred) => cred !== 'VerifiableCredential')) === JSON.stringify(types) ||
875
+ credentialsToAccept[counter],
857
876
  )!
858
877
  counter++
859
878
  await context.agent.ibAddCredentialBranding({
@@ -1150,9 +1169,9 @@ export class OID4VCIHolder implements IAgentPlugin {
1150
1169
  return undefined
1151
1170
  }
1152
1171
 
1153
- private getCredentialDefinition(issuanceOpt: IssuanceOpts): CredentialDefinitionJwtVcJsonLdAndLdpVcV1_0_13 | undefined {
1172
+ private getCredentialDefinition(issuanceOpt: IssuanceOpts): CredentialDefinitionJwtVcJsonLdAndLdpVcV1_0_15 | undefined {
1154
1173
  if (issuanceOpt.format == 'ldp_vc' || issuanceOpt.format == 'jwt_vc_json-ld') {
1155
- return (issuanceOpt as CredentialConfigurationSupportedJwtVcJsonLdAndLdpVcV1_0_13).credential_definition
1174
+ return (issuanceOpt as CredentialConfigurationSupportedJwtVcJsonLdAndLdpVcV1_0_15).credential_definition
1156
1175
  }
1157
1176
  return undefined
1158
1177
  }
@@ -2,7 +2,7 @@ import { LOG } from '@sphereon/oid4vci-client'
2
2
  import {
3
3
  CredentialConfigurationSupported,
4
4
  CredentialSupportedSdJwtVc,
5
- CredentialConfigurationSupportedSdJwtVcV1_0_13,
5
+ CredentialConfigurationSupportedSdJwtVcV1_0_15,
6
6
  CredentialOfferFormatV1_0_11,
7
7
  CredentialResponse,
8
8
  getSupportedCredentials,
@@ -72,8 +72,8 @@ export const getCredentialBranding = async (args: GetCredentialBrandingArgs): Pr
72
72
  await Promise.all(
73
73
  Object.entries(credentialsSupported).map(async ([configId, credentialsConfigSupported]): Promise<void> => {
74
74
  let sdJwtTypeMetadata: SdJwtTypeMetadata | undefined
75
- if (credentialsConfigSupported.format === 'vc+sd-jwt') {
76
- const vct = (<CredentialSupportedSdJwtVc | CredentialConfigurationSupportedSdJwtVcV1_0_13>credentialsConfigSupported).vct
75
+ if (credentialsConfigSupported.format === 'dc+sd-jwt') {
76
+ const vct = (<CredentialSupportedSdJwtVc | CredentialConfigurationSupportedSdJwtVcV1_0_15>credentialsConfigSupported).vct
77
77
  if (vct.startsWith('http')) {
78
78
  try {
79
79
  sdJwtTypeMetadata = await context.agent.fetchSdJwtTypeMetadataFromVctUrl({ vct })
@@ -580,7 +580,7 @@ export const getIssuanceCryptoSuite = async (opts: GetIssuanceCryptoSuiteArgs):
580
580
  case 'jwt':
581
581
  case 'jwt_vc_json':
582
582
  case 'jwt_vc':
583
- case 'vc+sd-jwt':
583
+ case 'dc+sd-jwt':
584
584
  case 'mso_mdoc': {
585
585
  const supportedPreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString> = jwtCryptographicSuitePreferences.filter(
586
586
  (suite: JoseSignatureAlgorithm | JoseSignatureAlgorithmString) => signing_algs_supported.includes(suite),