@veramo/credential-ld 3.1.5-next.122 → 3.1.5-next.126
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/index.d.ts +13 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +13 -1
- package/build/index.js.map +1 -1
- package/build/ld-default-contexts.d.ts +6 -1
- package/build/ld-default-contexts.d.ts.map +1 -1
- package/build/ld-default-contexts.js +6 -1
- package/build/ld-default-contexts.js.map +1 -1
- package/build/ld-suites.d.ts +6 -1
- package/build/ld-suites.d.ts.map +1 -1
- package/build/ld-suites.js +5 -0
- package/build/ld-suites.js.map +1 -1
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts +5 -0
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts.map +1 -1
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.js +5 -0
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.js.map +1 -1
- package/build/suites/Ed25519Signature2018.d.ts +5 -0
- package/build/suites/Ed25519Signature2018.d.ts.map +1 -1
- package/build/suites/Ed25519Signature2018.js +5 -0
- package/build/suites/Ed25519Signature2018.js.map +1 -1
- package/build/tsdoc-metadata.json +1 -1
- package/build/types.d.ts +23 -17
- package/build/types.d.ts.map +1 -1
- package/package.json +6 -6
- package/plugin.schema.json +8 -6
- package/src/index.ts +14 -1
- package/src/ld-default-contexts.ts +6 -1
- package/src/ld-suites.ts +6 -1
- package/src/suites/EcdsaSecp256k1RecoverySignature2020.ts +5 -0
- package/src/suites/Ed25519Signature2018.ts +5 -0
- package/src/types.ts +23 -18
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provides a {@link @veramo/credential-ld#CredentialIssuerLD | plugin} for the {@link @veramo/core#Agent} that
|
|
2
|
+
* Provides a {@link @veramo/credential-ld#CredentialIssuerLD | plugin} for the {@link @veramo/core#Agent} that
|
|
3
|
+
* implements
|
|
3
4
|
* {@link @veramo/credential-ld#ICredentialIssuerLD} interface.
|
|
4
5
|
*
|
|
6
|
+
* This plugin adds support for working with JSON-LD credentials.
|
|
7
|
+
* When installed, this plugin will be automatically used by
|
|
8
|
+
* {@link @veramo/credential-w3c#CredentialIssuer | CredentialIssuer} if the user requests the credential to be signed
|
|
9
|
+
* by one of the installed signature suites.
|
|
10
|
+
*
|
|
5
11
|
* @packageDocumentation
|
|
6
12
|
*/
|
|
7
13
|
export { CredentialIssuerLD } from './action-handler';
|
|
@@ -10,6 +16,12 @@ export { LdDefaultContexts } from './ld-default-contexts';
|
|
|
10
16
|
export { VeramoLdSignature } from './ld-suites';
|
|
11
17
|
export * from './suites/EcdsaSecp256k1RecoverySignature2020';
|
|
12
18
|
export * from './suites/Ed25519Signature2018';
|
|
19
|
+
/**
|
|
20
|
+
* The parameter and return types schemas for the {@link @veramo/credential-ld#CredentialIssuerLD | CredentialIssuerLD}
|
|
21
|
+
* plugin methods.
|
|
22
|
+
*
|
|
23
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
24
|
+
*/
|
|
13
25
|
declare const schema: any;
|
|
14
26
|
export { schema };
|
|
15
27
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,cAAc,8CAA8C,CAAA;AAC5D,cAAc,+BAA+B,CAAA;AAE7C;;;;;GAKG;AACH,QAAA,MAAM,MAAM,KAAmC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -16,9 +16,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.schema = exports.VeramoLdSignature = exports.LdDefaultContexts = exports.CredentialIssuerLD = void 0;
|
|
18
18
|
/**
|
|
19
|
-
* Provides a {@link @veramo/credential-ld#CredentialIssuerLD | plugin} for the {@link @veramo/core#Agent} that
|
|
19
|
+
* Provides a {@link @veramo/credential-ld#CredentialIssuerLD | plugin} for the {@link @veramo/core#Agent} that
|
|
20
|
+
* implements
|
|
20
21
|
* {@link @veramo/credential-ld#ICredentialIssuerLD} interface.
|
|
21
22
|
*
|
|
23
|
+
* This plugin adds support for working with JSON-LD credentials.
|
|
24
|
+
* When installed, this plugin will be automatically used by
|
|
25
|
+
* {@link @veramo/credential-w3c#CredentialIssuer | CredentialIssuer} if the user requests the credential to be signed
|
|
26
|
+
* by one of the installed signature suites.
|
|
27
|
+
*
|
|
22
28
|
* @packageDocumentation
|
|
23
29
|
*/
|
|
24
30
|
var action_handler_1 = require("./action-handler");
|
|
@@ -30,6 +36,12 @@ var ld_suites_1 = require("./ld-suites");
|
|
|
30
36
|
Object.defineProperty(exports, "VeramoLdSignature", { enumerable: true, get: function () { return ld_suites_1.VeramoLdSignature; } });
|
|
31
37
|
__exportStar(require("./suites/EcdsaSecp256k1RecoverySignature2020"), exports);
|
|
32
38
|
__exportStar(require("./suites/Ed25519Signature2018"), exports);
|
|
39
|
+
/**
|
|
40
|
+
* The parameter and return types schemas for the {@link @veramo/credential-ld#CredentialIssuerLD | CredentialIssuerLD}
|
|
41
|
+
* plugin methods.
|
|
42
|
+
*
|
|
43
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
44
|
+
*/
|
|
33
45
|
const schema = require('../plugin.schema.json');
|
|
34
46
|
exports.schema = schema;
|
|
35
47
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;GAWG;AACH,mDAAqD;AAA5C,oHAAA,kBAAkB,OAAA;AAC3B,0CAAuB;AACvB,6DAAyD;AAAhD,wHAAA,iBAAiB,OAAA;AAC1B,yCAA+C;AAAtC,8GAAA,iBAAiB,OAAA;AAC1B,+EAA4D;AAC5D,gEAA6C;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AACtC,wBAAM"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ContextDoc } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Provides a hardcoded map of common context definitions
|
|
3
|
+
* Provides a hardcoded map of common Linked Data `@context` definitions.
|
|
4
|
+
*
|
|
5
|
+
* You can use this to bootstrap the `@context` definitions used by
|
|
6
|
+
* {@link @veramo/credential-ld#CredentialIssuerLD | CredentialIssuerLD} with these common context definitions.
|
|
7
|
+
*
|
|
8
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
4
9
|
*/
|
|
5
10
|
export declare const LdDefaultContexts: Map<string, Promise<ContextDoc>>;
|
|
6
11
|
//# sourceMappingURL=ld-default-contexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,kCAkB5B,CAAA"}
|
|
@@ -39,7 +39,12 @@ function _read(_path) {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Provides a hardcoded map of common context definitions
|
|
42
|
+
* Provides a hardcoded map of common Linked Data `@context` definitions.
|
|
43
|
+
*
|
|
44
|
+
* You can use this to bootstrap the `@context` definitions used by
|
|
45
|
+
* {@link @veramo/credential-ld#CredentialIssuerLD | CredentialIssuerLD} with these common context definitions.
|
|
46
|
+
*
|
|
47
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
43
48
|
*/
|
|
44
49
|
exports.LdDefaultContexts = new Map([
|
|
45
50
|
['https://www.w3.org/2018/credentials/v1', _read('www.w3.org_2018_credentials_v1.json')],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAe,KAAK,CAAC,KAAa;;QAChC,OAAO,wDAAa,aAAa,GAAG,KAAK,GAAC,CAAC;IAC7C,CAAC;CAAA;AAED
|
|
1
|
+
{"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAe,KAAK,CAAC,KAAa;;QAChC,OAAO,wDAAa,aAAa,GAAG,KAAK,GAAC,CAAC;IAC7C,CAAC;CAAA;AAED;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,CAAC,wCAAwC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACxF,CAAC,8BAA8B,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACpE,CAAC,8BAA8B,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACpE,CAAC,8BAA8B,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACpE,CAAC,uCAAuC,EAAE,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACtF,CAAC,kDAAkD,EAAE,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAC5G,CAAC,iDAAiD,EAAE,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAC1G,2DAA2D;IAC3D,+EAA+E;IAC/E,+DAA+D;IAC/D,CAAC,uCAAuC,EAAE,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACtF,kEAAkE;IAClE,CAAC,6GAA6G,EAAE,KAAK,CAAC,2CAA2C,CAAC,CAAC;IACnK,CAAC,6GAA6G,EAAE,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACjL,CAAC,4DAA4D,EAAE,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAChI,iGAAiG;IACjG,gGAAgG;CACjG,CAAC,CAAA"}
|
package/build/ld-suites.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { CredentialPayload, IAgentContext, IKey, IKeyManager, IResolver, PresentationPayload, TKeyType } from '@veramo/core';
|
|
2
|
-
import { DIDDocument } from 'did-resolver
|
|
2
|
+
import { DIDDocument } from 'did-resolver';
|
|
3
3
|
export declare type RequiredAgentMethods = IResolver & Pick<IKeyManager, 'keyManagerGet' | 'keyManagerSign'>;
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Veramo adapters of LinkedDataSignature suites.
|
|
6
|
+
*
|
|
7
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
8
|
+
*/
|
|
4
9
|
export declare abstract class VeramoLdSignature {
|
|
5
10
|
abstract getSupportedVerificationType(): string;
|
|
6
11
|
abstract getSupportedVeramoKeyType(): TKeyType;
|
package/build/ld-suites.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-suites.d.ts","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ld-suites.d.ts","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,oBAAY,oBAAoB,GAAG,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,gBAAgB,CAAC,CAAA;AAEpG;;;;GAIG;AACH,8BAAsB,iBAAiB;IAMrC,QAAQ,CAAC,4BAA4B,IAAI,MAAM;IAE/C,QAAQ,CAAC,yBAAyB,IAAI,QAAQ;IAE9C,QAAQ,CAAC,kBAAkB,CACzB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,GAAG;IAEN,QAAQ,CAAC,uBAAuB,IAAI,GAAG;IAEvC,QAAQ,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAEhF,QAAQ,CAAC,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAExE,0BAA0B,CAAC,YAAY,EAAE,mBAAmB,GAAG,IAAI;CAQpE"}
|
package/build/ld-suites.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VeramoLdSignature = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Veramo adapters of LinkedDataSignature suites.
|
|
6
|
+
*
|
|
7
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
8
|
+
*/
|
|
4
9
|
class VeramoLdSignature {
|
|
5
10
|
preSigningPresModification(presentation) {
|
|
6
11
|
var _a;
|
package/build/ld-suites.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-suites.js","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":";;;AAaA,MAAsB,iBAAiB;IAuBrC,0BAA0B,CAAC,YAAiC;;QAC1D,mGAAmG;QACnG,gEAAgE;QAChE,MAAM,qBAAqB,GAAG,YAAmB,CAAA;QACjD,IAAI,CAAA,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,QAAQ,0CAAE,MAAM,KAAI,CAAC,EAAE;YAChD,OAAO,qBAAqB,CAAC,QAAQ,CAAA;SACtC;IACH,CAAC;CACF;AA/BD,8CA+BC"}
|
|
1
|
+
{"version":3,"file":"ld-suites.js","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":";;;AAaA;;;;GAIG;AACH,MAAsB,iBAAiB;IAuBrC,0BAA0B,CAAC,YAAiC;;QAC1D,mGAAmG;QACnG,gEAAgE;QAChE,MAAM,qBAAqB,GAAG,YAAmB,CAAA;QACjD,IAAI,CAAA,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,QAAQ,0CAAE,MAAM,KAAI,CAAC,EAAE;YAChD,OAAO,qBAAqB,CAAC,QAAQ,CAAA;SACtC;IACH,CAAC;CACF;AA/BD,8CA+BC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { RequiredAgentMethods, VeramoLdSignature } from '../ld-suites';
|
|
2
2
|
import { CredentialPayload, DIDDocument, IAgentContext, IKey, TKeyType } from '@veramo/core';
|
|
3
|
+
/**
|
|
4
|
+
* Veramo wrapper for the EcdsaSecp256k1RecoverySignature2020 suite by Transmute Industries
|
|
5
|
+
*
|
|
6
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
7
|
+
*/
|
|
3
8
|
export declare class VeramoEcdsaSecp256k1RecoverySignature2020 extends VeramoLdSignature {
|
|
4
9
|
getSupportedVerificationType(): string;
|
|
5
10
|
getSupportedVeramoKeyType(): TKeyType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.d.ts","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.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;AAS5F,qBAAa,yCAA0C,SAAQ,iBAAiB;IAC9E,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,GAAG;IAyCN,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAG/D,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAmBvE,UAAU,IAAI,MAAM;CAGrB"}
|
|
1
|
+
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.d.ts","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.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;AAS5F;;;;GAIG;AACH,qBAAa,yCAA0C,SAAQ,iBAAiB;IAC9E,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,GAAG;IAyCN,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAG/D,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAmBvE,UAAU,IAAI,MAAM;CAGrB"}
|
|
@@ -37,6 +37,11 @@ const ld_suites_1 = require("../ld-suites");
|
|
|
37
37
|
const lds_ecdsa_secp256k1_recovery2020_1 = require("@transmute/lds-ecdsa-secp256k1-recovery2020");
|
|
38
38
|
const u8a = __importStar(require("uint8arrays"));
|
|
39
39
|
const utils_1 = require("@veramo/utils");
|
|
40
|
+
/**
|
|
41
|
+
* Veramo wrapper for the EcdsaSecp256k1RecoverySignature2020 suite by Transmute Industries
|
|
42
|
+
*
|
|
43
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
44
|
+
*/
|
|
40
45
|
class VeramoEcdsaSecp256k1RecoverySignature2020 extends ld_suites_1.VeramoLdSignature {
|
|
41
46
|
getSupportedVerificationType() {
|
|
42
47
|
return 'EcdsaSecp256k1RecoveryMethod2020';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.js","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAsE;AAEtE,kGAGoD;A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AC,UAAU,CAAC,CAAA;wBAClE,CAAC,CAAC,mBAAmB,GAAG,UAAU,KAAK,IAAI,OAAO,EAAE,CAAA;qBACrD;iBACF;YACH,CAAC,CAAC,CAAA;SACH;IACH,CAAC;IACD,UAAU;QACR,OAAO,4DAA4D,CAAA;IACrE,CAAC;CACF;AApFD,8FAoFC"}
|
|
1
|
+
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.js","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAsE;AAEtE,kGAGoD;AAEpD,iDAAkC;AAClC,yCAAuD;AAEvD;;;;GAIG;AACH,MAAa,yCAA0C,SAAQ,6BAAiB;IAC9E,4BAA4B;QAC1B,OAAO,kCAAkC,CAAA;IAC3C,CAAC;IAED,yBAAyB;QACvB,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,kBAAkB,CAChB,GAAS,EACT,GAAW,EACX,kBAA0B,EAC1B,OAA4C;QAE5C,MAAM,UAAU,GAAG,GAAG,CAAA;QACtB,MAAM,MAAM,GAAG;YACb,wBAAwB;YACxB,IAAI,EAAE,CAAO,IAA0B,EAAmB,EAAE;gBAC1D,MAAM,MAAM,GAAG;oBACb,GAAG,EAAE,UAAU;oBACf,GAAG,EAAE,KAAK;oBACV,IAAI,EAAE,CAAC,KAAK,CAAC;iBACd,CAAA;gBACD,MAAM,YAAY,GAAG,IAAA,sBAAc,EAAC,MAAM,CAAC,CAAA;gBAC3C,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,YAAY,GAAG,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;gBAC1F,MAAM,aAAa,GAAG,GAAG,CAAC,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;gBAC3D,MAAM,SAAS,GAAG,MAAM,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,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;SAC5C;QAED,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YAC/C,oFAAoF;YACpF,MAAA,MAAM,CAAC,kBAAkB,0CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACvC,IAAI,CAAC,CAAC,mBAAmB,EAAE;oBACzB,IAAI,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE;wBACxD,MAAM,CAAE,OAAO,EAAE,KAAK,CAAE,GAAG,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;wBAClE,CAAC,CAAC,mBAAmB,GAAG,UAAU,KAAK,IAAI,OAAO,EAAE,CAAA;qBACrD;iBACF;YACH,CAAC,CAAC,CAAA;SACH;IACH,CAAC;IACD,UAAU;QACR,OAAO,4DAA4D,CAAA;IACrE,CAAC;CACF;AApFD,8FAoFC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { RequiredAgentMethods, VeramoLdSignature } from '../ld-suites';
|
|
2
2
|
import { CredentialPayload, DIDDocument, IAgentContext, IKey, TKeyType } from '@veramo/core';
|
|
3
|
+
/**
|
|
4
|
+
* Veramo wrapper for the Ed25519Signature2018 suite by Transmute Industries
|
|
5
|
+
*
|
|
6
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
7
|
+
*/
|
|
3
8
|
export declare class VeramoEd25519Signature2018 extends VeramoLdSignature {
|
|
4
9
|
getSupportedVerificationType(): string;
|
|
5
10
|
getSupportedVeramoKeyType(): TKeyType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ed25519Signature2018.d.ts","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2018.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACtE,OA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|
|
|
37
37
|
const ld_suites_1 = require("../ld-suites");
|
|
38
38
|
const u8a = __importStar(require("uint8arrays"));
|
|
39
39
|
const ed25519_signature_2018_1 = require("@transmute/ed25519-signature-2018");
|
|
40
|
+
/**
|
|
41
|
+
* Veramo wrapper for the Ed25519Signature2018 suite by Transmute Industries
|
|
42
|
+
*
|
|
43
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
44
|
+
*/
|
|
40
45
|
class VeramoEd25519Signature2018 extends ld_suites_1.VeramoLdSignature {
|
|
41
46
|
getSupportedVerificationType() {
|
|
42
47
|
return 'Ed25519VerificationKey2018';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ed25519Signature2018.js","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2018.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA8C;AAC9C,4CAAsE;AAEtE,iDAAkC;AAClC,8EAAoG;AAEpG,MAAa,0BAA2B,SAAQ,6BAAiB;IAC/D,4BAA4B;QAC1B,OAAO,4BAA4B,CAAA;IACrC,CAAC;IAED,yBAAyB;QACvB,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,kBAAkB,CAChB,GAAS,EACT,SAAiB,EACjB,oBAA4B,EAC5B,OAA4C;QAE5C,MAAM,UAAU,GAAG,SAAS,CAAA;QAE5B,aAAa;QACb,IAAI,EAAE,GAAG,oBAAoB,CAAA;QAE7B,MAAM,MAAM,GAAG;YACb,yBAAyB;YACzB,IAAI,EAAE,CAAO,IAA0B,EAAmB,EAAE;gBAC1D,MAAM,MAAM,GAAG;oBACb,GAAG,EAAE,OAAO;oBACZ,GAAG,EAAE,KAAK;oBACV,IAAI,EAAE,CAAC,KAAK,CAAC;iBACd,CAAA;gBACD,MAAM,YAAY,GAAG,IAAA,sBAAc,EAAC,MAAM,CAAC,CAAA;gBAC3C,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,G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;YACV,SAAS,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC;YACrD,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM;YACpB,IAAI,EAAE,IAAI,CAAC,4BAA4B,EAAE;SAC1C,CAAC,CAAA;QACF,2GAA2G;QAC3G,eAAe,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,MAAa,CAAA;QAE5C,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;CACF;AApED,gEAoEC"}
|
package/build/types.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CredentialPayload, IAgentContext, IDIDManager, IKeyManager, IPluginMethodMap, IResolver, PresentationPayload, VerifiableCredential, VerifiablePresentation } from '@veramo/core';
|
|
2
2
|
/**
|
|
3
3
|
* The interface definition for a plugin that can issue and verify Verifiable Credentials and Presentations
|
|
4
|
-
* that use JSON-LD format.
|
|
4
|
+
* that use JSON-LD format (also called Data Integrity Proofs).
|
|
5
5
|
*
|
|
6
6
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model | W3C Verifiable Credentials data model}
|
|
7
|
+
* @see {@link https://www.w3.org/TR/vc-data-model/#data-integrity-proofs | Data Integrity proofs}
|
|
7
8
|
*
|
|
8
|
-
* @beta This API
|
|
9
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
9
10
|
*/
|
|
10
11
|
export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
11
12
|
/**
|
|
@@ -20,7 +21,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
20
21
|
*
|
|
21
22
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#presentations | Verifiable Presentation data model }
|
|
22
23
|
*
|
|
23
|
-
* @beta This API
|
|
24
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
24
25
|
*/
|
|
25
26
|
createVerifiablePresentationLD(args: ICreateVerifiablePresentationLDArgs, context: IRequiredContext): Promise<VerifiablePresentation>;
|
|
26
27
|
/**
|
|
@@ -35,7 +36,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
35
36
|
*
|
|
36
37
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#credentials | Verifiable Credential data model}
|
|
37
38
|
*
|
|
38
|
-
* @beta This API
|
|
39
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
39
40
|
*/
|
|
40
41
|
createVerifiableCredentialLD(args: ICreateVerifiableCredentialLDArgs, context: IRequiredContext): Promise<VerifiableCredential>;
|
|
41
42
|
/**
|
|
@@ -48,7 +49,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
48
49
|
*
|
|
49
50
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#credentials | Verifiable Credential data model}
|
|
50
51
|
*
|
|
51
|
-
* @beta This API
|
|
52
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
52
53
|
*/
|
|
53
54
|
verifyCredentialLD(args: IVerifyCredentialLDArgs, context: IRequiredContext): Promise<boolean>;
|
|
54
55
|
/**
|
|
@@ -61,7 +62,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
61
62
|
*
|
|
62
63
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#presentations | Verifiable Credential data model}
|
|
63
64
|
*
|
|
64
|
-
* @beta This API
|
|
65
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
65
66
|
*/
|
|
66
67
|
verifyPresentationLD(args: IVerifyPresentationLDArgs, context: IRequiredContext): Promise<boolean>;
|
|
67
68
|
}
|
|
@@ -69,7 +70,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
69
70
|
* Encapsulates the parameters required to create a
|
|
70
71
|
* {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation}
|
|
71
72
|
*
|
|
72
|
-
* @beta This API
|
|
73
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
73
74
|
*/
|
|
74
75
|
export interface ICreateVerifiablePresentationLDArgs {
|
|
75
76
|
/**
|
|
@@ -79,7 +80,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
79
80
|
* The signer of the Presentation is chosen based on the `holder` property
|
|
80
81
|
* of the `presentation`
|
|
81
82
|
*
|
|
82
|
-
*
|
|
83
|
+
* `@context`, `type` and `issuanceDate` will be added automatically if omitted.
|
|
83
84
|
*/
|
|
84
85
|
presentation: PresentationPayload;
|
|
85
86
|
/**
|
|
@@ -99,7 +100,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
99
100
|
* Encapsulates the parameters required to create a
|
|
100
101
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential}
|
|
101
102
|
*
|
|
102
|
-
* @beta This API
|
|
103
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
103
104
|
*/
|
|
104
105
|
export interface ICreateVerifiableCredentialLDArgs {
|
|
105
106
|
/**
|
|
@@ -109,7 +110,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
109
110
|
* The signer of the Credential is chosen based on the `issuer.id` property
|
|
110
111
|
* of the `credential`
|
|
111
112
|
*
|
|
112
|
-
*
|
|
113
|
+
* `@context`, `type` and `issuanceDate` will be added automatically if omitted
|
|
113
114
|
*/
|
|
114
115
|
credential: CredentialPayload;
|
|
115
116
|
/**
|
|
@@ -121,7 +122,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
121
122
|
* Encapsulates the parameters required to verify a
|
|
122
123
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential}
|
|
123
124
|
*
|
|
124
|
-
* @beta This API
|
|
125
|
+
* @beta This API may change without a BREAKING CHANGE notice
|
|
125
126
|
*/
|
|
126
127
|
export interface IVerifyCredentialLDArgs {
|
|
127
128
|
/**
|
|
@@ -134,9 +135,9 @@ export interface IVerifyCredentialLDArgs {
|
|
|
134
135
|
*/
|
|
135
136
|
credential: VerifiableCredential;
|
|
136
137
|
/**
|
|
137
|
-
* Set this to true if you want the
|
|
138
|
+
* Set this to true if you want the `@context` URLs to be fetched in case they are not pre-loaded.
|
|
138
139
|
*
|
|
139
|
-
*
|
|
140
|
+
* Defaults to `false`
|
|
140
141
|
*/
|
|
141
142
|
fetchRemoteContexts?: boolean;
|
|
142
143
|
}
|
|
@@ -144,7 +145,7 @@ export interface IVerifyCredentialLDArgs {
|
|
|
144
145
|
* Encapsulates the parameters required to verify a
|
|
145
146
|
* {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation}
|
|
146
147
|
*
|
|
147
|
-
* @beta This API
|
|
148
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
148
149
|
*/
|
|
149
150
|
export interface IVerifyPresentationLDArgs {
|
|
150
151
|
/**
|
|
@@ -165,9 +166,9 @@ export interface IVerifyPresentationLDArgs {
|
|
|
165
166
|
*/
|
|
166
167
|
domain?: string;
|
|
167
168
|
/**
|
|
168
|
-
* Set this to true if you want the
|
|
169
|
+
* Set this to true if you want the `@context` URLs to be fetched in case they are not pre-loaded.
|
|
169
170
|
*
|
|
170
|
-
*
|
|
171
|
+
* Defaults to `false`
|
|
171
172
|
*/
|
|
172
173
|
fetchRemoteContexts?: boolean;
|
|
173
174
|
}
|
|
@@ -177,9 +178,14 @@ export interface IVerifyPresentationLDArgs {
|
|
|
177
178
|
*
|
|
178
179
|
* This interface can be used for static type checks, to make sure your application is properly initialized.
|
|
179
180
|
*
|
|
180
|
-
* @beta This API
|
|
181
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
181
182
|
*/
|
|
182
183
|
export declare type IRequiredContext = IAgentContext<IResolver & Pick<IDIDManager, 'didManagerGet'> & Pick<IKeyManager, 'keyManagerGet' | 'keyManagerSign'>>;
|
|
184
|
+
/**
|
|
185
|
+
* Describes a document with a `@context` property.
|
|
186
|
+
*
|
|
187
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
188
|
+
*/
|
|
183
189
|
export declare type ContextDoc = {
|
|
184
190
|
'@context': Record<string, any>;
|
|
185
191
|
};
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,cAAc,CAAA;AAErB;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;;;;;;;;;;;;OAaG;IACH,8BAA8B,CAC5B,IAAI,EAAE,mCAAmC,EACzC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAElC;;;;;;;;;;;;;OAaG;IACH,4BAA4B,CAC1B,IAAI,EAAE,iCAAiC,EACvC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAEhC;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE9F;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO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
3
|
"description": "Veramo plugin for working with W3C JSON-LD Verifiable Credentials & Presentations.",
|
|
4
|
-
"version": "3.1.5-next.
|
|
4
|
+
"version": "3.1.5-next.126+219cde25",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"@transmute/credentials-context": "^0.7.0-unstable.60",
|
|
21
21
|
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.60",
|
|
22
22
|
"@transmute/lds-ecdsa-secp256k1-recovery2020": "decentralized-identity/EcdsaSecp256k1RecoverySignature2020",
|
|
23
|
-
"@veramo/core": "^3.1.5-next.
|
|
24
|
-
"@veramo/did-resolver": "^3.1.5-next.
|
|
25
|
-
"@veramo/utils": "^3.1.5-next.
|
|
23
|
+
"@veramo/core": "^3.1.5-next.126+219cde25",
|
|
24
|
+
"@veramo/did-resolver": "^3.1.5-next.126+219cde25",
|
|
25
|
+
"@veramo/utils": "^3.1.5-next.126+219cde25",
|
|
26
26
|
"debug": "^4.3.3",
|
|
27
|
-
"did-resolver": "3.2.
|
|
27
|
+
"did-resolver": "3.2.2",
|
|
28
28
|
"uint8arrays": "^3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"author": "Mircea Nistor <mircea.nistor@mesh.xyz>",
|
|
48
48
|
"license": "Apache-2.0",
|
|
49
49
|
"keywords": [],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "219cde250e8d4f06d7978afcc38a04471342fd21"
|
|
51
51
|
}
|
package/plugin.schema.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"credential": {
|
|
9
9
|
"$ref": "#/components/schemas/CredentialPayload",
|
|
10
|
-
"description": "The json payload of the Credential according to the\n {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`\n\n
|
|
10
|
+
"description": "The json payload of the Credential according to the\n {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`\n\n`@context`, `type` and `issuanceDate` will be added automatically if omitted"
|
|
11
11
|
},
|
|
12
12
|
"keyRef": {
|
|
13
13
|
"type": "string",
|
|
@@ -100,6 +100,10 @@
|
|
|
100
100
|
"type": "string"
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
+
"required": [
|
|
104
|
+
"id",
|
|
105
|
+
"type"
|
|
106
|
+
],
|
|
103
107
|
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
|
|
104
108
|
},
|
|
105
109
|
"VerifiableCredential": {
|
|
@@ -176,7 +180,7 @@
|
|
|
176
180
|
"properties": {
|
|
177
181
|
"presentation": {
|
|
178
182
|
"$ref": "#/components/schemas/PresentationPayload",
|
|
179
|
-
"description": "The json payload of the Presentation according to the\n {@link https://www.w3.org/TR/vc-data-model/#presentations | canonical model } .\n\nThe signer of the Presentation is chosen based on the `holder` property of the `presentation`\n\n
|
|
183
|
+
"description": "The json payload of the Presentation according to the\n {@link https://www.w3.org/TR/vc-data-model/#presentations | canonical model } .\n\nThe signer of the Presentation is chosen based on the `holder` property of the `presentation`\n\n`@context`, `type` and `issuanceDate` will be added automatically if omitted."
|
|
180
184
|
},
|
|
181
185
|
"challenge": {
|
|
182
186
|
"type": "string",
|
|
@@ -329,8 +333,7 @@
|
|
|
329
333
|
},
|
|
330
334
|
"fetchRemoteContexts": {
|
|
331
335
|
"type": "boolean",
|
|
332
|
-
"description": "Set this to true if you want the
|
|
333
|
-
"default": false
|
|
336
|
+
"description": "Set this to true if you want the `@context` URLs to be fetched in case they are not pre-loaded.\n\nDefaults to `false`"
|
|
334
337
|
}
|
|
335
338
|
},
|
|
336
339
|
"required": [
|
|
@@ -355,8 +358,7 @@
|
|
|
355
358
|
},
|
|
356
359
|
"fetchRemoteContexts": {
|
|
357
360
|
"type": "boolean",
|
|
358
|
-
"description": "Set this to true if you want the
|
|
359
|
-
"default": false
|
|
361
|
+
"description": "Set this to true if you want the `@context` URLs to be fetched in case they are not pre-loaded.\n\nDefaults to `false`"
|
|
360
362
|
}
|
|
361
363
|
},
|
|
362
364
|
"required": [
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provides a {@link @veramo/credential-ld#CredentialIssuerLD | plugin} for the {@link @veramo/core#Agent} that
|
|
2
|
+
* Provides a {@link @veramo/credential-ld#CredentialIssuerLD | plugin} for the {@link @veramo/core#Agent} that
|
|
3
|
+
* implements
|
|
3
4
|
* {@link @veramo/credential-ld#ICredentialIssuerLD} interface.
|
|
4
5
|
*
|
|
6
|
+
* This plugin adds support for working with JSON-LD credentials.
|
|
7
|
+
* When installed, this plugin will be automatically used by
|
|
8
|
+
* {@link @veramo/credential-w3c#CredentialIssuer | CredentialIssuer} if the user requests the credential to be signed
|
|
9
|
+
* by one of the installed signature suites.
|
|
10
|
+
*
|
|
5
11
|
* @packageDocumentation
|
|
6
12
|
*/
|
|
7
13
|
export { CredentialIssuerLD } from './action-handler'
|
|
@@ -10,5 +16,12 @@ export { LdDefaultContexts } from './ld-default-contexts'
|
|
|
10
16
|
export { VeramoLdSignature } from './ld-suites'
|
|
11
17
|
export * from './suites/EcdsaSecp256k1RecoverySignature2020'
|
|
12
18
|
export * from './suites/Ed25519Signature2018'
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The parameter and return types schemas for the {@link @veramo/credential-ld#CredentialIssuerLD | CredentialIssuerLD}
|
|
22
|
+
* plugin methods.
|
|
23
|
+
*
|
|
24
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
25
|
+
*/
|
|
13
26
|
const schema = require('../plugin.schema.json')
|
|
14
27
|
export { schema }
|
|
@@ -5,7 +5,12 @@ async function _read(_path: string): Promise<ContextDoc> {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Provides a hardcoded map of common context definitions
|
|
8
|
+
* Provides a hardcoded map of common Linked Data `@context` definitions.
|
|
9
|
+
*
|
|
10
|
+
* You can use this to bootstrap the `@context` definitions used by
|
|
11
|
+
* {@link @veramo/credential-ld#CredentialIssuerLD | CredentialIssuerLD} with these common context definitions.
|
|
12
|
+
*
|
|
13
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
9
14
|
*/
|
|
10
15
|
export const LdDefaultContexts = new Map([
|
|
11
16
|
['https://www.w3.org/2018/credentials/v1', _read('www.w3.org_2018_credentials_v1.json')],
|
package/src/ld-suites.ts
CHANGED
|
@@ -7,10 +7,15 @@ import {
|
|
|
7
7
|
PresentationPayload,
|
|
8
8
|
TKeyType,
|
|
9
9
|
} from '@veramo/core'
|
|
10
|
-
import { DIDDocument } from 'did-resolver
|
|
10
|
+
import { DIDDocument } from 'did-resolver'
|
|
11
11
|
|
|
12
12
|
export type RequiredAgentMethods = IResolver & Pick<IKeyManager, 'keyManagerGet' | 'keyManagerSign'>
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Base class for Veramo adapters of LinkedDataSignature suites.
|
|
16
|
+
*
|
|
17
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
18
|
+
*/
|
|
14
19
|
export abstract class VeramoLdSignature {
|
|
15
20
|
// LinkedDataSignature Suites according to
|
|
16
21
|
// https://github.com/digitalbazaar/jsonld-signatures/blob/main/lib/suites/LinkedDataSignature.js
|
|
@@ -8,6 +8,11 @@ import {
|
|
|
8
8
|
import * as u8a from 'uint8arrays'
|
|
9
9
|
import { asArray, encodeJoseBlob } from '@veramo/utils'
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Veramo wrapper for the EcdsaSecp256k1RecoverySignature2020 suite by Transmute Industries
|
|
13
|
+
*
|
|
14
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
15
|
+
*/
|
|
11
16
|
export class VeramoEcdsaSecp256k1RecoverySignature2020 extends VeramoLdSignature {
|
|
12
17
|
getSupportedVerificationType(): string {
|
|
13
18
|
return 'EcdsaSecp256k1RecoveryMethod2020'
|
|
@@ -4,6 +4,11 @@ import { CredentialPayload, DIDDocument, IAgentContext, IKey, TKeyType } from '@
|
|
|
4
4
|
import * as u8a from 'uint8arrays'
|
|
5
5
|
import { Ed25519Signature2018, Ed25519VerificationKey2018 } from '@transmute/ed25519-signature-2018'
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Veramo wrapper for the Ed25519Signature2018 suite by Transmute Industries
|
|
9
|
+
*
|
|
10
|
+
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
11
|
+
*/
|
|
7
12
|
export class VeramoEd25519Signature2018 extends VeramoLdSignature {
|
|
8
13
|
getSupportedVerificationType(): string {
|
|
9
14
|
return 'Ed25519VerificationKey2018'
|
package/src/types.ts
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
CredentialPayload,
|
|
3
3
|
IAgentContext,
|
|
4
4
|
IDIDManager,
|
|
5
|
-
IKey,
|
|
6
5
|
IKeyManager,
|
|
7
6
|
IPluginMethodMap,
|
|
8
7
|
IResolver,
|
|
@@ -13,11 +12,12 @@ import {
|
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* The interface definition for a plugin that can issue and verify Verifiable Credentials and Presentations
|
|
16
|
-
* that use JSON-LD format.
|
|
15
|
+
* that use JSON-LD format (also called Data Integrity Proofs).
|
|
17
16
|
*
|
|
18
17
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model | W3C Verifiable Credentials data model}
|
|
18
|
+
* @see {@link https://www.w3.org/TR/vc-data-model/#data-integrity-proofs | Data Integrity proofs}
|
|
19
19
|
*
|
|
20
|
-
* @beta This API
|
|
20
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
21
21
|
*/
|
|
22
22
|
export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
23
23
|
/**
|
|
@@ -32,7 +32,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
32
32
|
*
|
|
33
33
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#presentations | Verifiable Presentation data model }
|
|
34
34
|
*
|
|
35
|
-
* @beta This API
|
|
35
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
36
36
|
*/
|
|
37
37
|
createVerifiablePresentationLD(
|
|
38
38
|
args: ICreateVerifiablePresentationLDArgs,
|
|
@@ -51,7 +51,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
51
51
|
*
|
|
52
52
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#credentials | Verifiable Credential data model}
|
|
53
53
|
*
|
|
54
|
-
* @beta This API
|
|
54
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
55
55
|
*/
|
|
56
56
|
createVerifiableCredentialLD(
|
|
57
57
|
args: ICreateVerifiableCredentialLDArgs,
|
|
@@ -68,7 +68,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
68
68
|
*
|
|
69
69
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#credentials | Verifiable Credential data model}
|
|
70
70
|
*
|
|
71
|
-
* @beta This API
|
|
71
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
72
72
|
*/
|
|
73
73
|
verifyCredentialLD(args: IVerifyCredentialLDArgs, context: IRequiredContext): Promise<boolean>
|
|
74
74
|
|
|
@@ -82,7 +82,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
82
82
|
*
|
|
83
83
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#presentations | Verifiable Credential data model}
|
|
84
84
|
*
|
|
85
|
-
* @beta This API
|
|
85
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
86
86
|
*/
|
|
87
87
|
verifyPresentationLD(args: IVerifyPresentationLDArgs, context: IRequiredContext): Promise<boolean>
|
|
88
88
|
}
|
|
@@ -91,7 +91,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
91
91
|
* Encapsulates the parameters required to create a
|
|
92
92
|
* {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation}
|
|
93
93
|
*
|
|
94
|
-
* @beta This API
|
|
94
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
95
95
|
*/
|
|
96
96
|
export interface ICreateVerifiablePresentationLDArgs {
|
|
97
97
|
/**
|
|
@@ -101,7 +101,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
101
101
|
* The signer of the Presentation is chosen based on the `holder` property
|
|
102
102
|
* of the `presentation`
|
|
103
103
|
*
|
|
104
|
-
*
|
|
104
|
+
* `@context`, `type` and `issuanceDate` will be added automatically if omitted.
|
|
105
105
|
*/
|
|
106
106
|
presentation: PresentationPayload
|
|
107
107
|
|
|
@@ -125,7 +125,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
125
125
|
* Encapsulates the parameters required to create a
|
|
126
126
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential}
|
|
127
127
|
*
|
|
128
|
-
* @beta This API
|
|
128
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
129
129
|
*/
|
|
130
130
|
export interface ICreateVerifiableCredentialLDArgs {
|
|
131
131
|
/**
|
|
@@ -135,7 +135,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
135
135
|
* The signer of the Credential is chosen based on the `issuer.id` property
|
|
136
136
|
* of the `credential`
|
|
137
137
|
*
|
|
138
|
-
*
|
|
138
|
+
* `@context`, `type` and `issuanceDate` will be added automatically if omitted
|
|
139
139
|
*/
|
|
140
140
|
credential: CredentialPayload
|
|
141
141
|
|
|
@@ -149,7 +149,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
149
149
|
* Encapsulates the parameters required to verify a
|
|
150
150
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential}
|
|
151
151
|
*
|
|
152
|
-
* @beta This API
|
|
152
|
+
* @beta This API may change without a BREAKING CHANGE notice
|
|
153
153
|
*/
|
|
154
154
|
export interface IVerifyCredentialLDArgs {
|
|
155
155
|
/**
|
|
@@ -163,9 +163,9 @@ export interface IVerifyCredentialLDArgs {
|
|
|
163
163
|
credential: VerifiableCredential
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
|
-
* Set this to true if you want the
|
|
166
|
+
* Set this to true if you want the `@context` URLs to be fetched in case they are not pre-loaded.
|
|
167
167
|
*
|
|
168
|
-
*
|
|
168
|
+
* Defaults to `false`
|
|
169
169
|
*/
|
|
170
170
|
fetchRemoteContexts?: boolean
|
|
171
171
|
}
|
|
@@ -174,7 +174,7 @@ export interface IVerifyCredentialLDArgs {
|
|
|
174
174
|
* Encapsulates the parameters required to verify a
|
|
175
175
|
* {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation}
|
|
176
176
|
*
|
|
177
|
-
* @beta This API
|
|
177
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
178
178
|
*/
|
|
179
179
|
export interface IVerifyPresentationLDArgs {
|
|
180
180
|
/**
|
|
@@ -198,9 +198,9 @@ export interface IVerifyPresentationLDArgs {
|
|
|
198
198
|
domain?: string
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
* Set this to true if you want the
|
|
201
|
+
* Set this to true if you want the `@context` URLs to be fetched in case they are not pre-loaded.
|
|
202
202
|
*
|
|
203
|
-
*
|
|
203
|
+
* Defaults to `false`
|
|
204
204
|
*/
|
|
205
205
|
fetchRemoteContexts?: boolean
|
|
206
206
|
}
|
|
@@ -211,12 +211,17 @@ export interface IVerifyPresentationLDArgs {
|
|
|
211
211
|
*
|
|
212
212
|
* This interface can be used for static type checks, to make sure your application is properly initialized.
|
|
213
213
|
*
|
|
214
|
-
* @beta This API
|
|
214
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
215
215
|
*/
|
|
216
216
|
export type IRequiredContext = IAgentContext<
|
|
217
217
|
IResolver & Pick<IDIDManager, 'didManagerGet'> & Pick<IKeyManager, 'keyManagerGet' | 'keyManagerSign'>
|
|
218
218
|
>
|
|
219
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Describes a document with a `@context` property.
|
|
222
|
+
*
|
|
223
|
+
* @beta This API may change without a BREAKING CHANGE notice.
|
|
224
|
+
*/
|
|
220
225
|
export type ContextDoc = {
|
|
221
226
|
'@context': Record<string, any>
|
|
222
227
|
}
|