@veramo/credential-ld 4.2.1-next.1 → 4.2.1-next.15
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/build/ld-default-contexts.js +3 -3
- package/build/ld-default-contexts.js.map +1 -1
- package/build/suites/Ed25519Signature2020.d.ts.map +1 -1
- package/build/suites/Ed25519Signature2020.js +3 -2
- package/build/suites/Ed25519Signature2020.js.map +1 -1
- package/build/tsdoc-metadata.json +1 -1
- package/package.json +13 -11
- package/src/__tests__/issue-verify-flow.test.ts +1 -0
- package/src/ld-default-contexts.ts +3 -3
- package/src/module-types/jsonld/index.d.ts +0 -1
- package/src/suites/Ed25519Signature2020.ts +3 -2
|
@@ -10,9 +10,9 @@ exports.LdDefaultContexts = void 0;
|
|
|
10
10
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
11
11
|
*/
|
|
12
12
|
exports.LdDefaultContexts = new Map([
|
|
13
|
-
['https://www.w3.org/2018/credentials/v1', require('./contexts/www.w3.org_2018_credentials_v1')],
|
|
14
|
-
['https://www.w3.org/ns/did/v1', require('./contexts/www.w3.org_ns_did_v1')],
|
|
15
|
-
['https://w3id.org/security/v1', require('./contexts/w3id.org_security_v1')],
|
|
13
|
+
['https://www.w3.org/2018/credentials/v1', require('./contexts/www.w3.org_2018_credentials_v1.json')],
|
|
14
|
+
['https://www.w3.org/ns/did/v1', require('./contexts/www.w3.org_ns_did_v1.json')],
|
|
15
|
+
['https://w3id.org/security/v1', require('./contexts/w3id.org_security_v1.json')],
|
|
16
16
|
['https://w3id.org/security/v2', require('./contexts/w3id.org_security_v2.json')],
|
|
17
17
|
['https://w3id.org/security/v3-unstable', require('./contexts/w3id.org_security_v3-unstable.json')],
|
|
18
18
|
['https://w3id.org/security/suites/ed25519-2018/v1', require('./contexts/w3id.org_security_suites_ed25519-2018_v1.json')],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":";;;AAEA;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,CAAC,wCAAwC,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":";;;AAEA;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,CAAC,wCAAwC,EAAE,OAAO,CAAC,gDAAgD,CAAC,CAAC;IACrG,CAAC,8BAA8B,EAAE,OAAO,CAAC,sCAAsC,CAAC,CAAC;IACjF,CAAC,8BAA8B,EAAE,OAAO,CAAC,sCAAsC,CAAC,CAAC;IACjF,CAAC,8BAA8B,EAAE,OAAO,CAAC,sCAAsC,CAAC,CAAC;IACjF,CAAC,uCAAuC,EAAE,OAAO,CAAC,+CAA+C,CAAC,CAAC;IACnG,CAAC,kDAAkD,EAAE,OAAO,CAAC,0DAA0D,CAAC,CAAC;IACzH,CAAC,iDAAiD,EAAE,OAAO,CAAC,yDAAyD,CAAC,CAAC;IACvH,CAAC,kDAAkD,EAAE,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAC1G,CAAC,8CAA8C,EAAE,OAAO,CAAC,4CAA4C,CAAC,CAAC;IACvG,wEAAwE;IACxE,4FAA4F;IAC5F,4EAA4E;IAC5E,CAAC,uCAAuC,EAAE,OAAO,CAAC,+CAA+C,CAAC,CAAC;IACnG,+EAA+E;IAC/E,CAAC,6GAA6G,EAAE,OAAO,CAAC,sDAAsD,CAAC,CAAC;IAChL,CAAC,6GAA6G,EAAE,OAAO,CAAC,oEAAoE,CAAC,CAAC;IAC9L,CAAC,4DAA4D,EAAE,OAAO,CAAC,oEAAoE,CAAC,CAAC;IAC7I,8GAA8G;IAC9G,6GAA6G;CAC9G,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ed25519Signature2020.d.ts","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5F;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC/D,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAM;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAe;IAEjD,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,OAAO,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"Ed25519Signature2020.d.ts","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5F;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC/D,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAM;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAe;IAEjD,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,OAAO,CAAC,GAAG,CAAC;IAmCf,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAI/D,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAIvE,yBAAyB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM;CAInD"}
|
|
@@ -74,11 +74,12 @@ class VeramoEd25519Signature2020 extends ld_suites_1.VeramoLdSignature {
|
|
|
74
74
|
id,
|
|
75
75
|
controller,
|
|
76
76
|
publicKeyMultibase: this.preSigningKeyModification(u8a.fromString(key.publicKeyHex, 'hex')),
|
|
77
|
-
signer: () => signer,
|
|
78
|
-
type: this.getSupportedVerificationType(),
|
|
77
|
+
// signer: () => signer,
|
|
78
|
+
// type: this.getSupportedVerificationType(),
|
|
79
79
|
});
|
|
80
80
|
// overwrite the signer since we're not passing the private key
|
|
81
81
|
verificationKey.signer = () => signer;
|
|
82
|
+
verificationKey.type = this.getSupportedVerificationType();
|
|
82
83
|
return new ed25519_signature_2020_1.Ed25519Signature2020({
|
|
83
84
|
key: verificationKey,
|
|
84
85
|
signer: signer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ed25519Signature2020.js","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2020.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAsE;AAEtE,iDAAkC;AAClC,uFAAiF;AACjF,qGAA8F;AAE9F;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,6BAAiB;IAAjE;;QACmB,+BAA0B,GAAG,GAAG,CAAA;QAChC,sBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Ed25519Signature2020.js","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2020.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAsE;AAEtE,iDAAkC;AAClC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A4B,EAAE,CAAA;QAC1D,OAAO,IAAI,6CAAoB,CAAC;YAC9B,GAAG,EAAE,eAAe;YACpB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,6CAAoB,EAAE,CAAA;IACnC,CAAC;IAED,0BAA0B,CAAC,UAA6B;QACtD,qBAAqB;IACvB,CAAC;IAED,4BAA4B,CAAC,MAAc,EAAE,MAAmB;QAC9D,qBAAqB;IACvB,CAAC;IAED,yBAAyB,CAAC,GAAe;QACvC,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC,CAAA;QAC7D,OAAO,GAAG,IAAI,CAAC,0BAA0B,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAA;IACtF,CAAC;CACF;AApED,gEAoEC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veramo/credential-ld",
|
|
3
3
|
"description": "Veramo plugin for working with W3C JSON-LD Verifiable Credentials & Presentations.",
|
|
4
|
-
"version": "4.2.1-next.
|
|
4
|
+
"version": "4.2.1-next.15+583c6a78",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"generate-plugin-schema": "
|
|
9
|
+
"generate-plugin-schema": "pnpm exec veramo dev generate-plugin-schema"
|
|
10
10
|
},
|
|
11
11
|
"veramo": {
|
|
12
12
|
"pluginInterfaces": {
|
|
@@ -15,28 +15,30 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@digitalcredentials/ed25519-signature-2020": "^3.0.2",
|
|
18
|
+
"@digitalcredentials/ed25519-verification-key-2020": "^4.0.0",
|
|
18
19
|
"@digitalcredentials/jsonld": "^5.2.1",
|
|
19
20
|
"@digitalcredentials/jsonld-signatures": "^9.3.1",
|
|
20
21
|
"@digitalcredentials/vc": "^5.0.0",
|
|
21
|
-
"@transmute/credentials-context": "^0.7.0-unstable.
|
|
22
|
-
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.
|
|
23
|
-
"@transmute/json-web-signature": "^0.7.0-unstable.
|
|
22
|
+
"@transmute/credentials-context": "^0.7.0-unstable.77",
|
|
23
|
+
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.77",
|
|
24
|
+
"@transmute/json-web-signature": "^0.7.0-unstable.77",
|
|
24
25
|
"@veramo-community/lds-ecdsa-secp256k1-recovery2020": "uport-project/EcdsaSecp256k1RecoverySignature2020",
|
|
25
|
-
"@veramo/core": "^4.2.1-next.
|
|
26
|
-
"@veramo/did-resolver": "^4.2.1-next.
|
|
27
|
-
"@veramo/utils": "^4.2.1-next.
|
|
26
|
+
"@veramo/core": "^4.2.1-next.15+583c6a78",
|
|
27
|
+
"@veramo/did-resolver": "^4.2.1-next.15+583c6a78",
|
|
28
|
+
"@veramo/utils": "^4.2.1-next.15+583c6a78",
|
|
29
|
+
"cross-fetch": "^3.1.5",
|
|
28
30
|
"debug": "^4.3.3",
|
|
29
31
|
"did-resolver": "^4.0.1",
|
|
30
32
|
"uint8arrays": "^3.0.0"
|
|
31
33
|
},
|
|
32
34
|
"resolutions": {
|
|
33
|
-
"@types/react": "18.0.
|
|
35
|
+
"@types/react": "18.0.26",
|
|
34
36
|
"jsonld": "npm:@digitalcredentials/jsonld@^5.2.1"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@types/debug": "4.1.7",
|
|
38
40
|
"borc": "3.0.0",
|
|
39
|
-
"typescript": "4.9.
|
|
41
|
+
"typescript": "4.9.4"
|
|
40
42
|
},
|
|
41
43
|
"files": [
|
|
42
44
|
"build/**/*",
|
|
@@ -53,5 +55,5 @@
|
|
|
53
55
|
"author": "Mircea Nistor <mircea.nistor@mesh.xyz>",
|
|
54
56
|
"license": "Apache-2.0",
|
|
55
57
|
"keywords": [],
|
|
56
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "583c6a78499d34f4c466aace8f693d7d7f443b33"
|
|
57
59
|
}
|
|
@@ -23,6 +23,7 @@ import { Resolver } from 'did-resolver'
|
|
|
23
23
|
import { getResolver as ethrDidResolver } from 'ethr-did-resolver'
|
|
24
24
|
import { VeramoEcdsaSecp256k1RecoverySignature2020 } from '../suites/EcdsaSecp256k1RecoverySignature2020'
|
|
25
25
|
|
|
26
|
+
import 'cross-fetch/polyfill'
|
|
26
27
|
jest.setTimeout(300000)
|
|
27
28
|
|
|
28
29
|
const customContext: Record<string, ContextDoc> = {
|
|
@@ -9,9 +9,9 @@ import { ContextDoc } from './types'
|
|
|
9
9
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
10
10
|
*/
|
|
11
11
|
export const LdDefaultContexts = new Map([
|
|
12
|
-
['https://www.w3.org/2018/credentials/v1', require('./contexts/www.w3.org_2018_credentials_v1')],
|
|
13
|
-
['https://www.w3.org/ns/did/v1', require('./contexts/www.w3.org_ns_did_v1')],
|
|
14
|
-
['https://w3id.org/security/v1', require('./contexts/w3id.org_security_v1')],
|
|
12
|
+
['https://www.w3.org/2018/credentials/v1', require('./contexts/www.w3.org_2018_credentials_v1.json')],
|
|
13
|
+
['https://www.w3.org/ns/did/v1', require('./contexts/www.w3.org_ns_did_v1.json')],
|
|
14
|
+
['https://w3id.org/security/v1', require('./contexts/w3id.org_security_v1.json')],
|
|
15
15
|
['https://w3id.org/security/v2', require('./contexts/w3id.org_security_v2.json')],
|
|
16
16
|
['https://w3id.org/security/v3-unstable', require('./contexts/w3id.org_security_v3-unstable.json')],
|
|
17
17
|
['https://w3id.org/security/suites/ed25519-2018/v1', require('./contexts/w3id.org_security_suites_ed25519-2018_v1.json')],
|
|
@@ -2,7 +2,6 @@ declare module '@digitalcredentials/jsonld'
|
|
|
2
2
|
declare module '@digitalcredentials/jsonld-signatures'
|
|
3
3
|
declare module '@digitalcredentials/vc'
|
|
4
4
|
declare module '@digitalcredentials/ed25519-signature-2020'
|
|
5
|
-
declare module '@digitalcredentials/ed25519-verification-key-2020'
|
|
6
5
|
declare module '@veramo-community/lds-ecdsa-secp256k1-recovery2020'
|
|
7
6
|
|
|
8
7
|
declare module "*.json" {
|
|
@@ -49,11 +49,12 @@ export class VeramoEd25519Signature2020 extends VeramoLdSignature {
|
|
|
49
49
|
id,
|
|
50
50
|
controller,
|
|
51
51
|
publicKeyMultibase: this.preSigningKeyModification(u8a.fromString(key.publicKeyHex, 'hex')),
|
|
52
|
-
signer: () => signer,
|
|
53
|
-
type: this.getSupportedVerificationType(),
|
|
52
|
+
// signer: () => signer,
|
|
53
|
+
// type: this.getSupportedVerificationType(),
|
|
54
54
|
})
|
|
55
55
|
// overwrite the signer since we're not passing the private key
|
|
56
56
|
verificationKey.signer = () => signer as any
|
|
57
|
+
verificationKey.type = this.getSupportedVerificationType()
|
|
57
58
|
return new Ed25519Signature2020({
|
|
58
59
|
key: verificationKey,
|
|
59
60
|
signer: signer,
|