@trustvc/trustvc 1.0.0-alpha.1 → 1.0.0-alpha.2

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.
Files changed (77) hide show
  1. package/dist/__tests__/fixtures/fixtures.d.mts +436 -0
  2. package/dist/__tests__/fixtures/fixtures.d.ts +436 -0
  3. package/dist/__tests__/fixtures/fixtures.js +715 -0
  4. package/dist/core/decrypt.d.mts +3 -0
  5. package/dist/core/decrypt.d.ts +3 -0
  6. package/dist/core/decrypt.js +23 -0
  7. package/dist/core/encrypt.d.mts +3 -0
  8. package/dist/core/encrypt.d.ts +3 -0
  9. package/dist/core/encrypt.js +23 -0
  10. package/dist/core/fragments/document-integrity/w3cSignatureIntegrity.d.mts +5 -0
  11. package/dist/core/fragments/document-integrity/w3cSignatureIntegrity.d.ts +5 -0
  12. package/dist/core/fragments/document-integrity/w3cSignatureIntegrity.js +48 -0
  13. package/dist/core/fragments/document-status/w3cCredentialStatus.d.mts +5 -0
  14. package/dist/core/fragments/document-status/w3cCredentialStatus.d.ts +5 -0
  15. package/dist/core/fragments/document-status/w3cCredentialStatus.js +54 -0
  16. package/dist/core/fragments/issuer-identity/w3cIssuerIdentity.d.mts +5 -0
  17. package/dist/core/fragments/issuer-identity/w3cIssuerIdentity.d.ts +5 -0
  18. package/dist/core/fragments/issuer-identity/w3cIssuerIdentity.js +74 -0
  19. package/dist/core/index.d.mts +5 -0
  20. package/dist/core/index.d.ts +5 -0
  21. package/dist/core/index.js +26 -0
  22. package/dist/core/verify.d.mts +6 -0
  23. package/dist/core/verify.d.ts +6 -0
  24. package/dist/core/verify.js +34 -0
  25. package/dist/esm/__tests__/fixtures/fixtures.js +701 -0
  26. package/dist/esm/core/decrypt.js +21 -0
  27. package/dist/esm/core/encrypt.js +21 -0
  28. package/dist/esm/core/fragments/document-integrity/w3cSignatureIntegrity.js +46 -0
  29. package/dist/esm/core/fragments/document-status/w3cCredentialStatus.js +52 -0
  30. package/dist/esm/core/fragments/issuer-identity/w3cIssuerIdentity.js +72 -0
  31. package/dist/esm/core/index.js +3 -0
  32. package/dist/esm/core/verify.js +32 -0
  33. package/dist/esm/index.js +3 -0
  34. package/dist/esm/open-attestation/index.js +4 -0
  35. package/dist/esm/open-attestation/sign.js +10 -0
  36. package/dist/esm/open-attestation/types.js +1 -0
  37. package/dist/esm/open-attestation/verify.js +13 -0
  38. package/dist/esm/open-attestation/wrap.js +10 -0
  39. package/dist/esm/utils/stringUtils.js +21 -0
  40. package/dist/esm/w3c/index.js +3 -0
  41. package/dist/esm/w3c/sign.js +9 -0
  42. package/dist/esm/w3c/types.js +2 -0
  43. package/dist/esm/w3c/verify.js +9 -0
  44. package/dist/index.d.mts +14 -0
  45. package/dist/index.d.ts +14 -0
  46. package/dist/index.js +26 -0
  47. package/dist/open-attestation/index.d.mts +6 -0
  48. package/dist/open-attestation/index.d.ts +6 -0
  49. package/dist/open-attestation/index.js +33 -0
  50. package/dist/open-attestation/sign.d.mts +7 -0
  51. package/dist/open-attestation/sign.d.ts +7 -0
  52. package/dist/open-attestation/sign.js +12 -0
  53. package/dist/open-attestation/types.d.mts +8 -0
  54. package/dist/open-attestation/types.d.ts +8 -0
  55. package/dist/open-attestation/types.js +18 -0
  56. package/dist/open-attestation/verify.d.mts +5 -0
  57. package/dist/open-attestation/verify.d.ts +5 -0
  58. package/dist/open-attestation/verify.js +15 -0
  59. package/dist/open-attestation/wrap.d.mts +5 -0
  60. package/dist/open-attestation/wrap.d.ts +5 -0
  61. package/dist/open-attestation/wrap.js +12 -0
  62. package/dist/utils/stringUtils.d.mts +5 -0
  63. package/dist/utils/stringUtils.d.ts +5 -0
  64. package/dist/utils/stringUtils.js +25 -0
  65. package/dist/w3c/index.d.mts +4 -0
  66. package/dist/w3c/index.d.ts +4 -0
  67. package/dist/w3c/index.js +26 -0
  68. package/dist/w3c/sign.d.mts +6 -0
  69. package/dist/w3c/sign.d.ts +6 -0
  70. package/dist/w3c/sign.js +11 -0
  71. package/dist/w3c/types.d.mts +2 -0
  72. package/dist/w3c/types.d.ts +2 -0
  73. package/dist/w3c/types.js +27 -0
  74. package/dist/w3c/verify.d.mts +5 -0
  75. package/dist/w3c/verify.d.ts +5 -0
  76. package/dist/w3c/verify.js +11 -0
  77. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var sign = require('./sign');
