@sphereon/ssi-sdk.credential-vcdm-jsonld-provider 0.33.1-next.68 → 0.34.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.credential-vcdm-jsonld-provider",
3
- "version": "0.33.1-next.68+b6c8b366",
3
+ "version": "0.34.0",
4
4
  "source": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -40,14 +40,14 @@
40
40
  "@digitalcredentials/vc": "^9.0.1",
41
41
  "@digitalcredentials/x25519-key-agreement-2020-context": "^1.0.0",
42
42
  "@noble/hashes": "1.6.1",
43
- "@sphereon/ssi-sdk-ext.did-utils": "0.28.1-next.53",
44
- "@sphereon/ssi-sdk-ext.key-utils": "0.28.1-next.53",
45
- "@sphereon/ssi-sdk.agent-config": "0.33.1-next.68+b6c8b366",
46
- "@sphereon/ssi-sdk.core": "0.33.1-next.68+b6c8b366",
47
- "@sphereon/ssi-sdk.credential-vcdm": "0.33.1-next.68+b6c8b366",
48
- "@sphereon/ssi-sdk.data-store": "0.33.1-next.68+b6c8b366",
49
- "@sphereon/ssi-sdk.vc-status-list": "0.33.1-next.68+b6c8b366",
50
- "@sphereon/ssi-types": "0.33.1-next.68+b6c8b366",
43
+ "@sphereon/ssi-sdk-ext.did-utils": "0.29.0",
44
+ "@sphereon/ssi-sdk-ext.key-utils": "0.29.0",
45
+ "@sphereon/ssi-sdk.agent-config": "0.34.0",
46
+ "@sphereon/ssi-sdk.core": "0.34.0",
47
+ "@sphereon/ssi-sdk.credential-vcdm": "0.34.0",
48
+ "@sphereon/ssi-sdk.data-store": "0.34.0",
49
+ "@sphereon/ssi-sdk.vc-status-list": "0.34.0",
50
+ "@sphereon/ssi-types": "0.34.0",
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",
@@ -60,11 +60,11 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@sphereon/did-uni-client": "^0.6.3",
63
- "@sphereon/ssi-sdk-ext.did-provider-key": "0.28.1-next.53",
63
+ "@sphereon/ssi-sdk-ext.did-provider-key": "0.29.0",
64
64
  "@sphereon/ssi-sdk-ext.did-provider-lto": "0.23.0",
65
- "@sphereon/ssi-sdk-ext.identifier-resolution": "0.28.1-next.53",
66
- "@sphereon/ssi-sdk-ext.key-manager": "0.28.1-next.53",
67
- "@sphereon/ssi-sdk-ext.kms-local": "0.28.1-next.53",
65
+ "@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.0",
66
+ "@sphereon/ssi-sdk-ext.key-manager": "0.29.0",
67
+ "@sphereon/ssi-sdk-ext.kms-local": "0.29.0",
68
68
  "@sphereon/ssi-sdk.agent-config": "workspace:*",
69
69
  "@transmute/lds-ecdsa-secp256k1-recovery2020": "^0.0.7",
70
70
  "@types/nock": "^11.1.0",
@@ -118,5 +118,5 @@
118
118
  "peerDependencies": {
119
119
  "react-native-securerandom": "^1.0.1"
120
120
  },
121
- "gitHead": "b6c8b36636fa3777494f55860d6a75f2e5a5611e"
121
+ "gitHead": "b1c9c5e91a9ce4bc677ff2cce5f2d520a16b366d"
122
122
  }
@@ -1,16 +1,5 @@
1
1
  import { getAgentResolver, mapIdentifierKeysToDocWithJwkSupport } from '@sphereon/ssi-sdk-ext.did-utils'
2
2
  import { asArray, intersect, VerifiableCredentialSP, VerifiablePresentationSP } from '@sphereon/ssi-sdk.core'
