@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.48
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/LICENSE +201 -0
- package/dist/index.cjs +2083 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1468 -0
- package/dist/index.d.ts +1468 -0
- package/dist/index.js +2063 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
- package/plugin.schema.json +1123 -0
- package/src/agent/KmsRestClient.ts +468 -0
- package/src/index.ts +7 -0
- package/src/models/AwsAssumeRoleCredentials.ts +98 -0
- package/src/models/AwsClientConfiguration.ts +72 -0
- package/src/models/AwsKmsSetting.ts +126 -0
- package/src/models/AwsStaticCredentials.ts +98 -0
- package/src/models/AwsWebIdentityTokenCredentials.ts +99 -0
- package/src/models/AzureClientSecretCredentialOpts.ts +90 -0
- package/src/models/AzureCredentialOpts.ts +70 -0
- package/src/models/AzureKeyVaultSetting.ts +112 -0
- package/src/models/CoseKey.ts +145 -0
- package/src/models/CoseKeyPair.ts +79 -0
- package/src/models/CoseKeyType.ts +55 -0
- package/src/models/CreateKeyProvider.ts +115 -0
- package/src/models/CreateRawSignature.ts +80 -0
- package/src/models/CreateRawSignatureResponse.ts +65 -0
- package/src/models/CreateSimpleSignature.ts +100 -0
- package/src/models/CryptoAlg.ts +55 -0
- package/src/models/Curve.ts +59 -0
- package/src/models/DigestAlg.ts +58 -0
- package/src/models/ErrorResponse.ts +82 -0
- package/src/models/GenerateKey.ts +106 -0
- package/src/models/GenerateKeyGlobal.ts +114 -0
- package/src/models/GenerateKeyResponse.ts +71 -0
- package/src/models/GetKeyResponse.ts +71 -0
- package/src/models/IdentifierMethod.ts +56 -0
- package/src/models/JoseKeyPair.ts +79 -0
- package/src/models/Jwk.ts +248 -0
- package/src/models/JwkKeyType.ts +55 -0
- package/src/models/JwkUse.ts +53 -0
- package/src/models/KeyEncoding.ts +53 -0
- package/src/models/KeyInfo.ts +164 -0
- package/src/models/KeyOperations.ts +59 -0
- package/src/models/KeyProvider.ts +82 -0
- package/src/models/KeyProviderResponse.ts +82 -0
- package/src/models/KeyProviderType.ts +54 -0
- package/src/models/KeyResolver.ts +92 -0
- package/src/models/KeyType.ts +54 -0
- package/src/models/KeyVisibility.ts +53 -0
- package/src/models/ListKeyProvidersResponse.ts +71 -0
- package/src/models/ListKeysResponse.ts +71 -0
- package/src/models/ListResolversResponse.ts +71 -0
- package/src/models/LookupMode.ts +54 -0
- package/src/models/ManagedKeyInfo.ts +167 -0
- package/src/models/ManagedKeyPair.ts +111 -0
- package/src/models/MaskGenFunction.ts +52 -0
- package/src/models/ProviderCapabilities.ts +122 -0
- package/src/models/ResolvePublicKey.ts +102 -0
- package/src/models/ResolvedKeyInfo.ts +165 -0
- package/src/models/Resolver.ts +92 -0
- package/src/models/SignInput.ts +92 -0
- package/src/models/SignOutput.ts +79 -0
- package/src/models/Signature.ts +103 -0
- package/src/models/SignatureAlgorithm.ts +63 -0
- package/src/models/StoreKey.ts +79 -0
- package/src/models/StoreKeyResponse.ts +71 -0
- package/src/models/UpdateKeyProvider.ts +99 -0
- package/src/models/VerifyRawSignature.ts +89 -0
- package/src/models/VerifyRawSignatureResponse.ts +65 -0
- package/src/models/VerifySimpleSignature.ts +85 -0
- package/src/models/index.ts +60 -0
- package/src/types/IKmsRestClient.ts +133 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { ManagedKeyInfo } from './ManagedKeyInfo';
|
|
16
|
+
import {
|
|
17
|
+
ManagedKeyInfoFromJSON,
|
|
18
|
+
ManagedKeyInfoToJSON,
|
|
19
|
+
} from './ManagedKeyInfo';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Response body containing a stored key.
|
|
23
|
+
* @export
|
|
24
|
+
* @interface StoreKeyResponse
|
|
25
|
+
*/
|
|
26
|
+
export interface StoreKeyResponse {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {ManagedKeyInfo}
|
|
30
|
+
* @memberof StoreKeyResponse
|
|
31
|
+
*/
|
|
32
|
+
keyInfo: ManagedKeyInfo;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the StoreKeyResponse interface.
|
|
37
|
+
*/
|
|
38
|
+
export function instanceOfStoreKeyResponse(value: object): value is StoreKeyResponse {
|
|
39
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function StoreKeyResponseFromJSON(json: any): StoreKeyResponse {
|
|
44
|
+
return StoreKeyResponseFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function StoreKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreKeyResponse {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'keyInfo': ManagedKeyInfoFromJSON(json['keyInfo']),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function StoreKeyResponseToJSON(json: any): StoreKeyResponse {
|
|
58
|
+
return StoreKeyResponseToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function StoreKeyResponseToJSONTyped(value?: StoreKeyResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'keyInfo': ManagedKeyInfoToJSON(value['keyInfo']),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { AwsKmsSetting } from './AwsKmsSetting';
|
|
16
|
+
import {
|
|
17
|
+
AwsKmsSettingFromJSON,
|
|
18
|
+
AwsKmsSettingToJSON,
|
|
19
|
+
} from './AwsKmsSetting';
|
|
20
|
+
import type { AzureKeyVaultSetting } from './AzureKeyVaultSetting';
|
|
21
|
+
import {
|
|
22
|
+
AzureKeyVaultSettingFromJSON,
|
|
23
|
+
AzureKeyVaultSettingToJSON,
|
|
24
|
+
} from './AzureKeyVaultSetting';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Request body for updating an existing Key Provider instance.
|
|
28
|
+
* @export
|
|
29
|
+
* @interface UpdateKeyProvider
|
|
30
|
+
*/
|
|
31
|
+
export interface UpdateKeyProvider {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {AzureKeyVaultSetting}
|
|
35
|
+
* @memberof UpdateKeyProvider
|
|
36
|
+
*/
|
|
37
|
+
azureKeyvaultSettings?: AzureKeyVaultSetting;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {AwsKmsSetting}
|
|
41
|
+
* @memberof UpdateKeyProvider
|
|
42
|
+
*/
|
|
43
|
+
awsKmsSettings?: AwsKmsSetting;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to enable caching for keys retrieved from this provider.
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof UpdateKeyProvider
|
|
48
|
+
*/
|
|
49
|
+
cacheEnabled?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Time-to-live for cached keys in seconds (if cacheEnabled is true).
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof UpdateKeyProvider
|
|
54
|
+
*/
|
|
55
|
+
cacheTTLInSeconds?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the UpdateKeyProvider interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfUpdateKeyProvider(value: object): value is UpdateKeyProvider {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function UpdateKeyProviderFromJSON(json: any): UpdateKeyProvider {
|
|
66
|
+
return UpdateKeyProviderFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function UpdateKeyProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateKeyProvider {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'azureKeyvaultSettings': json['azureKeyvaultSettings'] == null ? undefined : AzureKeyVaultSettingFromJSON(json['azureKeyvaultSettings']),
|
|
76
|
+
'awsKmsSettings': json['awsKmsSettings'] == null ? undefined : AwsKmsSettingFromJSON(json['awsKmsSettings']),
|
|
77
|
+
'cacheEnabled': json['cacheEnabled'] == null ? undefined : json['cacheEnabled'],
|
|
78
|
+
'cacheTTLInSeconds': json['cacheTTLInSeconds'] == null ? undefined : json['cacheTTLInSeconds'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function UpdateKeyProviderToJSON(json: any): UpdateKeyProvider {
|
|
83
|
+
return UpdateKeyProviderToJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function UpdateKeyProviderToJSONTyped(value?: UpdateKeyProvider | null, ignoreDiscriminator: boolean = false): any {
|
|
87
|
+
if (value == null) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'azureKeyvaultSettings': AzureKeyVaultSettingToJSON(value['azureKeyvaultSettings']),
|
|
94
|
+
'awsKmsSettings': AwsKmsSettingToJSON(value['awsKmsSettings']),
|
|
95
|
+
'cacheEnabled': value['cacheEnabled'],
|
|
96
|
+
'cacheTTLInSeconds': value['cacheTTLInSeconds'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { KeyInfo } from './KeyInfo';
|
|
16
|
+
import {
|
|
17
|
+
KeyInfoFromJSON,
|
|
18
|
+
KeyInfoToJSON,
|
|
19
|
+
} from './KeyInfo';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Request body for verifying a raw signature.
|
|
23
|
+
* @export
|
|
24
|
+
* @interface VerifyRawSignature
|
|
25
|
+
*/
|
|
26
|
+
export interface VerifyRawSignature {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {KeyInfo}
|
|
30
|
+
* @memberof VerifyRawSignature
|
|
31
|
+
*/
|
|
32
|
+
keyInfo: KeyInfo;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof VerifyRawSignature
|
|
37
|
+
*/
|
|
38
|
+
input: string;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof VerifyRawSignature
|
|
43
|
+
*/
|
|
44
|
+
signature: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the VerifyRawSignature interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfVerifyRawSignature(value: object): value is VerifyRawSignature {
|
|
51
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
|
|
52
|
+
if (!('input' in value) || value['input'] === undefined) return false;
|
|
53
|
+
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function VerifyRawSignatureFromJSON(json: any): VerifyRawSignature {
|
|
58
|
+
return VerifyRawSignatureFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function VerifyRawSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyRawSignature {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'keyInfo': KeyInfoFromJSON(json['keyInfo']),
|
|
68
|
+
'input': json['input'],
|
|
69
|
+
'signature': json['signature'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function VerifyRawSignatureToJSON(json: any): VerifyRawSignature {
|
|
74
|
+
return VerifyRawSignatureToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function VerifyRawSignatureToJSONTyped(value?: VerifyRawSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'keyInfo': KeyInfoToJSON(value['keyInfo']),
|
|
85
|
+
'input': value['input'],
|
|
86
|
+
'signature': value['signature'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Response body containing the details of the signature verification.
|
|
17
|
+
* @export
|
|
18
|
+
* @interface VerifyRawSignatureResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface VerifyRawSignatureResponse {
|
|
21
|
+
/**
|
|
22
|
+
* Indicates whether the signature is valid or not.
|
|
23
|
+
* @type {boolean}
|
|
24
|
+
* @memberof VerifyRawSignatureResponse
|
|
25
|
+
*/
|
|
26
|
+
isValid: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the VerifyRawSignatureResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
export function instanceOfVerifyRawSignatureResponse(value: object): value is VerifyRawSignatureResponse {
|
|
33
|
+
if (!('isValid' in value) || value['isValid'] === undefined) return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function VerifyRawSignatureResponseFromJSON(json: any): VerifyRawSignatureResponse {
|
|
38
|
+
return VerifyRawSignatureResponseFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function VerifyRawSignatureResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyRawSignatureResponse {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'isValid': json['isValid'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function VerifyRawSignatureResponseToJSON(json: any): VerifyRawSignatureResponse {
|
|
52
|
+
return VerifyRawSignatureResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function VerifyRawSignatureResponseToJSONTyped(value?: VerifyRawSignatureResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'isValid': value['isValid'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { SignInput } from './SignInput';
|
|
16
|
+
import {
|
|
17
|
+
SignInputFromJSON,
|
|
18
|
+
SignInputToJSON,
|
|
19
|
+
} from './SignInput';
|
|
20
|
+
import type { Signature } from './Signature';
|
|
21
|
+
import {
|
|
22
|
+
SignatureFromJSON,
|
|
23
|
+
SignatureToJSON,
|
|
24
|
+
} from './Signature';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Request body for verifying a digital signature.
|
|
28
|
+
* @export
|
|
29
|
+
* @interface VerifySimpleSignature
|
|
30
|
+
*/
|
|
31
|
+
export interface VerifySimpleSignature {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {SignInput}
|
|
35
|
+
* @memberof VerifySimpleSignature
|
|
36
|
+
*/
|
|
37
|
+
signInput: SignInput;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {Signature}
|
|
41
|
+
* @memberof VerifySimpleSignature
|
|
42
|
+
*/
|
|
43
|
+
signature: Signature;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the VerifySimpleSignature interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfVerifySimpleSignature(value: object): value is VerifySimpleSignature {
|
|
50
|
+
if (!('signInput' in value) || value['signInput'] === undefined) return false;
|
|
51
|
+
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function VerifySimpleSignatureFromJSON(json: any): VerifySimpleSignature {
|
|
56
|
+
return VerifySimpleSignatureFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function VerifySimpleSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifySimpleSignature {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'signInput': SignInputFromJSON(json['signInput']),
|
|
66
|
+
'signature': SignatureFromJSON(json['signature']),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature {
|
|
71
|
+
return VerifySimpleSignatureToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'signInput': SignInputToJSON(value['signInput']),
|
|
82
|
+
'signature': SignatureToJSON(value['signature']),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './AwsAssumeRoleCredentials';
|
|
4
|
+
export * from './AwsClientConfiguration';
|
|
5
|
+
export * from './AwsKmsSetting';
|
|
6
|
+
export * from './AwsStaticCredentials';
|
|
7
|
+
export * from './AwsWebIdentityTokenCredentials';
|
|
8
|
+
export * from './AzureClientSecretCredentialOpts';
|
|
9
|
+
export * from './AzureCredentialOpts';
|
|
10
|
+
export * from './AzureKeyVaultSetting';
|
|
11
|
+
export * from './CoseKey';
|
|
12
|
+
export * from './CoseKeyPair';
|
|
13
|
+
export * from './CoseKeyType';
|
|
14
|
+
export * from './CreateKeyProvider';
|
|
15
|
+
export * from './CreateRawSignature';
|
|
16
|
+
export * from './CreateRawSignatureResponse';
|
|
17
|
+
export * from './CreateSimpleSignature';
|
|
18
|
+
export * from './CryptoAlg';
|
|
19
|
+
export * from './Curve';
|
|
20
|
+
export * from './DigestAlg';
|
|
21
|
+
export * from './ErrorResponse';
|
|
22
|
+
export * from './GenerateKey';
|
|
23
|
+
export * from './GenerateKeyGlobal';
|
|
24
|
+
export * from './GenerateKeyResponse';
|
|
25
|
+
export * from './GetKeyResponse';
|
|
26
|
+
export * from './IdentifierMethod';
|
|
27
|
+
export * from './JoseKeyPair';
|
|
28
|
+
export * from './Jwk';
|
|
29
|
+
export * from './JwkKeyType';
|
|
30
|
+
export * from './JwkUse';
|
|
31
|
+
export * from './KeyEncoding';
|
|
32
|
+
export * from './KeyInfo';
|
|
33
|
+
export * from './KeyOperations';
|
|
34
|
+
export * from './KeyProvider';
|
|
35
|
+
export * from './KeyProviderResponse';
|
|
36
|
+
export * from './KeyProviderType';
|
|
37
|
+
export * from './KeyResolver';
|
|
38
|
+
export * from './KeyType';
|
|
39
|
+
export * from './KeyVisibility';
|
|
40
|
+
export * from './ListKeyProvidersResponse';
|
|
41
|
+
export * from './ListKeysResponse';
|
|
42
|
+
export * from './ListResolversResponse';
|
|
43
|
+
export * from './LookupMode';
|
|
44
|
+
export * from './ManagedKeyInfo';
|
|
45
|
+
export * from './ManagedKeyPair';
|
|
46
|
+
export * from './MaskGenFunction';
|
|
47
|
+
export * from './ProviderCapabilities';
|
|
48
|
+
export * from './ResolvePublicKey';
|
|
49
|
+
export * from './ResolvedKeyInfo';
|
|
50
|
+
export * from './Resolver';
|
|
51
|
+
export * from './SignInput';
|
|
52
|
+
export * from './SignOutput';
|
|
53
|
+
export * from './Signature';
|
|
54
|
+
export * from './SignatureAlgorithm';
|
|
55
|
+
export * from './StoreKey';
|
|
56
|
+
export * from './StoreKeyResponse';
|
|
57
|
+
export * from './UpdateKeyProvider';
|
|
58
|
+
export * from './VerifyRawSignature';
|
|
59
|
+
export * from './VerifyRawSignatureResponse';
|
|
60
|
+
export * from './VerifySimpleSignature';
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { IAgentContext, IPluginMethodMap } from '@veramo/core'
|
|
2
|
+
import type { BearerTokenArg } from '@sphereon/ssi-types'
|
|
3
|
+
import {
|
|
4
|
+
CreateRawSignature,
|
|
5
|
+
CreateRawSignatureResponse,
|
|
6
|
+
GenerateKey,
|
|
7
|
+
GenerateKeyGlobal,
|
|
8
|
+
KeyProviderResponse,
|
|
9
|
+
ListKeyProvidersResponse,
|
|
10
|
+
ListKeysResponse,
|
|
11
|
+
ListResolversResponse,
|
|
12
|
+
ManagedKeyInfo,
|
|
13
|
+
ManagedKeyPair,
|
|
14
|
+
ResolvedKeyInfo,
|
|
15
|
+
ResolvePublicKey,
|
|
16
|
+
Resolver,
|
|
17
|
+
StoreKey,
|
|
18
|
+
VerifyRawSignature,
|
|
19
|
+
VerifyRawSignatureResponse
|
|
20
|
+
} from '../models'
|
|
21
|
+
|
|
22
|
+
export interface IKmsRestClient extends IPluginMethodMap {
|
|
23
|
+
kmsGetResolver(args: kmsGetResolverArgs): Promise<Resolver>
|
|
24
|
+
kmsListResolvers(args: KmsListResolversArgs): Promise<ListResolversResponse>
|
|
25
|
+
kmsResolveKey(args: KmsResolveKeyArgs): Promise<ResolvedKeyInfo>
|
|
26
|
+
kmsCreateRawSignature(args: KmsCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>
|
|
27
|
+
kmsIsValidRawSignature(args: KmsIsValidRawSignatureArgs): Promise<VerifyRawSignatureResponse>
|
|
28
|
+
kmsGetKey(args: KmsGetKeyArgs): Promise<ManagedKeyInfo>
|
|
29
|
+
kmsListKeys(args: KmsListKeysArgs): Promise<ListKeysResponse>
|
|
30
|
+
kmsStoreKey(args: KmsStoreKeyArgs): Promise<ManagedKeyInfo>
|
|
31
|
+
kmsGenerateKey(args: KmsGenerateKeyArgs): Promise<ManagedKeyPair>
|
|
32
|
+
kmsDeleteKey(args: KmsDeleteKeyArgs): Promise<boolean>
|
|
33
|
+
kmsGetKeyProvider(args: KmsGetKeyProviderArgs): Promise<KeyProviderResponse>
|
|
34
|
+
kmsListKeyProviders(args: KmsListKeyProvidersArgs): Promise<ListKeyProvidersResponse>
|
|
35
|
+
kmsProviderListKeys(args: KmsProviderListKeysArgs): Promise<ListKeysResponse>
|
|
36
|
+
kmsProviderStoreKey(args: KmsProviderStoreKey): Promise<ManagedKeyInfo>
|
|
37
|
+
kmsProviderGenerateKey(args: KmsProviderGenerateKey): Promise<ManagedKeyPair>
|
|
38
|
+
kmsProviderGetKey(args: KmsProviderGetKeyArgs): Promise<ManagedKeyInfo>
|
|
39
|
+
kmsProviderDeleteKey(args: KmsProviderDeleteKeyArgs): Promise<boolean>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type KmsListResolversArgs = {
|
|
43
|
+
baseUrl?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type kmsGetResolverArgs = {
|
|
47
|
+
baseUrl?: string
|
|
48
|
+
resolverId: string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type KmsResolveKeyArgs = {
|
|
52
|
+
baseUrl?: string
|
|
53
|
+
resolverId: String
|
|
54
|
+
} & ResolvePublicKey
|
|
55
|
+
|
|
56
|
+
export type KmsCreateRawSignatureArgs = {
|
|
57
|
+
baseUrl?: string
|
|
58
|
+
} & CreateRawSignature
|
|
59
|
+
|
|
60
|
+
export type KmsIsValidRawSignatureArgs = {
|
|
61
|
+
baseUrl?: string
|
|
62
|
+
} & VerifyRawSignature
|
|
63
|
+
|
|
64
|
+
export type KmsGetKeyArgs = {
|
|
65
|
+
baseUrl?: string
|
|
66
|
+
aliasOrKid: string
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type KmsListKeysArgs = {
|
|
70
|
+
baseUrl?: string
|
|
71
|
+
providerId?: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type KmsStoreKeyArgs = {
|
|
75
|
+
baseUrl?: string
|
|
76
|
+
} & StoreKey
|
|
77
|
+
|
|
78
|
+
export type KmsGenerateKeyArgs = {
|
|
79
|
+
baseUrl?: string
|
|
80
|
+
} & GenerateKeyGlobal
|
|
81
|
+
|
|
82
|
+
export type KmsDeleteKeyArgs = {
|
|
83
|
+
baseUrl?: string
|
|
84
|
+
aliasOrKid?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type KmsGetKeyProviderArgs = {
|
|
88
|
+
baseUrl?: string
|
|
89
|
+
providerId?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type KmsListKeyProvidersArgs = {
|
|
93
|
+
baseUrl?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type KmsProviderListKeysArgs = {
|
|
97
|
+
baseUrl?: string
|
|
98
|
+
providerId: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type KmsProviderStoreKey = {
|
|
102
|
+
baseUrl?: string
|
|
103
|
+
providerId: string
|
|
104
|
+
} & StoreKey
|
|
105
|
+
|
|
106
|
+
export type KmsProviderGenerateKey = {
|
|
107
|
+
baseUrl?: string
|
|
108
|
+
providerId: string
|
|
109
|
+
} & GenerateKey
|
|
110
|
+
|
|
111
|
+
export type KmsProviderGetKeyArgs = {
|
|
112
|
+
baseUrl?: string
|
|
113
|
+
providerId: string
|
|
114
|
+
aliasOrKid: string
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type KmsProviderDeleteKeyArgs = {
|
|
118
|
+
baseUrl?: string
|
|
119
|
+
providerId: string
|
|
120
|
+
aliasOrKid: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type RestClientAuthenticationOpts = {
|
|
124
|
+
enabled?: boolean
|
|
125
|
+
bearerToken?: BearerTokenArg
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type KmsRestClientArgs = {
|
|
129
|
+
baseUrl?: string,
|
|
130
|
+
authentication?: RestClientAuthenticationOpts
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type IRequiredContext = IAgentContext<never>
|