@sphereon/ssi-sdk.credential-vcdm-jsonld-provider 0.33.1-feature.jose.vcdm.66 → 0.33.1-feature.vcdm.verification.69
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 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
- package/src/agent/CredentialProviderJsonld.ts +27 -16
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.
|
|
3
|
+
"version": "0.33.1-feature.vcdm.verification.69+44037dda",
|
|
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-
|
|
44
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.28.1-
|
|
45
|
-
"@sphereon/ssi-sdk.agent-config": "0.33.1-feature.
|
|
46
|
-
"@sphereon/ssi-sdk.core": "0.33.1-feature.
|
|
47
|
-
"@sphereon/ssi-sdk.credential-vcdm": "0.33.1-feature.
|
|
48
|
-
"@sphereon/ssi-sdk.data-store": "0.33.1-feature.
|
|
49
|
-
"@sphereon/ssi-sdk.vc-status-list": "0.33.1-feature.
|
|
50
|
-
"@sphereon/ssi-types": "0.33.1-feature.
|
|
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-feature.vcdm.verification.69+44037dda",
|
|
46
|
+
"@sphereon/ssi-sdk.core": "0.33.1-feature.vcdm.verification.69+44037dda",
|
|
47
|
+
"@sphereon/ssi-sdk.credential-vcdm": "0.33.1-feature.vcdm.verification.69+44037dda",
|
|
48
|
+
"@sphereon/ssi-sdk.data-store": "0.33.1-feature.vcdm.verification.69+44037dda",
|
|
49
|
+
"@sphereon/ssi-sdk.vc-status-list": "0.33.1-feature.vcdm.verification.69+44037dda",
|
|
50
|
+
"@sphereon/ssi-types": "0.33.1-feature.vcdm.verification.69+44037dda",
|
|
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-
|
|
63
|
+
"@sphereon/ssi-sdk-ext.did-provider-key": "0.28.1-next.53",
|
|
64
64
|
"@sphereon/ssi-sdk-ext.did-provider-lto": "0.23.0",
|
|
65
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.28.1-
|
|
66
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.28.1-
|
|
67
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.28.1-
|
|
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",
|
|
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": "
|
|
121
|
+
"gitHead": "44037ddadc9fb841c47bd711ab98d29a0d57f32d"
|
|
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
|
-
|
|
12
|
+
IVerifyCredentialVcdmArgs,
|
|
24
13
|
IVerifyPresentationLDArgs,
|
|
25
14
|
preProcessCredentialPayload,
|
|
26
|
-
preProcessPresentation
|
|
15
|
+
preProcessPresentation
|
|
27
16
|
} from '@sphereon/ssi-sdk.credential-vcdm'
|
|
28
|
-
import {
|
|
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:
|
|
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} */
|