@sphereon/ssi-sdk.oid4vci-holder 0.34.1-next.6 → 0.34.1-next.7
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 +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
- package/src/agent/OID4VCIHolder.ts +21 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.oid4vci-holder",
|
|
3
|
-
"version": "0.34.1-next.
|
|
3
|
+
"version": "0.34.1-next.7+abc1dfeb",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.1-next.3",
|
|
35
35
|
"@sphereon/ssi-sdk-ext.jwt-service": "0.29.1-next.3",
|
|
36
36
|
"@sphereon/ssi-sdk-ext.key-utils": "0.29.1-next.3",
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-next.
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-next.
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-next.
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-next.
|
|
41
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-next.
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-next.
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-next.
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-next.
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-next.
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-next.
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-next.
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-next.
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-next.
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-next.7+abc1dfeb",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-next.7+abc1dfeb",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-next.7+abc1dfeb",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-next.7+abc1dfeb",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-next.7+abc1dfeb",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-next.7+abc1dfeb",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-next.7+abc1dfeb",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-next.7+abc1dfeb",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-next.7+abc1dfeb",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-next.7+abc1dfeb",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-next.7+abc1dfeb",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-next.7+abc1dfeb",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-next.7+abc1dfeb",
|
|
50
50
|
"@veramo/core": "4.2.0",
|
|
51
51
|
"@veramo/data-store": "4.2.0",
|
|
52
52
|
"@veramo/utils": "4.2.0",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"OID4VCI",
|
|
90
90
|
"State Machine"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "abc1dfebd9a53c49235573ad0a337abb248bf2f3"
|
|
93
93
|
}
|
|
@@ -849,11 +849,30 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
849
849
|
|
|
850
850
|
let counter = 0
|
|
851
851
|
for (const credentialId of selectedCredentials) {
|
|
852
|
-
|
|
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 ||
|
|
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({
|