@veramo/credential-ld 3.1.6-next.149 → 3.1.6-next.152
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veramo/credential-ld",
|
|
3
3
|
"description": "Veramo plugin for working with W3C JSON-LD Verifiable Credentials & Presentations.",
|
|
4
|
-
"version": "3.1.6-next.
|
|
4
|
+
"version": "3.1.6-next.152+31e3946a",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@transmute/credentials-context": "^0.7.0-unstable.60",
|
|
21
21
|
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.60",
|
|
22
22
|
"@veramo-community/lds-ecdsa-secp256k1-recovery2020": "uport-project/EcdsaSecp256k1RecoverySignature2020",
|
|
23
|
-
"@veramo/core": "^3.1.6-next.
|
|
24
|
-
"@veramo/did-resolver": "^3.1.6-next.
|
|
25
|
-
"@veramo/utils": "^3.1.6-next.
|
|
23
|
+
"@veramo/core": "^3.1.6-next.152+31e3946a",
|
|
24
|
+
"@veramo/did-resolver": "^3.1.6-next.152+31e3946a",
|
|
25
|
+
"@veramo/utils": "^3.1.6-next.152+31e3946a",
|
|
26
26
|
"debug": "^4.3.3",
|
|
27
27
|
"did-resolver": "^3.2.2",
|
|
28
28
|
"uint8arrays": "^3.0.0"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"author": "Mircea Nistor <mircea.nistor@mesh.xyz>",
|
|
52
52
|
"license": "Apache-2.0",
|
|
53
53
|
"keywords": [],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "31e3946af3e281f823b41ee3f1c389d6cbc88c29"
|
|
55
55
|
}
|
|
@@ -13,14 +13,14 @@ import { KeyManager, MemoryKeyStore, MemoryPrivateKeyStore } from '../../../key-
|
|
|
13
13
|
import { KeyManagementSystem } from '../../../kms-local/src'
|
|
14
14
|
import { getDidKeyResolver, KeyDIDProvider } from '../../../did-provider-key/src'
|
|
15
15
|
import { DIDResolverPlugin } from '../../../did-resolver/src'
|
|
16
|
-
import { EthrDIDProvider } from
|
|
16
|
+
import { EthrDIDProvider } from '../../../did-provider-ethr/src'
|
|
17
17
|
import { ContextDoc } from '../types'
|
|
18
18
|
import { CredentialIssuerLD } from '../action-handler'
|
|
19
19
|
import { LdDefaultContexts } from '../ld-default-contexts'
|
|
20
20
|
import { VeramoEd25519Signature2018 } from '../suites/Ed25519Signature2018'
|
|
21
21
|
import { Resolver } from 'did-resolver'
|
|
22
22
|
import { getResolver as ethrDidResolver } from 'ethr-did-resolver'
|
|
23
|
-
import { VeramoEcdsaSecp256k1RecoverySignature2020 } from
|
|
23
|
+
import { VeramoEcdsaSecp256k1RecoverySignature2020 } from '../suites/EcdsaSecp256k1RecoverySignature2020'
|
|
24
24
|
|
|
25
25
|
jest.setTimeout(300000)
|
|
26
26
|
|
|
@@ -62,7 +62,7 @@ describe('credential-LD full flow', () => {
|
|
|
62
62
|
new DIDResolverPlugin({
|
|
63
63
|
resolver: new Resolver({
|
|
64
64
|
...getDidKeyResolver(),
|
|
65
|
-
...ethrDidResolver({ infuraProjectId
|
|
65
|
+
...ethrDidResolver({ infuraProjectId }),
|
|
66
66
|
}),
|
|
67
67
|
}),
|
|
68
68
|
new CredentialIssuer(),
|
|
@@ -73,7 +73,7 @@ describe('credential-LD full flow', () => {
|
|
|
73
73
|
],
|
|
74
74
|
})
|
|
75
75
|
didKeyIdentifier = await agent.didManagerCreate()
|
|
76
|
-
didEthrIdentifier = await agent.didManagerCreate({ provider:
|
|
76
|
+
didEthrIdentifier = await agent.didManagerCreate({ provider: 'did:ethr:goerli' })
|
|
77
77
|
})
|
|
78
78
|
|
|
79
79
|
it('works with Ed25519Signature2018 credential', async () => {
|
|
@@ -136,9 +136,9 @@ describe('credential-LD full flow', () => {
|
|
|
136
136
|
const verifiablePresentation = await agent.createVerifiablePresentation({
|
|
137
137
|
presentation: {
|
|
138
138
|
verifiableCredential: [verifiableCredential1],
|
|
139
|
-
holder: didKeyIdentifier.did
|
|
139
|
+
holder: didKeyIdentifier.did,
|
|
140
140
|
},
|
|
141
|
-
challenge:
|
|
141
|
+
challenge: 'VERAMO',
|
|
142
142
|
proofFormat: 'lds',
|
|
143
143
|
})
|
|
144
144
|
|
|
@@ -146,7 +146,7 @@ describe('credential-LD full flow', () => {
|
|
|
146
146
|
|
|
147
147
|
const verified = await agent.verifyPresentation({
|
|
148
148
|
presentation: verifiablePresentation,
|
|
149
|
-
challenge:
|
|
149
|
+
challenge: 'VERAMO',
|
|
150
150
|
})
|
|
151
151
|
|
|
152
152
|
expect(verified).toBe(true)
|
|
@@ -171,9 +171,9 @@ describe('credential-LD full flow', () => {
|
|
|
171
171
|
const verifiablePresentation = await agent.createVerifiablePresentation({
|
|
172
172
|
presentation: {
|
|
173
173
|
verifiableCredential: [verifiableCredential1],
|
|
174
|
-
holder: didEthrIdentifier.did
|
|
174
|
+
holder: didEthrIdentifier.did,
|
|
175
175
|
},
|
|
176
|
-
challenge:
|
|
176
|
+
challenge: 'VERAMO',
|
|
177
177
|
proofFormat: 'lds',
|
|
178
178
|
})
|
|
179
179
|
|
|
@@ -181,7 +181,7 @@ describe('credential-LD full flow', () => {
|
|
|
181
181
|
|
|
182
182
|
const verified = await agent.verifyPresentation({
|
|
183
183
|
presentation: verifiablePresentation,
|
|
184
|
-
challenge:
|
|
184
|
+
challenge: 'VERAMO',
|
|
185
185
|
})
|
|
186
186
|
|
|
187
187
|
expect(verified).toBe(true)
|