@sphereon/ssi-sdk.oid4vci-holder 0.34.0 → 0.34.1-feature.SSISDK.13.32

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.0",
3
+ "version": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
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.13.19",
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.0",
38
- "@sphereon/ssi-sdk.core": "0.34.0",
39
- "@sphereon/ssi-sdk.credential-store": "0.34.0",
40
- "@sphereon/ssi-sdk.credential-validation": "0.34.0",
41
- "@sphereon/ssi-sdk.data-store": "0.34.0",
42
- "@sphereon/ssi-sdk.issuance-branding": "0.34.0",
43
- "@sphereon/ssi-sdk.mdl-mdoc": "0.34.0",
44
- "@sphereon/ssi-sdk.oidf-client": "0.34.0",
45
- "@sphereon/ssi-sdk.sd-jwt": "0.34.0",
46
- "@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.0",
47
- "@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.0",
48
- "@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.0",
49
- "@sphereon/ssi-types": "0.34.0",
31
+ "@sphereon/oid4vci-client": "0.19.1-feature.SSISDK.13.19",
32
+ "@sphereon/oid4vci-common": "0.19.1-feature.SSISDK.13.19",
33
+ "@sphereon/ssi-sdk-ext.did-utils": "0.29.1-next.3",
34
+ "@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.1-next.3",
35
+ "@sphereon/ssi-sdk-ext.jwt-service": "0.29.1-next.3",
36
+ "@sphereon/ssi-sdk-ext.key-utils": "0.29.1-next.3",
37
+ "@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
38
+ "@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
39
+ "@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
40
+ "@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
41
+ "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
42
+ "@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
43
+ "@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
44
+ "@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
45
+ "@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
46
+ "@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
47
+ "@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
48
+ "@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
49
+ "@sphereon/ssi-types": "0.34.1-feature.SSISDK.13.32+dca9f4d2",
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.13.19",
62
+ "@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.29.1-next.3",
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": "b1c9c5e91a9ce4bc677ff2cce5f2d520a16b366d"
92
+ "gitHead": "dca9f4d24c3afb293bd06bef406bdc94863a4ace"
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,
@@ -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,
@@ -73,7 +73,7 @@ export const getCredentialBranding = async (args: GetCredentialBrandingArgs): Pr
73
73
  Object.entries(credentialsSupported).map(async ([configId, credentialsConfigSupported]): Promise<void> => {
74
74
  let sdJwtTypeMetadata: SdJwtTypeMetadata | undefined
75
75
  if (credentialsConfigSupported.format === 'vc+sd-jwt') {
76
- const vct = (<CredentialSupportedSdJwtVc | CredentialConfigurationSupportedSdJwtVcV1_0_13>credentialsConfigSupported).vct
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 })