3
- import { vcLibCheckStatusFunction } from '@sphereon/ssi-sdk.vc-status-list'
4
- import { IVerifyResult } from '@sphereon/ssi-types'
5
- import type { DIDDocument, IAgentContext, IDIDManager, IIdentifier, IKey, IResolver, VerifiableCredential } from '@veramo/core'
6
- import { AbstractPrivateKeyStore } from '@veramo/key-manager'
7
- import { type _ExtendedIKey, type OrPromise, type RecordLike } from '@veramo/utils'
8
- import Debug from 'debug'
9
-
10
- import { LdContextLoader } from '../ld-context-loader'
11
- import { LdCredentialModule } from '../ld-credential-module'
12
- import { LdSuiteLoader } from '../ld-suite-loader'
13
- import { SphereonLdSignature } from '../ld-suites'
14
3
  import {
15
4
  ContextDoc,
16
5
  ICanIssueCredentialTypeArgs,
@@ -20,13 +9,32 @@ import {
20
9
  IVcdmCredentialProvider,
21
10
  IVcdmIssuerAgentContext,
22
11
  IVcdmVerifierAgentContext,
23
- IVerifyCredentialLDArgs,
12
+ IVerifyCredentialVcdmArgs,
24
13
  IVerifyPresentationLDArgs,
25
14
  preProcessCredentialPayload,
26
- preProcessPresentation,
15
+ preProcessPresentation
27
16
  } from '@sphereon/ssi-sdk.credential-vcdm'
28
- import { SphereonEcdsaSecp256k1RecoverySignature2020, SphereonEd25519Signature2020 } from '../suites'
17
+ import { vcLibCheckStatusFunction } from '@sphereon/ssi-sdk.vc-status-list'
18
+ import { IVerifyResult } from '@sphereon/ssi-types'
19
+ import type {
20
+ DIDDocument,
21
+ IAgentContext,
22
+ IDIDManager,
23
+ IIdentifier,
24
+ IKey,
25
+ IResolver,
26
+ VerifiableCredential
27
+ } from '@veramo/core'
28
+ import { AbstractPrivateKeyStore } from '@veramo/key-manager'
29
+ import { type _ExtendedIKey, type OrPromise, type RecordLike } from '@veramo/utils'
30
+ import Debug from 'debug'
31
+
32
+ import { LdContextLoader } from '../ld-context-loader'
33
+ import { LdCredentialModule } from '../ld-credential-module'
29
34
  import { LdDefaultContexts } from '../ld-default-contexts'
35
+ import { LdSuiteLoader } from '../ld-suite-loader'
36
+ import { SphereonLdSignature } from '../ld-suites'
37
+ import { SphereonEcdsaSecp256k1RecoverySignature2020, SphereonEd25519Signature2020 } from '../suites'
30
38
 
31
39
  const debug = Debug('sphereon:ssi-sdk:ld-credential-module-local')
32
40
 
@@ -76,6 +84,9 @@ export class CredentialProviderJsonld implements IVcdmCredentialProvider {
76
84
  /** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.canVerifyDocumentType */
77
85
  canVerifyDocumentType(args: ICanVerifyDocumentTypeArgs): boolean {
78
86
  const { document } = args
87
+ if (typeof document === 'string') {
88
+ return false
89
+ }
79
90
  const proofType = (<VerifiableCredential>document)?.proof?.type ?? '_never_'
80
91
  for (const suite of this.ldCredentialModule.ldSuiteLoader.getAllSignatureSuites()) {
81
92
  if (suite.getSupportedProofType() === proofType) {
@@ -183,7 +194,7 @@ export class CredentialProviderJsonld implements IVcdmCredentialProvider {
183
194
  }
184
195
 
185
196
  /** {@inheritdoc ICredentialHandlerLDLocal.verifyCredential} */
186
- async verifyCredential(args: IVerifyCredentialLDArgs, context: IVcdmVerifierAgentContext): Promise<IVerifyResult> {
197
+ async verifyCredential(args: IVerifyCredentialVcdmArgs, context: IVcdmVerifierAgentContext): Promise<IVerifyResult> {
187
198
  const credential = args.credential
188
199
  let checkStatus = args.checkStatus
189
200
  if (typeof checkStatus !== 'function' && (!args.statusList || args.statusList.disableCheckStatusList2021 !== true)) {
@@ -192,7 +203,7 @@ export class CredentialProviderJsonld implements IVcdmCredentialProvider {
192
203
  verifyStatusListCredential: false /*todo: enable. Needs calling this method first and not rely on @digiticalcredentials*/,
193
204
  }) // todo: Probably should be moved to the module to have access to the loaders
194
205
  }
195
- return this.ldCredentialModule.verifyCredential(credential, context, args.fetchRemoteContexts, args.purpose, checkStatus)
206
+ return this.ldCredentialModule.verifyCredential(credential as VerifiableCredentialSP, context, args.fetchRemoteContexts, args.purpose, checkStatus)
196
207
  }
197
208
 
198
209
  /** {@inheritdoc ICredentialHandlerLDLocal.verifyPresentation} */