@sphereon/ssi-sdk.credential-validation 0.34.1-fix.79 → 0.34.1-next.278

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.
@@ -888,7 +888,7 @@
888
888
  },
889
889
  "format": {
890
890
  "type": "string",
891
- "const": "vc+sd-jwt",
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": "vc+sd-jwt",
1278
+ "const": "dc+sd-jwt",
1279
1279
  "description": "The claim format, typically used during exchange transport protocols"
1280
1280
  },
1281
1281
  "presentation": {
@@ -1,5 +1,4 @@
1
1
  import mdocPkg from '@sphereon/kmp-mdoc-core'
2
- const { com } = mdocPkg
3
2
  import { IVerifySdJwtVcResult } from '@sphereon/ssi-sdk.sd-jwt'
4
3
  import {
5
4
  CredentialMapper,
@@ -11,7 +10,7 @@ import {
11
10
  } from '@sphereon/ssi-types'
12
11
  import { IAgentPlugin, IVerifyCredentialArgs, W3CVerifiableCredential as VeramoW3CVerifiableCredential } from '@veramo/core'
13
12
  import addFormats from 'ajv-formats'
14
- import Ajv2020 from 'ajv/dist/2020'
13
+ import Ajv2020 from 'ajv/dist/2020.js'
15
14
  import fetch from 'cross-fetch'
16
15
  import {
17
16
  CredentialVerificationError,
@@ -177,7 +176,7 @@ export class CredentialValidation implements IAgentPlugin {
177
176
  private async cvVerifyMdoc(args: VerifyMdocCredentialArgs, context: RequiredContext): Promise<VerificationResult> {
178
177
  const { credential } = args
179
178
 
180
- 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))
181
180
 
182
181
  const verification = await context.agent.mdocVerifyIssuerSigned({ input: issuerSigned.toJson().issuerAuth }).catch((error: Error) => {
183
182
  console.error(error)