@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,145 @@
|
|
|
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 { CoseKeyType } from './CoseKeyType';
|
|
16
|
+
import {
|
|
17
|
+
CoseKeyTypeFromJSON,
|
|
18
|
+
CoseKeyTypeToJSON,
|
|
19
|
+
} from './CoseKeyType';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Represents a COSE (CBOR Object Signing and Encryption) key in JSON format.
|
|
23
|
+
* @export
|
|
24
|
+
* @interface CoseKey
|
|
25
|
+
*/
|
|
26
|
+
export interface CoseKey {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {CoseKeyType}
|
|
30
|
+
* @memberof CoseKey
|
|
31
|
+
*/
|
|
32
|
+
kty: CoseKeyType;
|
|
33
|
+
/**
|
|
34
|
+
* Key identifier (base64url-encoded byte string).
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof CoseKey
|
|
37
|
+
*/
|
|
38
|
+
kid?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The COSE algorithm identifier (e.g., -7=ES256, -35=ES384, -36=ES512, -8=EdDSA).
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof CoseKey
|
|
43
|
+
*/
|
|
44
|
+
alg?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The allowed COSE key operations (1=sign, 2=verify, 3=encrypt, 4=decrypt, etc.).
|
|
47
|
+
* @type {Array<number>}
|
|
48
|
+
* @memberof CoseKey
|
|
49
|
+
*/
|
|
50
|
+
keyOps?: Array<number>;
|
|
51
|
+
/**
|
|
52
|
+
* Base initialization vector (base64url-encoded).
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof CoseKey
|
|
55
|
+
*/
|
|
56
|
+
baseIV?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The COSE curve identifier (1=P-256, 2=P-384, 3=P-521, 8=secp256k1, 6=Ed25519, etc.).
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @memberof CoseKey
|
|
61
|
+
*/
|
|
62
|
+
crv?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The x coordinate (base64url-encoded byte string).
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof CoseKey
|
|
67
|
+
*/
|
|
68
|
+
x?: string;
|
|
69
|
+
/**
|
|
70
|
+
* The y coordinate (base64url-encoded byte string).
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof CoseKey
|
|
73
|
+
*/
|
|
74
|
+
y?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The private key parameter (base64url-encoded byte string).
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @memberof CoseKey
|
|
79
|
+
*/
|
|
80
|
+
d?: string;
|
|
81
|
+
/**
|
|
82
|
+
* X.509 certificate chain as base64-encoded certificates.
|
|
83
|
+
* @type {Array<string>}
|
|
84
|
+
* @memberof CoseKey
|
|
85
|
+
*/
|
|
86
|
+
x5chain?: Array<string>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Check if a given object implements the CoseKey interface.
|
|
93
|
+
*/
|
|
94
|
+
export function instanceOfCoseKey(value: object): value is CoseKey {
|
|
95
|
+
if (!('kty' in value) || value['kty'] === undefined) return false;
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function CoseKeyFromJSON(json: any): CoseKey {
|
|
100
|
+
return CoseKeyFromJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function CoseKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoseKey {
|
|
104
|
+
if (json == null) {
|
|
105
|
+
return json;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'kty': CoseKeyTypeFromJSON(json['kty']),
|
|
110
|
+
'kid': json['kid'] == null ? undefined : json['kid'],
|
|
111
|
+
'alg': json['alg'] == null ? undefined : json['alg'],
|
|
112
|
+
'keyOps': json['key_ops'] == null ? undefined : json['key_ops'],
|
|
113
|
+
'baseIV': json['baseIV'] == null ? undefined : json['baseIV'],
|
|
114
|
+
'crv': json['crv'] == null ? undefined : json['crv'],
|
|
115
|
+
'x': json['x'] == null ? undefined : json['x'],
|
|
116
|
+
'y': json['y'] == null ? undefined : json['y'],
|
|
117
|
+
'd': json['d'] == null ? undefined : json['d'],
|
|
118
|
+
'x5chain': json['x5chain'] == null ? undefined : json['x5chain'],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function CoseKeyToJSON(json: any): CoseKey {
|
|
123
|
+
return CoseKeyToJSONTyped(json, false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function CoseKeyToJSONTyped(value?: CoseKey | null, ignoreDiscriminator: boolean = false): any {
|
|
127
|
+
if (value == null) {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
|
|
133
|
+
'kty': CoseKeyTypeToJSON(value['kty']),
|
|
134
|
+
'kid': value['kid'],
|
|
135
|
+
'alg': value['alg'],
|
|
136
|
+
'key_ops': value['keyOps'],
|
|
137
|
+
'baseIV': value['baseIV'],
|
|
138
|
+
'crv': value['crv'],
|
|
139
|
+
'x': value['x'],
|
|
140
|
+
'y': value['y'],
|
|
141
|
+
'd': value['d'],
|
|
142
|
+
'x5chain': value['x5chain'],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { CoseKey } from './CoseKey';
|
|
16
|
+
import {
|
|
17
|
+
CoseKeyFromJSON,
|
|
18
|
+
CoseKeyToJSON,
|
|
19
|
+
} from './CoseKey';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Represents a cryptographic key pair for COSE (CBOR Object Signing and Encryption) operations.
|
|
23
|
+
* @export
|
|
24
|
+
* @interface CoseKeyPair
|
|
25
|
+
*/
|
|
26
|
+
export interface CoseKeyPair {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {CoseKey}
|
|
30
|
+
* @memberof CoseKeyPair
|
|
31
|
+
*/
|
|
32
|
+
privateCoseKey?: CoseKey;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {CoseKey}
|
|
36
|
+
* @memberof CoseKeyPair
|
|
37
|
+
*/
|
|
38
|
+
publicCoseKey: CoseKey;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the CoseKeyPair interface.
|
|
43
|
+
*/
|
|
44
|
+
export function instanceOfCoseKeyPair(value: object): value is CoseKeyPair {
|
|
45
|
+
if (!('publicCoseKey' in value) || value['publicCoseKey'] === undefined) return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CoseKeyPairFromJSON(json: any): CoseKeyPair {
|
|
50
|
+
return CoseKeyPairFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function CoseKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoseKeyPair {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'privateCoseKey': json['privateCoseKey'] == null ? undefined : CoseKeyFromJSON(json['privateCoseKey']),
|
|
60
|
+
'publicCoseKey': CoseKeyFromJSON(json['publicCoseKey']),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CoseKeyPairToJSON(json: any): CoseKeyPair {
|
|
65
|
+
return CoseKeyPairToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CoseKeyPairToJSONTyped(value?: CoseKeyPair | null, ignoreDiscriminator: boolean = false): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'privateCoseKey': CoseKeyToJSON(value['privateCoseKey']),
|
|
76
|
+
'publicCoseKey': CoseKeyToJSON(value['publicCoseKey']),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* COSE key type parameter. 1=OKP (Octet Key Pair), 2=EC2 (Elliptic Curve), 3=RSA, 4=Symmetric.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CoseKeyType = {
|
|
21
|
+
NUMBER_1: 1,
|
|
22
|
+
NUMBER_2: 2,
|
|
23
|
+
NUMBER_3: 3,
|
|
24
|
+
NUMBER_4: 4
|
|
25
|
+
} as const;
|
|
26
|
+
export type CoseKeyType = typeof CoseKeyType[keyof typeof CoseKeyType];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfCoseKeyType(value: any): boolean {
|
|
30
|
+
for (const key in CoseKeyType) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(CoseKeyType, key)) {
|
|
32
|
+
if (CoseKeyType[key as keyof typeof CoseKeyType] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function CoseKeyTypeFromJSON(json: any): CoseKeyType {
|
|
41
|
+
return CoseKeyTypeFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function CoseKeyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoseKeyType {
|
|
45
|
+
return json as CoseKeyType;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function CoseKeyTypeToJSON(value?: CoseKeyType | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CoseKeyTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CoseKeyType {
|
|
53
|
+
return value as CoseKeyType;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
import type { KeyProviderType } from './KeyProviderType';
|
|
26
|
+
import {
|
|
27
|
+
KeyProviderTypeFromJSON,
|
|
28
|
+
KeyProviderTypeToJSON,
|
|
29
|
+
} from './KeyProviderType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Request body for creating a new Key Provider instance.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CreateKeyProvider
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateKeyProvider {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {KeyProviderType}
|
|
40
|
+
* @memberof CreateKeyProvider
|
|
41
|
+
*/
|
|
42
|
+
type: KeyProviderType;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {AzureKeyVaultSetting}
|
|
46
|
+
* @memberof CreateKeyProvider
|
|
47
|
+
*/
|
|
48
|
+
azureKeyvaultSettings?: AzureKeyVaultSetting;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {AwsKmsSetting}
|
|
52
|
+
* @memberof CreateKeyProvider
|
|
53
|
+
*/
|
|
54
|
+
awsKmsSettings?: AwsKmsSetting;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to enable caching for keys retrieved from this provider.
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof CreateKeyProvider
|
|
59
|
+
*/
|
|
60
|
+
cacheEnabled?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Time-to-live for cached keys in seconds (if cacheEnabled is true).
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof CreateKeyProvider
|
|
65
|
+
*/
|
|
66
|
+
cacheTTLInSeconds?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the CreateKeyProvider interface.
|
|
73
|
+
*/
|
|
74
|
+
export function instanceOfCreateKeyProvider(value: object): value is CreateKeyProvider {
|
|
75
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function CreateKeyProviderFromJSON(json: any): CreateKeyProvider {
|
|
80
|
+
return CreateKeyProviderFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function CreateKeyProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateKeyProvider {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'type': KeyProviderTypeFromJSON(json['type']),
|
|
90
|
+
'azureKeyvaultSettings': json['azureKeyvaultSettings'] == null ? undefined : AzureKeyVaultSettingFromJSON(json['azureKeyvaultSettings']),
|
|
91
|
+
'awsKmsSettings': json['awsKmsSettings'] == null ? undefined : AwsKmsSettingFromJSON(json['awsKmsSettings']),
|
|
92
|
+
'cacheEnabled': json['cacheEnabled'] == null ? undefined : json['cacheEnabled'],
|
|
93
|
+
'cacheTTLInSeconds': json['cacheTTLInSeconds'] == null ? undefined : json['cacheTTLInSeconds'],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function CreateKeyProviderToJSON(json: any): CreateKeyProvider {
|
|
98
|
+
return CreateKeyProviderToJSONTyped(json, false);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function CreateKeyProviderToJSONTyped(value?: CreateKeyProvider | null, ignoreDiscriminator: boolean = false): any {
|
|
102
|
+
if (value == null) {
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
|
|
108
|
+
'type': KeyProviderTypeToJSON(value['type']),
|
|
109
|
+
'azureKeyvaultSettings': AzureKeyVaultSettingToJSON(value['azureKeyvaultSettings']),
|
|
110
|
+
'awsKmsSettings': AwsKmsSettingToJSON(value['awsKmsSettings']),
|
|
111
|
+
'cacheEnabled': value['cacheEnabled'],
|
|
112
|
+
'cacheTTLInSeconds': value['cacheTTLInSeconds'],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
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 creating a raw signature.
|
|
23
|
+
* @export
|
|
24
|
+
* @interface CreateRawSignature
|
|
25
|
+
*/
|
|
26
|
+
export interface CreateRawSignature {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {KeyInfo}
|
|
30
|
+
* @memberof CreateRawSignature
|
|
31
|
+
*/
|
|
32
|
+
keyInfo: KeyInfo;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof CreateRawSignature
|
|
37
|
+
*/
|
|
38
|
+
input: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the CreateRawSignature interface.
|
|
43
|
+
*/
|
|
44
|
+
export function instanceOfCreateRawSignature(value: object): value is CreateRawSignature {
|
|
45
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
|
|
46
|
+
if (!('input' in value) || value['input'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CreateRawSignatureFromJSON(json: any): CreateRawSignature {
|
|
51
|
+
return CreateRawSignatureFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CreateRawSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRawSignature {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'keyInfo': KeyInfoFromJSON(json['keyInfo']),
|
|
61
|
+
'input': json['input'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function CreateRawSignatureToJSON(json: any): CreateRawSignature {
|
|
66
|
+
return CreateRawSignatureToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function CreateRawSignatureToJSONTyped(value?: CreateRawSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'keyInfo': KeyInfoToJSON(value['keyInfo']),
|
|
77
|
+
'input': value['input'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
@@ -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 created signature.
|
|
17
|
+
* @export
|
|
18
|
+
* @interface CreateRawSignatureResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface CreateRawSignatureResponse {
|
|
21
|
+
/**
|
|
22
|
+
* The created signature encoded as a base64 string.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof CreateRawSignatureResponse
|
|
25
|
+
*/
|
|
26
|
+
signature: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the CreateRawSignatureResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
export function instanceOfCreateRawSignatureResponse(value: object): value is CreateRawSignatureResponse {
|
|
33
|
+
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function CreateRawSignatureResponseFromJSON(json: any): CreateRawSignatureResponse {
|
|
38
|
+
return CreateRawSignatureResponseFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CreateRawSignatureResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRawSignatureResponse {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'signature': json['signature'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CreateRawSignatureResponseToJSON(json: any): CreateRawSignatureResponse {
|
|
52
|
+
return CreateRawSignatureResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CreateRawSignatureResponseToJSONTyped(value?: CreateRawSignatureResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'signature': value['signature'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import type { SignInput } from './SignInput';
|
|
21
|
+
import {
|
|
22
|
+
SignInputFromJSON,
|
|
23
|
+
SignInputToJSON,
|
|
24
|
+
} from './SignInput';
|
|
25
|
+
import type { SignatureAlgorithm } from './SignatureAlgorithm';
|
|
26
|
+
import {
|
|
27
|
+
SignatureAlgorithmFromJSON,
|
|
28
|
+
SignatureAlgorithmToJSON,
|
|
29
|
+
} from './SignatureAlgorithm';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Request body for creating a digital signature.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CreateSimpleSignature
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateSimpleSignature {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {SignInput}
|
|
40
|
+
* @memberof CreateSimpleSignature
|
|
41
|
+
*/
|
|
42
|
+
signInput: SignInput;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {KeyInfo}
|
|
46
|
+
* @memberof CreateSimpleSignature
|
|
47
|
+
*/
|
|
48
|
+
keyInfo: KeyInfo;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {SignatureAlgorithm}
|
|
52
|
+
* @memberof CreateSimpleSignature
|
|
53
|
+
*/
|
|
54
|
+
signatureAlgorithm?: SignatureAlgorithm;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the CreateSimpleSignature interface.
|
|
61
|
+
*/
|
|
62
|
+
export function instanceOfCreateSimpleSignature(value: object): value is CreateSimpleSignature {
|
|
63
|
+
if (!('signInput' in value) || value['signInput'] === undefined) return false;
|
|
64
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CreateSimpleSignatureFromJSON(json: any): CreateSimpleSignature {
|
|
69
|
+
return CreateSimpleSignatureFromJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CreateSimpleSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSimpleSignature {
|
|
73
|
+
if (json == null) {
|
|
74
|
+
return json;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'signInput': SignInputFromJSON(json['signInput']),
|
|
79
|
+
'keyInfo': KeyInfoFromJSON(json['keyInfo']),
|
|
80
|
+
'signatureAlgorithm': json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CreateSimpleSignatureToJSON(json: any): CreateSimpleSignature {
|
|
85
|
+
return CreateSimpleSignatureToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CreateSimpleSignatureToJSONTyped(value?: CreateSimpleSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'signInput': SignInputToJSON(value['signInput']),
|
|
96
|
+
'keyInfo': KeyInfoToJSON(value['keyInfo']),
|
|
97
|
+
'signatureAlgorithm': SignatureAlgorithmToJSON(value['signatureAlgorithm']),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Cryptographic algorithm type.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CryptoAlg = {
|
|
21
|
+
Ed25519: 'ED25519',
|
|
22
|
+
Ecdsa: 'ECDSA',
|
|
23
|
+
Hmac: 'HMAC',
|
|
24
|
+
Rsa: 'RSA'
|
|
25
|
+
} as const;
|
|
26
|
+
export type CryptoAlg = typeof CryptoAlg[keyof typeof CryptoAlg];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfCryptoAlg(value: any): boolean {
|
|
30
|
+
for (const key in CryptoAlg) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(CryptoAlg, key)) {
|
|
32
|
+
if (CryptoAlg[key as keyof typeof CryptoAlg] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function CryptoAlgFromJSON(json: any): CryptoAlg {
|
|
41
|
+
return CryptoAlgFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function CryptoAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): CryptoAlg {
|
|
45
|
+
return json as CryptoAlg;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function CryptoAlgToJSON(value?: CryptoAlg | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CryptoAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): CryptoAlg {
|
|
53
|
+
return value as CryptoAlg;
|
|
54
|
+
}
|
|
55
|
+
|