@sphereon/ssi-sdk.credential-validation 0.34.1-feature.FIDES.1.274 → 0.34.1-feature.IDK.11.48

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.
@@ -1,4 +1,4 @@
1
- import mdocPkg from '@sphereon/kmp-mdoc-core'
1
+ import { com } 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.js'
13
+ import Ajv2020 from 'ajv/dist/2020'
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 = mdocPkg.com.sphereon.crypto.generic.IVerifySignatureResult
29
- import decodeFrom = mdocPkg.com.sphereon.kmp.decodeFrom
30
- import IssuerSignedCbor = mdocPkg.com.sphereon.mdoc.data.device.IssuerSignedCbor
28
+ import IVerifySignatureResult = com.sphereon.crypto.generic.IVerifySignatureResult
29
+ import decodeFrom = com.sphereon.kmp.decodeFrom
30
+ import IssuerSignedCbor = 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, mdocPkg.com.sphereon.kmp.Encoding.BASE64URL))
179
+ const issuerSigned = IssuerSignedCbor.Static.cborDecode(decodeFrom(credential, 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)