@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.
- package/dist/__tests__/fixtures/fixtures.d.mts +436 -0
- package/dist/__tests__/fixtures/fixtures.d.ts +436 -0
- package/dist/__tests__/fixtures/fixtures.js +715 -0
- package/dist/core/decrypt.d.mts +3 -0
- package/dist/core/decrypt.d.ts +3 -0
- package/dist/core/decrypt.js +23 -0
- package/dist/core/encrypt.d.mts +3 -0
- package/dist/core/encrypt.d.ts +3 -0
- package/dist/core/encrypt.js +23 -0
- package/dist/core/fragments/document-integrity/w3cSignatureIntegrity.d.mts +5 -0
- package/dist/core/fragments/document-integrity/w3cSignatureIntegrity.d.ts +5 -0
- package/dist/core/fragments/document-integrity/w3cSignatureIntegrity.js +48 -0
- package/dist/core/fragments/document-status/w3cCredentialStatus.d.mts +5 -0
- package/dist/core/fragments/document-status/w3cCredentialStatus.d.ts +5 -0
- package/dist/core/fragments/document-status/w3cCredentialStatus.js +54 -0
- package/dist/core/fragments/issuer-identity/w3cIssuerIdentity.d.mts +5 -0
- package/dist/core/fragments/issuer-identity/w3cIssuerIdentity.d.ts +5 -0
- package/dist/core/fragments/issuer-identity/w3cIssuerIdentity.js +74 -0
- package/dist/core/index.d.mts +5 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +26 -0
- package/dist/core/verify.d.mts +6 -0
- package/dist/core/verify.d.ts +6 -0
- package/dist/core/verify.js +34 -0
- package/dist/esm/__tests__/fixtures/fixtures.js +701 -0
- package/dist/esm/core/decrypt.js +21 -0
- package/dist/esm/core/encrypt.js +21 -0
- package/dist/esm/core/fragments/document-integrity/w3cSignatureIntegrity.js +46 -0
- package/dist/esm/core/fragments/document-status/w3cCredentialStatus.js +52 -0
- package/dist/esm/core/fragments/issuer-identity/w3cIssuerIdentity.js +72 -0
- package/dist/esm/core/index.js +3 -0
- package/dist/esm/core/verify.js +32 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/open-attestation/index.js +4 -0
- package/dist/esm/open-attestation/sign.js +10 -0
- package/dist/esm/open-attestation/types.js +1 -0
- package/dist/esm/open-attestation/verify.js +13 -0
- package/dist/esm/open-attestation/wrap.js +10 -0
- package/dist/esm/utils/stringUtils.js +21 -0
- package/dist/esm/w3c/index.js +3 -0
- package/dist/esm/w3c/sign.js +9 -0
- package/dist/esm/w3c/types.js +2 -0
- package/dist/esm/w3c/verify.js +9 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +26 -0
- package/dist/open-attestation/index.d.mts +6 -0
- package/dist/open-attestation/index.d.ts +6 -0
- package/dist/open-attestation/index.js +33 -0
- package/dist/open-attestation/sign.d.mts +7 -0
- package/dist/open-attestation/sign.d.ts +7 -0
- package/dist/open-attestation/sign.js +12 -0
- package/dist/open-attestation/types.d.mts +8 -0
- package/dist/open-attestation/types.d.ts +8 -0
- package/dist/open-attestation/types.js +18 -0
- package/dist/open-attestation/verify.d.mts +5 -0
- package/dist/open-attestation/verify.d.ts +5 -0
- package/dist/open-attestation/verify.js +15 -0
- package/dist/open-attestation/wrap.d.mts +5 -0
- package/dist/open-attestation/wrap.d.ts +5 -0
- package/dist/open-attestation/wrap.js +12 -0
- package/dist/utils/stringUtils.d.mts +5 -0
- package/dist/utils/stringUtils.d.ts +5 -0
- package/dist/utils/stringUtils.js +25 -0
- package/dist/w3c/index.d.mts +4 -0
- package/dist/w3c/index.d.ts +4 -0
- package/dist/w3c/index.js +26 -0
- package/dist/w3c/sign.d.mts +6 -0
- package/dist/w3c/sign.d.ts +6 -0
- package/dist/w3c/sign.js +11 -0
- package/dist/w3c/types.d.mts +2 -0
- package/dist/w3c/types.d.ts +2 -0
- package/dist/w3c/types.js +27 -0
- package/dist/w3c/verify.d.mts +5 -0
- package/dist/w3c/verify.d.ts +5 -0
- package/dist/w3c/verify.js +11 -0
- 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 };
|
package/dist/w3c/sign.js
ADDED
|
@@ -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,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,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;
|