@sphereon/ssi-sdk.credential-validation 0.34.1-next.29 → 0.34.1-next.299
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 +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/plugin.schema.json +2 -2
- package/src/agent/CredentialValidation.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.credential-validation",
|
|
3
|
-
"version": "0.34.1-next.
|
|
3
|
+
"version": "0.34.1-next.299+9e9f5a50",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -24,27 +24,27 @@
|
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json",
|
|
27
|
-
"generate-plugin-schema": "
|
|
27
|
+
"generate-plugin-schema": "tsx ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
31
|
-
"@sphereon/ssi-sdk.agent-config": "0.34.1-next.
|
|
32
|
-
"@sphereon/ssi-sdk.core": "0.34.1-next.
|
|
33
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-next.
|
|
34
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-next.
|
|
35
|
-
"@sphereon/ssi-types": "0.34.1-next.
|
|
31
|
+
"@sphereon/ssi-sdk.agent-config": "0.34.1-next.299+9e9f5a50",
|
|
32
|
+
"@sphereon/ssi-sdk.core": "0.34.1-next.299+9e9f5a50",
|
|
33
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-next.299+9e9f5a50",
|
|
34
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-next.299+9e9f5a50",
|
|
35
|
+
"@sphereon/ssi-types": "0.34.1-next.299+9e9f5a50",
|
|
36
36
|
"@veramo/core": "4.2.0",
|
|
37
37
|
"@veramo/data-store": "4.2.0",
|
|
38
38
|
"@veramo/utils": "4.2.0",
|
|
39
39
|
"ajv": "^8.17.1",
|
|
40
40
|
"ajv-formats": "^3.0.1",
|
|
41
|
-
"cross-fetch": "^
|
|
41
|
+
"cross-fetch": "^4.1.0",
|
|
42
42
|
"debug": "^4.3.5",
|
|
43
43
|
"typeorm": "0.3.20"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.
|
|
47
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.
|
|
46
|
+
"@sphereon/ssi-sdk-ext.key-manager": "0.34.1-next.299+9e9f5a50",
|
|
47
|
+
"@sphereon/ssi-sdk-ext.kms-local": "0.34.1-next.299+9e9f5a50",
|
|
48
48
|
"@veramo/credential-w3c": "4.2.0",
|
|
49
49
|
"@veramo/data-store": "4.2.0",
|
|
50
50
|
"@veramo/did-manager": "4.2.0",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"Credential",
|
|
73
73
|
"VerifiableCredential"
|
|
74
74
|
],
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "9e9f5a50ead9373a078cb5291cbc4fb1e7865dc2"
|
|
76
76
|
}
|
package/plugin.schema.json
CHANGED
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
},
|
|
889
889
|
"format": {
|
|
890
890
|
"type": "string",
|
|
891
|
-
"const": "
|
|
891
|
+
"const": "dc+sd-jwt",
|
|
892
892
|
"description": "The claim format, typically used during exchange transport protocols"
|
|
893
893
|
},
|
|
894
894
|
"credential": {
|
|
@@ -1275,7 +1275,7 @@
|
|
|
1275
1275
|
},
|
|
1276
1276
|
"format": {
|
|
1277
1277
|
"type": "string",
|
|
1278
|
-
"const": "
|
|
1278
|
+
"const": "dc+sd-jwt",
|
|
1279
1279
|
"description": "The claim format, typically used during exchange transport protocols"
|
|
1280
1280
|
},
|
|
1281
1281
|
"presentation": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import mdocPkg from '@sphereon/kmp-mdoc-core'
|
|
2
2
|
import { IVerifySdJwtVcResult } from '@sphereon/ssi-sdk.sd-jwt'
|
|
3
3
|
import {
|
|
4
4
|
CredentialMapper,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '@sphereon/ssi-types'
|
|
11
11
|
import { IAgentPlugin, IVerifyCredentialArgs, W3CVerifiableCredential as VeramoW3CVerifiableCredential } from '@veramo/core'
|
|
12
12
|
import addFormats from 'ajv-formats'
|
|
13
|
-
import Ajv2020 from 'ajv/dist/2020'
|
|
13
|
+
import Ajv2020 from 'ajv/dist/2020.js'
|
|
14
14
|
import fetch from 'cross-fetch'
|
|
15
15
|
import {
|
|
16
16
|
CredentialVerificationError,
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
VerifyMdocCredentialArgs,
|
|
26
26
|
VerifySDJWTCredentialArgs,
|
|
27
27
|
} from '../index'
|
|
28
|
-
import IVerifySignatureResult = com.sphereon.crypto.generic.IVerifySignatureResult
|
|
29
|
-
import decodeFrom = com.sphereon.kmp.decodeFrom
|
|
30
|
-
import IssuerSignedCbor = com.sphereon.mdoc.data.device.IssuerSignedCbor
|
|
28
|
+
import IVerifySignatureResult = mdocPkg.com.sphereon.crypto.generic.IVerifySignatureResult
|
|
29
|
+
import decodeFrom = mdocPkg.com.sphereon.kmp.decodeFrom
|
|
30
|
+
import IssuerSignedCbor = mdocPkg.com.sphereon.mdoc.data.device.IssuerSignedCbor
|
|
31
31
|
import { defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
32
32
|
|
|
33
33
|
// Exposing the methods here for any REST implementation
|
|
@@ -176,7 +176,7 @@ export class CredentialValidation implements IAgentPlugin {
|
|
|
176
176
|
private async cvVerifyMdoc(args: VerifyMdocCredentialArgs, context: RequiredContext): Promise<VerificationResult> {
|
|
177
177
|
const { credential } = args
|
|
178
178
|
|
|
179
|
-
const issuerSigned = IssuerSignedCbor.Static.cborDecode(decodeFrom(credential, com.sphereon.kmp.Encoding.BASE64URL))
|
|
179
|
+
const issuerSigned = IssuerSignedCbor.Static.cborDecode(decodeFrom(credential, mdocPkg.com.sphereon.kmp.Encoding.BASE64URL))
|
|
180
180
|
|
|
181
181
|
const verification = await context.agent.mdocVerifyIssuerSigned({ input: issuerSigned.toJson().issuerAuth }).catch((error: Error) => {
|
|
182
182
|
console.error(error)
|