@sphereon/ssi-sdk-ext.key-manager 0.28.1-feature.oyd.cmsm.improv.21 → 0.28.1-next.53
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/index.cjs +615 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{ssi-sdk-ext.key-manager.d.ts → index.d.cts} +137 -159
- package/dist/index.d.ts +136 -5
- package/dist/index.js +582 -23
- package/dist/index.js.map +1 -1
- package/package.json +25 -12
- package/plugin.schema.json +12 -62
- package/src/__tests__/SphereonKeyManager.test.ts +3 -2
- package/src/__tests__/encrypt-decrypt.test.ts +3 -2
- package/src/agent/SphereonKeyManager.ts +12 -11
- package/src/types/ISphereonKeyManager.ts +1 -1
- package/dist/agent/SphereonKeyManager.d.ts +0 -27
- package/dist/agent/SphereonKeyManager.d.ts.map +0 -1
- package/dist/agent/SphereonKeyManager.js +0 -190
- package/dist/agent/SphereonKeyManager.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/ISphereonKeyManager.d.ts +0 -107
- package/dist/types/ISphereonKeyManager.d.ts.map +0 -1
- package/dist/types/ISphereonKeyManager.js +0 -10
- package/dist/types/ISphereonKeyManager.js.map +0 -1
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.52.5"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { IKeyManager, IKeyManagerSignArgs, IPluginMethodMap, KeyMetadata, ManagedKeyInfo, MinimalImportableKey, TKeyType } from '@veramo/core';
|
|
2
|
-
export type PartialKey = ManagedKeyInfo & {
|
|
3
|
-
privateKeyHex: string;
|
|
4
|
-
};
|
|
5
|
-
export interface ISphereonKeyManager extends IKeyManager, IPluginMethodMap {
|
|
6
|
-
keyManagerCreate(args: ISphereonKeyManagerCreateArgs): Promise<PartialKey>;
|
|
7
|
-
keyManagerImport(key: MinimalImportableKey): Promise<PartialKey>;
|
|
8
|
-
keyManagerSign(args: ISphereonKeyManagerSignArgs): Promise<string>;
|
|
9
|
-
/**
|
|
10
|
-
* Verifies a signature using the key
|
|
11
|
-
*
|
|
12
|
-
* Does not exist in IKeyManager
|
|
13
|
-
* @param args
|
|
14
|
-
*/
|
|
15
|
-
keyManagerVerify(args: ISphereonKeyManagerVerifyArgs): Promise<boolean>;
|
|
16
|
-
keyManagerListKeys(): Promise<Array<ManagedKeyInfo>>;
|
|
17
|
-
/**
|
|
18
|
-
* Get the KMS registered as default. Handy when no explicit KMS is provided for a function
|
|
19
|
-
*/
|
|
20
|
-
keyManagerGetDefaultKeyManagementSystem(): Promise<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Set keys to expired and remove keys eligible for deletion.
|
|
23
|
-
* @param args
|
|
24
|
-
*/
|
|
25
|
-
keyManagerHandleExpirations(args: ISphereonKeyManagerHandleExpirationsArgs): Promise<Array<ManagedKeyInfo>>;
|
|
26
|
-
}
|
|
27
|
-
export interface IkeyOptions {
|
|
28
|
-
/**
|
|
29
|
-
* Is this a temporary key?
|
|
30
|
-
*/
|
|
31
|
-
ephemeral?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Expiration and remove the key
|
|
34
|
-
*/
|
|
35
|
-
expiration?: {
|
|
36
|
-
expiryDate?: Date;
|
|
37
|
-
removalDate?: Date;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Input arguments for {@link ISphereonKeyManager.keyManagerCreate | keyManagerCreate}
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export interface ISphereonKeyManagerCreateArgs {
|
|
45
|
-
/**
|
|
46
|
-
* Key type
|
|
47
|
-
*/
|
|
48
|
-
type: TKeyType;
|
|
49
|
-
/**
|
|
50
|
-
* Key Management System
|
|
51
|
-
*/
|
|
52
|
-
kms?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Key options
|
|
55
|
-
*/
|
|
56
|
-
opts?: IkeyOptions;
|
|
57
|
-
/**
|
|
58
|
-
* Optional. Key meta data
|
|
59
|
-
*/
|
|
60
|
-
meta?: KeyMetadata;
|
|
61
|
-
}
|
|
62
|
-
export declare function hasKeyOptions(object: any): object is {
|
|
63
|
-
opts?: IkeyOptions;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Input arguments for {@link ISphereonKeyManager.keyManagerGet | keyManagerGet}
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
export interface IKeyManagerGetArgs {
|
|
70
|
-
/**
|
|
71
|
-
* Key ID
|
|
72
|
-
*/
|
|
73
|
-
kid: string;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Input arguments for {@link ISphereonKeyManager.keyManagerDelete | keyManagerDelete}
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
export interface IKeyManagerDeleteArgs {
|
|
80
|
-
/**
|
|
81
|
-
* Key ID
|
|
82
|
-
*/
|
|
83
|
-
kid: string;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Input arguments for {@link ISphereonKeyManagerSignArgs.keyManagerSign | keyManagerSign}
|
|
87
|
-
* @public
|
|
88
|
-
*/
|
|
89
|
-
export interface ISphereonKeyManagerSignArgs extends IKeyManagerSignArgs {
|
|
90
|
-
/**
|
|
91
|
-
* Data to sign
|
|
92
|
-
*/
|
|
93
|
-
data: string | Uint8Array;
|
|
94
|
-
}
|
|
95
|
-
export interface ISphereonKeyManagerHandleExpirationsArgs {
|
|
96
|
-
skipRemovals?: boolean;
|
|
97
|
-
}
|
|
98
|
-
export interface ISphereonKeyManagerVerifyArgs {
|
|
99
|
-
kms?: string;
|
|
100
|
-
publicKeyHex: string;
|
|
101
|
-
type: TKeyType;
|
|
102
|
-
algorithm?: string;
|
|
103
|
-
data: Uint8Array;
|
|
104
|
-
signature: string;
|
|
105
|
-
}
|
|
106
|
-
export declare const isDefined: <T extends unknown>(object: T | undefined) => object is T;
|
|
107
|
-
//# sourceMappingURL=ISphereonKeyManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISphereonKeyManager.d.ts","sourceRoot":"","sources":["../../src/types/ISphereonKeyManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE9I,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnE,MAAM,WAAW,mBAAoB,SAAQ,WAAW,EAAE,gBAAgB;IACxE,gBAAgB,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAE1E,gBAAgB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAEhE,cAAc,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAElE;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEvE,kBAAkB,IAAI,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;IAEpD;;OAEG;IAEH,uCAAuC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE1D;;;OAGG;IACH,2BAA2B,CAAC,IAAI,EAAE,wCAAwC,GAAG,OAAO,CAAC,KAAK,CAAC,c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MAAM,IAAI,CAAyB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDefined = void 0;
|
|
4
|
-
exports.hasKeyOptions = hasKeyOptions;
|
|
5
|
-
function hasKeyOptions(object) {
|
|
6
|
-
return object && 'opts' in object && ('ephemeral' in object.opts || 'expiration' in object.opts);
|
|
7
|
-
}
|
|
8
|
-
const isDefined = (object) => object !== undefined;
|
|
9
|
-
exports.isDefined = isDefined;
|
|
10
|
-
//# sourceMappingURL=ISphereonKeyManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISphereonKeyManager.js","sourceRoot":"","sources":["../../src/types/ISphereonKeyManager.ts"],"names":[],"mappings":";;;AA2EA,sCAEC;AAFD,SAAgB,aAAa,CAAC,MAAW;IACvC,OAAO,MAAQ,IAAI,MAAM,IAAI,MAAM,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,IAAI,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;AACpG,CAAC;AAiDM,MAAM,SAAS,GAAG,CAAoB,MAAqB,EAAe,EAAE,CAAC,MAAM,KAAK,SAAS,CAAA;AAA3F,QAAA,SAAS,aAAkF"}
|