@sphereon/ssi-sdk.credential-vcdm-jsonld-provider 0.33.1-feature.jose.vcdm.63 → 0.33.1-feature.jose.vcdm.64
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/ld-suite-loader.ts +6 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.credential-vcdm-jsonld-provider",
|
|
3
|
-
"version": "0.33.1-feature.jose.vcdm.
|
|
3
|
+
"version": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@noble/hashes": "1.6.1",
|
|
43
43
|
"@sphereon/ssi-sdk-ext.did-utils": "0.28.1-feature.jose.vcdm.25",
|
|
44
44
|
"@sphereon/ssi-sdk-ext.key-utils": "0.28.1-feature.jose.vcdm.25",
|
|
45
|
-
"@sphereon/ssi-sdk.agent-config": "0.33.1-feature.jose.vcdm.
|
|
46
|
-
"@sphereon/ssi-sdk.core": "0.33.1-feature.jose.vcdm.
|
|
47
|
-
"@sphereon/ssi-sdk.credential-vcdm": "0.33.1-feature.jose.vcdm.
|
|
48
|
-
"@sphereon/ssi-sdk.data-store": "0.33.1-feature.jose.vcdm.
|
|
49
|
-
"@sphereon/ssi-sdk.vc-status-list": "0.33.1-feature.jose.vcdm.
|
|
50
|
-
"@sphereon/ssi-types": "0.33.1-feature.jose.vcdm.
|
|
45
|
+
"@sphereon/ssi-sdk.agent-config": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
46
|
+
"@sphereon/ssi-sdk.core": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
47
|
+
"@sphereon/ssi-sdk.credential-vcdm": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
48
|
+
"@sphereon/ssi-sdk.data-store": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
49
|
+
"@sphereon/ssi-sdk.vc-status-list": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
50
|
+
"@sphereon/ssi-types": "0.33.1-feature.jose.vcdm.64+3c61dc9b",
|
|
51
51
|
"@veramo-community/lds-ecdsa-secp256k1-recovery2020": "github:uport-project/EcdsaSecp256k1RecoverySignature2020",
|
|
52
52
|
"@veramo/core": "4.2.0",
|
|
53
53
|
"@veramo/utils": "4.2.0",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"react-native-securerandom": "^1.0.1"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "3c61dc9bd9aa7ebe2b4e88c6fd37aed7d4338dfb"
|
|
122
122
|
}
|
package/src/ld-suite-loader.ts
CHANGED
|
@@ -29,17 +29,13 @@ export class LdSuiteLoader {
|
|
|
29
29
|
private signatureMap: Record<string, Record<string, SphereonLdSignature[]>> = {}
|
|
30
30
|
|
|
31
31
|
getSignatureSuiteForKeyType(keyType: TKeyType, verificationType?: string): SphereonLdSignature[] {
|
|
32
|
-
// Always use verification type if supplied. This is the type denoted by the DID verification method type
|
|
33
|
-
|
|
34
|
-
/* let verificationSuite = verificationType
|
|
35
|
-
if (verificationSuite === 'Secp256k1VerificationKey2018' || verificationSuite === 'Secp256r1VerificationKey2018') {
|
|
36
|
-
verificationSuite = 'JsonWebKey2020'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const suite = verificationSuite && this.signatureMap[verificationSuite] ? this.signatureMap[verificationSuite] : this.signatureMap[keyType]
|
|
40
|
-
if (suite) return suite*/
|
|
32
|
+
// Always use verification type if supplied. This is the type denoted by the DID verification method type.
|
|
33
|
+
// The only exception is JsonWebKey. We do not have a signature suite anymore for that (discontinued), so we take the first verification suite in that case. Just like no verification method was supplied
|
|
41
34
|
const verificationToSuites = this.signatureMap[keyType]
|
|
42
|
-
const suites =
|
|
35
|
+
const suites =
|
|
36
|
+
verificationType && verificationType !== '' && verificationType !== 'JsonWebKey2020'
|
|
37
|
+
? verificationToSuites[verificationType]
|
|
38
|
+
: Object.values(verificationToSuites)?.[0]
|
|
43
39
|
// const suite = this.signatureMap[keyType]?.[verificationType]
|
|
44
40
|
if (Array.isArray(suites) && suites.length > 0) {
|
|
45
41
|
return suites
|