4
+ var verify = require('./verify');
5
+ var types = require('./types');
6
+
7
+
8
+
9
+ Object.keys(sign).forEach(function (k) {
10
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: function () { return sign[k]; }
13
+ });
14
+ });
15
+ Object.keys(verify).forEach(function (k) {
16
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
17
+ enumerable: true,
18
+ get: function () { return verify[k]; }
19
+ });
20
+ });
21
+ Object.keys(types).forEach(function (k) {
22
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
23
+ enumerable: true,
24
+ get: function () { return types[k]; }
25
+ });
26
+ });
@@ -0,0 +1,6 @@
1
+ import { RawVerifiableCredential, SigningResult } from '@trustvc/w3c-vc';
2
+ import { PrivateKeyPair } from '@trustvc/w3c-issuer';
3
+
4
+ declare const signW3C: (credential: RawVerifiableCredential, keyPair: PrivateKeyPair, cryptoSuite?: string) => Promise<SigningResult>;
5
+
6
+ export { signW3C };
@@ -0,0 +1,6 @@
1
+ import { RawVerifiableCredential, SigningResult } from '@trustvc/w3c-vc';
2
+ import { PrivateKeyPair } from '@trustvc/w3c-issuer';
3
+
4
+ declare const signW3C: (credential: RawVerifiableCredential, keyPair: PrivateKeyPair, cryptoSuite?: string) => Promise<SigningResult>;
5
+
6
+ export { signW3C };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var w3cVc = require('@trustvc/w3c-vc');
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ const signW3C = /* @__PURE__ */ __name(async (credential, keyPair, cryptoSuite = "BbsBlsSignature2020") => {
8
+ return w3cVc.signCredential(credential, keyPair, cryptoSuite);
9
+ }, "signW3C");
10
+
11
+ exports.signW3C = signW3C;
@@ -0,0 +1,2 @@
1
+ export { RawVerifiableCredential, SignedVerifiableCredential, SigningResult, VerificationResult } from '@trustvc/w3c-vc';
2
+ export { PrivateKeyPair } from '@trustvc/w3c-issuer';
@@ -0,0 +1,2 @@
1
+ export { RawVerifiableCredential, SignedVerifiableCredential, SigningResult, VerificationResult } from '@trustvc/w3c-vc';
2
+ export { PrivateKeyPair } from '@trustvc/w3c-issuer';
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var w3cVc = require('@trustvc/w3c-vc');
4
+ var w3cIssuer = require('@trustvc/w3c-issuer');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "RawVerifiableCredential", {
9
+ enumerable: true,
10
+ get: function () { return w3cVc.RawVerifiableCredential; }
11
+ });
12
+ Object.defineProperty(exports, "SignedVerifiableCredential", {
13
+ enumerable: true,
14
+ get: function () { return w3cVc.SignedVerifiableCredential; }
15
+ });
16
+ Object.defineProperty(exports, "SigningResult", {
17
+ enumerable: true,
18
+ get: function () { return w3cVc.SigningResult; }
19
+ });
20
+ Object.defineProperty(exports, "VerificationResult", {
21
+ enumerable: true,
22
+ get: function () { return w3cVc.VerificationResult; }
23
+ });
24
+ Object.defineProperty(exports, "PrivateKeyPair", {
25
+ enumerable: true,
26
+ get: function () { return w3cIssuer.PrivateKeyPair; }
27
+ });
@@ -0,0 +1,5 @@
1
+ import { SignedVerifiableCredential, VerificationResult } from '@trustvc/w3c-vc';
2
+
3
+ declare const verifyW3CSignature: (credential: SignedVerifiableCredential) => Promise<VerificationResult>;
4
+
5
+ export { verifyW3CSignature };
@@ -0,0 +1,5 @@
1
+ import { SignedVerifiableCredential, VerificationResult } from '@trustvc/w3c-vc';
2
+
3
+ declare const verifyW3CSignature: (credential: SignedVerifiableCredential) => Promise<VerificationResult>;
4
+
5
+ export { verifyW3CSignature };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var w3cVc = require('@trustvc/w3c-vc');
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ const verifyW3CSignature = /* @__PURE__ */ __name(async (credential) => {
8
+ return w3cVc.verifyCredential(credential);
9
+ }, "verifyW3CSignature");
10
+
11
+ exports.verifyW3CSignature = verifyW3CSignature;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustvc/trustvc",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.2",
4
4
  "description": "TrustVC library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",