@veramo/credential-ld 3.1.2-next.97 → 3.1.3-next.112

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 +1 @@
1
- {"version":3,"file":"ld-default-contexts.d.ts","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AASpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,kCAe5B,CAAA"}
1
+ {"version":3,"file":"ld-default-contexts.d.ts","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,kCAe5B,CAAA"}
@@ -33,32 +33,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.LdDefaultContexts = void 0;
36
- const fs = __importStar(require("fs"));
37
- const path = __importStar(require("path"));
38
36
  function _read(_path) {
39
37
  return __awaiter(this, void 0, void 0, function* () {
40
- const contextDefinition = yield fs.promises.readFile(path.join(__dirname, '../contexts', _path), {
41
- encoding: 'utf8',
42
- });
43
- return JSON.parse(contextDefinition);
38
+ return yield Promise.resolve().then(() => __importStar(require('../contexts/' + _path)));
44
39
  });
45
40
  }
46
41
  /**
47
42
  * Provides a hardcoded map of common context definitions
48
43
  */
49
44
  exports.LdDefaultContexts = new Map([
50
- ['https://www.w3.org/2018/credentials/v1', _read('w3_2018_credentials_v1.jsonld')],
51
- ['https://www.w3.org/ns/did/v1', _read('security_context_v1.jsonld')],
52
- ['https://w3id.org/did/v0.11', _read('did_v0.11.jsonld')],
53
- ['https://veramo.io/contexts/socialmedia/v1', _read('socialmedia-v1.jsonld')],
54
- ['https://veramo.io/contexts/kyc/v1', _read('kyc-v1.jsonld')],
55
- ['https://veramo.io/contexts/profile/v1', _read('profile-v1.jsonld')],
56
- ['https://ns.did.ai/transmute/v1', _read('transmute_v1.jsonld')],
45
+ ['https://www.w3.org/2018/credentials/v1', _read('w3_2018_credentials_v1.json')],
46
+ ['https://www.w3.org/ns/did/v1', _read('security_context_v1.json')],
47
+ ['https://w3id.org/did/v0.11', _read('did_v0.11.json')],
48
+ ['https://veramo.io/contexts/socialmedia/v1', _read('socialmedia-v1.json')],
49
+ ['https://veramo.io/contexts/kyc/v1', _read('kyc-v1.json')],
50
+ ['https://veramo.io/contexts/profile/v1', _read('profile-v1.json')],
51
+ ['https://ns.did.ai/transmute/v1', _read('transmute_v1.json')],
57
52
  [
58
53
  'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
59
- _read('lds-ecdsa-secp256k1-recovery2020-0.0.jsonld'),
54
+ _read('lds-ecdsa-secp256k1-recovery2020-0.0.json'),
60
55
  ],
61
- ['https://w3id.org/security/suites/ed25519-2018/v1', _read('ed25519-signature-2018-v1.jsonld')],
62
- ['https://w3id.org/security/suites/x25519-2019/v1', _read('X25519KeyAgreementKey2019.jsonld')],
56
+ ['https://w3id.org/security/suites/ed25519-2018/v1', _read('ed25519-signature-2018-v1.json')],
57
+ ['https://w3id.org/security/suites/x25519-2019/v1', _read('X25519KeyAgreementKey2019.json')],
63
58
  ]);
64
59
  //# sourceMappingURL=ld-default-contexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAG5B,SAAe,KAAK,CAAC,KAAa;;QAChC,MAAM,iBAAiB,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE;YAC/F,Q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vD,CAAC,2CAA2C,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC3E,CAAC,mCAAmC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC3D,CAAC,uCAAuC,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnE,CAAC,gCAAgC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC9D;QACE,6GAA6G;QAC7G,KAAK,CAAC,2CAA2C,CAAC;KACnD;IACD,CAAC,kDAAkD,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAC7F,CAAC,iDAAiD,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;CAC7F,CAAC,CAAA"}
File without changes
File without changes
File without changes
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.2-next.97+3d2a57ba",
4
+ "version": "3.1.3-next.112+8497088a",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "scripts": {
@@ -17,9 +17,9 @@
17
17
  "@transmute/credentials-context": "^0.7.0-unstable.34",
18
18
  "@transmute/ed25519-signature-2018": "^0.7.0-unstable.34",
19
19
  "@transmute/lds-ecdsa-secp256k1-recovery2020": "^0.0.7",
20
- "@veramo/core": "^3.1.2-next.97+3d2a57ba",
21
- "@veramo/did-resolver": "^3.1.2-next.97+3d2a57ba",
22
- "@veramo/utils": "^3.1.2-next.97+3d2a57ba",
20
+ "@veramo/core": "^3.1.3-next.112+8497088a",
21
+ "@veramo/did-resolver": "^3.1.3-next.112+8497088a",
22
+ "@veramo/utils": "^3.1.3-next.112+8497088a",
23
23
  "debug": "^4.3.3",
24
24
  "did-resolver": "^3.1.5",
25
25
  "jsonld": "^5.2.0",
@@ -30,12 +30,12 @@
30
30
  "devDependencies": {
31
31
  "@types/debug": "4.1.7",
32
32
  "borc": "3.0.0",
33
- "typescript": "4.6.4"
33
+ "typescript": "4.7.2"
34
34
  },
35
35
  "files": [
36
36
  "build/**/*",
37
37
  "src/**/*",
38
- "contexts/**/*.jsonld",
38
+ "contexts/**/*.json",
39
39
  "plugin.schema.json",
40
40
  "README.md",
41
41
  "LICENSE"
@@ -47,5 +47,5 @@
47
47
  "author": "Mircea Nistor <mircea.nistor@mesh.xyz>",
48
48
  "license": "Apache-2.0",
49
49
  "keywords": [],
50
- "gitHead": "3d2a57ba10d096af5dea19a59fc790c39fa94a5d"
50
+ "gitHead": "8497088accdc20080bd8857b225ffb177e2fbd46"
51
51
  }
@@ -1,30 +1,25 @@
1
- import * as fs from 'fs'
2
- import * as path from 'path'
3
1
  import { ContextDoc } from './types'
4
2
 
5
3
  async function _read(_path: string): Promise<ContextDoc> {
6
- const contextDefinition = await fs.promises.readFile(path.join(__dirname, '../contexts', _path), {
7
- encoding: 'utf8',
8
- })
9
- return JSON.parse(contextDefinition)
4
+ return await import('../contexts/' + _path);
10
5
  }
11
6
 
12
7
  /**
13
8
  * Provides a hardcoded map of common context definitions
14
9
  */
15
10
  export const LdDefaultContexts = new Map([
16
- ['https://www.w3.org/2018/credentials/v1', _read('w3_2018_credentials_v1.jsonld')],
17
- ['https://www.w3.org/ns/did/v1', _read('security_context_v1.jsonld')],
18
- ['https://w3id.org/did/v0.11', _read('did_v0.11.jsonld')],
11
+ ['https://www.w3.org/2018/credentials/v1', _read('w3_2018_credentials_v1.json')],
12
+ ['https://www.w3.org/ns/did/v1', _read('security_context_v1.json')],
13
+ ['https://w3id.org/did/v0.11', _read('did_v0.11.json')],
19
14
 
20
- ['https://veramo.io/contexts/socialmedia/v1', _read('socialmedia-v1.jsonld')],
21
- ['https://veramo.io/contexts/kyc/v1', _read('kyc-v1.jsonld')],
22
- ['https://veramo.io/contexts/profile/v1', _read('profile-v1.jsonld')],
23
- ['https://ns.did.ai/transmute/v1', _read('transmute_v1.jsonld')],
15
+ ['https://veramo.io/contexts/socialmedia/v1', _read('socialmedia-v1.json')],
16
+ ['https://veramo.io/contexts/kyc/v1', _read('kyc-v1.json')],
17
+ ['https://veramo.io/contexts/profile/v1', _read('profile-v1.json')],
18
+ ['https://ns.did.ai/transmute/v1', _read('transmute_v1.json')],
24
19
  [
25
20
  'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
26
- _read('lds-ecdsa-secp256k1-recovery2020-0.0.jsonld'),
21
+ _read('lds-ecdsa-secp256k1-recovery2020-0.0.json'),
27
22
  ],
28
- ['https://w3id.org/security/suites/ed25519-2018/v1', _read('ed25519-signature-2018-v1.jsonld')],
29
- ['https://w3id.org/security/suites/x25519-2019/v1', _read('X25519KeyAgreementKey2019.jsonld')],
23
+ ['https://w3id.org/security/suites/ed25519-2018/v1', _read('ed25519-signature-2018-v1.json')],
24
+ ['https://w3id.org/security/suites/x25519-2019/v1', _read('X25519KeyAgreementKey2019.json')],
30
25
  ])