@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.
Files changed (71) hide show
  1. package/LICENSE +201 -0
  2. package/dist/index.cjs +2083 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1468 -0
  5. package/dist/index.d.ts +1468 -0
  6. package/dist/index.js +2063 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +60 -0
  9. package/plugin.schema.json +1123 -0
  10. package/src/agent/KmsRestClient.ts +468 -0
  11. package/src/index.ts +7 -0
  12. package/src/models/AwsAssumeRoleCredentials.ts +98 -0
  13. package/src/models/AwsClientConfiguration.ts +72 -0
  14. package/src/models/AwsKmsSetting.ts +126 -0
  15. package/src/models/AwsStaticCredentials.ts +98 -0
  16. package/src/models/AwsWebIdentityTokenCredentials.ts +99 -0
  17. package/src/models/AzureClientSecretCredentialOpts.ts +90 -0
  18. package/src/models/AzureCredentialOpts.ts +70 -0
  19. package/src/models/AzureKeyVaultSetting.ts +112 -0
  20. package/src/models/CoseKey.ts +145 -0
  21. package/src/models/CoseKeyPair.ts +79 -0
  22. package/src/models/CoseKeyType.ts +55 -0
  23. package/src/models/CreateKeyProvider.ts +115 -0
  24. package/src/models/CreateRawSignature.ts +80 -0
  25. package/src/models/CreateRawSignatureResponse.ts +65 -0
  26. package/src/models/CreateSimpleSignature.ts +100 -0
  27. package/src/models/CryptoAlg.ts +55 -0
  28. package/src/models/Curve.ts +59 -0
  29. package/src/models/DigestAlg.ts +58 -0
  30. package/src/models/ErrorResponse.ts +82 -0
  31. package/src/models/GenerateKey.ts +106 -0
  32. package/src/models/GenerateKeyGlobal.ts +114 -0
  33. package/src/models/GenerateKeyResponse.ts +71 -0
  34. package/src/models/GetKeyResponse.ts +71 -0
  35. package/src/models/IdentifierMethod.ts +56 -0
  36. package/src/models/JoseKeyPair.ts +79 -0
  37. package/src/models/Jwk.ts +248 -0
  38. package/src/models/JwkKeyType.ts +55 -0
  39. package/src/models/JwkUse.ts +53 -0
  40. package/src/models/KeyEncoding.ts +53 -0
  41. package/src/models/KeyInfo.ts +164 -0
  42. package/src/models/KeyOperations.ts +59 -0
  43. package/src/models/KeyProvider.ts +82 -0
  44. package/src/models/KeyProviderResponse.ts +82 -0
  45. package/src/models/KeyProviderType.ts +54 -0
  46. package/src/models/KeyResolver.ts +92 -0
  47. package/src/models/KeyType.ts +54 -0
  48. package/src/models/KeyVisibility.ts +53 -0
  49. package/src/models/ListKeyProvidersResponse.ts +71 -0
  50. package/src/models/ListKeysResponse.ts +71 -0
  51. package/src/models/ListResolversResponse.ts +71 -0
  52. package/src/models/LookupMode.ts +54 -0
  53. package/src/models/ManagedKeyInfo.ts +167 -0
  54. package/src/models/ManagedKeyPair.ts +111 -0
  55. package/src/models/MaskGenFunction.ts +52 -0
  56. package/src/models/ProviderCapabilities.ts +122 -0
  57. package/src/models/ResolvePublicKey.ts +102 -0
  58. package/src/models/ResolvedKeyInfo.ts +165 -0
  59. package/src/models/Resolver.ts +92 -0
  60. package/src/models/SignInput.ts +92 -0
  61. package/src/models/SignOutput.ts +79 -0
  62. package/src/models/Signature.ts +103 -0
  63. package/src/models/SignatureAlgorithm.ts +63 -0
  64. package/src/models/StoreKey.ts +79 -0
  65. package/src/models/StoreKeyResponse.ts +71 -0
  66. package/src/models/UpdateKeyProvider.ts +99 -0
  67. package/src/models/VerifyRawSignature.ts +89 -0
  68. package/src/models/VerifyRawSignatureResponse.ts +65 -0
  69. package/src/models/VerifySimpleSignature.ts +85 -0
  70. package/src/models/index.ts +60 -0
  71. package/src/types/IKmsRestClient.ts +133 -0
@@ -0,0 +1,165 @@
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 { KeyType } from './KeyType';
16
+ import {
17
+ KeyTypeFromJSON,
18
+ KeyTypeToJSON,
19
+ } from './KeyType';
20
+ import type { KeyVisibility } from './KeyVisibility';
21
+ import {
22
+ KeyVisibilityFromJSON,
23
+ KeyVisibilityToJSON,
24
+ } from './KeyVisibility';
25
+ import type { SignatureAlgorithm } from './SignatureAlgorithm';
26
+ import {
27
+ SignatureAlgorithmFromJSON,
28
+ SignatureAlgorithmToJSON,
29
+ } from './SignatureAlgorithm';
30
+ import type { KeyEncoding } from './KeyEncoding';
31
+ import {
32
+ KeyEncodingFromJSON,
33
+ KeyEncodingToJSON,
34
+ } from './KeyEncoding';
35
+ import type { Jwk } from './Jwk';
36
+ import {
37
+ JwkFromJSON,
38
+ JwkToJSON,
39
+ } from './Jwk';
40
+
41
+ /**
42
+ * Represents a resolved cryptographic key information where the key is guaranteed to be present and resolved, providing concrete access to the key.
43
+ * @export
44
+ * @interface ResolvedKeyInfo
45
+ */
46
+ export interface ResolvedKeyInfo {
47
+ /**
48
+ * Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
49
+ * @type {string}
50
+ * @memberof ResolvedKeyInfo
51
+ */
52
+ kid?: string;
53
+ /**
54
+ *
55
+ * @type {Jwk}
56
+ * @memberof ResolvedKeyInfo
57
+ */
58
+ key: Jwk;
59
+ /**
60
+ *
61
+ * @type {SignatureAlgorithm}
62
+ * @memberof ResolvedKeyInfo
63
+ */
64
+ signatureAlgorithm?: SignatureAlgorithm;
65
+ /**
66
+ *
67
+ * @type {KeyVisibility}
68
+ * @memberof ResolvedKeyInfo
69
+ */
70
+ keyVisibility?: KeyVisibility;
71
+ /**
72
+ * X.509 certificate chain associated with the key.
73
+ * @type {Array<string>}
74
+ * @memberof ResolvedKeyInfo
75
+ */
76
+ x5c?: Array<string>;
77
+ /**
78
+ * A reference or alias to the key in the Key Management Service (KMS).
79
+ * @type {string}
80
+ * @memberof ResolvedKeyInfo
81
+ */
82
+ alias?: string;
83
+ /**
84
+ * The Key Management System (KMS) identifier associated with the key.
85
+ * @type {string}
86
+ * @memberof ResolvedKeyInfo
87
+ */
88
+ providerId?: string;
89
+ /**
90
+ *
91
+ * @type {KeyType}
92
+ * @memberof ResolvedKeyInfo
93
+ */
94
+ keyType?: KeyType;
95
+ /**
96
+ *
97
+ * @type {KeyEncoding}
98
+ * @memberof ResolvedKeyInfo
99
+ */
100
+ keyEncoding?: KeyEncoding;
101
+ /**
102
+ * Additional configuration options as key-value pairs.
103
+ * @type {{ [key: string]: string; }}
104
+ * @memberof ResolvedKeyInfo
105
+ */
106
+ opts?: { [key: string]: string; };
107
+ }
108
+
109
+
110
+
111
+ /**
112
+ * Check if a given object implements the ResolvedKeyInfo interface.
113
+ */
114
+ export function instanceOfResolvedKeyInfo(value: object): value is ResolvedKeyInfo {
115
+ if (!('key' in value) || value['key'] === undefined) return false;
116
+ return true;
117
+ }
118
+
119
+ export function ResolvedKeyInfoFromJSON(json: any): ResolvedKeyInfo {
120
+ return ResolvedKeyInfoFromJSONTyped(json, false);
121
+ }
122
+
123
+ export function ResolvedKeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResolvedKeyInfo {
124
+ if (json == null) {
125
+ return json;
126
+ }
127
+ return {
128
+
129
+ 'kid': json['kid'] == null ? undefined : json['kid'],
130
+ 'key': JwkFromJSON(json['key']),
131
+ 'signatureAlgorithm': json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
132
+ 'keyVisibility': json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
133
+ 'x5c': json['x5c'] == null ? undefined : json['x5c'],
134
+ 'alias': json['alias'] == null ? undefined : json['alias'],
135
+ 'providerId': json['providerId'] == null ? undefined : json['providerId'],
136
+ 'keyType': json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
137
+ 'keyEncoding': json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
138
+ 'opts': json['opts'] == null ? undefined : json['opts'],
139
+ };
140
+ }
141
+
142
+ export function ResolvedKeyInfoToJSON(json: any): ResolvedKeyInfo {
143
+ return ResolvedKeyInfoToJSONTyped(json, false);
144
+ }
145
+
146
+ export function ResolvedKeyInfoToJSONTyped(value?: ResolvedKeyInfo | null, ignoreDiscriminator: boolean = false): any {
147
+ if (value == null) {
148
+ return value;
149
+ }
150
+
151
+ return {
152
+
153
+ 'kid': value['kid'],
154
+ 'key': JwkToJSON(value['key']),
155
+ 'signatureAlgorithm': SignatureAlgorithmToJSON(value['signatureAlgorithm']),
156
+ 'keyVisibility': KeyVisibilityToJSON(value['keyVisibility']),
157
+ 'x5c': value['x5c'],
158
+ 'alias': value['alias'],
159
+ 'providerId': value['providerId'],
160
+ 'keyType': KeyTypeToJSON(value['keyType']),
161
+ 'keyEncoding': KeyEncodingToJSON(value['keyEncoding']),
162
+ 'opts': value['opts'],
163
+ };
164
+ }
165
+
@@ -0,0 +1,92 @@
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 { KeyType } from './KeyType';
16
+ import {
17
+ KeyTypeFromJSON,
18
+ KeyTypeToJSON,
19
+ } from './KeyType';
20
+ import type { IdentifierMethod } from './IdentifierMethod';
21
+ import {
22
+ IdentifierMethodFromJSON,
23
+ IdentifierMethodToJSON,
24
+ } from './IdentifierMethod';
25
+
26
+ /**
27
+ * Represents a key resolver configuration.
28
+ * @export
29
+ * @interface Resolver
30
+ */
31
+ export interface Resolver {
32
+ /**
33
+ * Unique identifier for the resolver.
34
+ * @type {string}
35
+ * @memberof Resolver
36
+ */
37
+ resolverId: string;
38
+ /**
39
+ * List of identifier methods supported by this resolver.
40
+ * @type {Array<IdentifierMethod>}
41
+ * @memberof Resolver
42
+ */
43
+ supportedIdentifierMethods?: Array<IdentifierMethod>;
44
+ /**
45
+ * List of key types supported by this resolver.
46
+ * @type {Array<KeyType>}
47
+ * @memberof Resolver
48
+ */
49
+ supportedKeyTypes?: Array<KeyType>;
50
+ }
51
+
52
+ /**
53
+ * Check if a given object implements the Resolver interface.
54
+ */
55
+ export function instanceOfResolver(value: object): value is Resolver {
56
+ if (!('resolverId' in value) || value['resolverId'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function ResolverFromJSON(json: any): Resolver {
61
+ return ResolverFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function ResolverFromJSONTyped(json: any, ignoreDiscriminator: boolean): Resolver {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'resolverId': json['resolverId'],
71
+ 'supportedIdentifierMethods': json['supportedIdentifierMethods'] == null ? undefined : ((json['supportedIdentifierMethods'] as Array<any>).map(IdentifierMethodFromJSON)),
72
+ 'supportedKeyTypes': json['supportedKeyTypes'] == null ? undefined : ((json['supportedKeyTypes'] as Array<any>).map(KeyTypeFromJSON)),
73
+ };
74
+ }
75
+
76
+ export function ResolverToJSON(json: any): Resolver {
77
+ return ResolverToJSONTyped(json, false);
78
+ }
79
+
80
+ export function ResolverToJSONTyped(value?: Resolver | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'resolverId': value['resolverId'],
88
+ 'supportedIdentifierMethods': value['supportedIdentifierMethods'] == null ? undefined : ((value['supportedIdentifierMethods'] as Array<any>).map(IdentifierMethodToJSON)),
89
+ 'supportedKeyTypes': value['supportedKeyTypes'] == null ? undefined : ((value['supportedKeyTypes'] as Array<any>).map(KeyTypeToJSON)),
90
+ };
91
+ }
92
+
@@ -0,0 +1,92 @@
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
+ * The input data and metadata required for creating a signature.
17
+ * @export
18
+ * @interface SignInput
19
+ */
20
+ export interface SignInput {
21
+ /**
22
+ * The data to be signed, encoded as a base64 string.
23
+ * @type {string}
24
+ * @memberof SignInput
25
+ */
26
+ data: string;
27
+ /**
28
+ * The signing mode to be used.
29
+ * @type {string}
30
+ * @memberof SignInput
31
+ */
32
+ mode?: SignInputModeEnum;
33
+ /**
34
+ * Additional metadata to be included in the signature.
35
+ * @type {{ [key: string]: any; }}
36
+ * @memberof SignInput
37
+ */
38
+ metadata?: { [key: string]: any; };
39
+ }
40
+
41
+
42
+ /**
43
+ * @export
44
+ */
45
+ export const SignInputModeEnum = {
46
+ Detached: 'DETACHED',
47
+ Attached: 'ATTACHED'
48
+ } as const;
49
+ export type SignInputModeEnum = typeof SignInputModeEnum[keyof typeof SignInputModeEnum];
50
+
51
+
52
+ /**
53
+ * Check if a given object implements the SignInput interface.
54
+ */
55
+ export function instanceOfSignInput(value: object): value is SignInput {
56
+ if (!('data' in value) || value['data'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function SignInputFromJSON(json: any): SignInput {
61
+ return SignInputFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function SignInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignInput {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'data': json['data'],
71
+ 'mode': json['mode'] == null ? undefined : json['mode'],
72
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
73
+ };
74
+ }
75
+
76
+ export function SignInputToJSON(json: any): SignInput {
77
+ return SignInputToJSONTyped(json, false);
78
+ }
79
+
80
+ export function SignInputToJSONTyped(value?: SignInput | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'data': value['data'],
88
+ 'mode': value['mode'],
89
+ 'metadata': value['metadata'],
90
+ };
91
+ }
92
+
@@ -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 { Signature } from './Signature';
16
+ import {
17
+ SignatureFromJSON,
18
+ SignatureToJSON,
19
+ } from './Signature';
20
+
21
+ /**
22
+ * The output of a signature creation operation.
23
+ * @export
24
+ * @interface SignOutput
25
+ */
26
+ export interface SignOutput {
27
+ /**
28
+ *
29
+ * @type {Signature}
30
+ * @memberof SignOutput
31
+ */
32
+ signature: Signature;
33
+ /**
34
+ * Additional metadata included in the signature output.
35
+ * @type {{ [key: string]: any; }}
36
+ * @memberof SignOutput
37
+ */
38
+ metadata?: { [key: string]: any; };
39
+ }
40
+
41
+ /**
42
+ * Check if a given object implements the SignOutput interface.
43
+ */
44
+ export function instanceOfSignOutput(value: object): value is SignOutput {
45
+ if (!('signature' in value) || value['signature'] === undefined) return false;
46
+ return true;
47
+ }
48
+
49
+ export function SignOutputFromJSON(json: any): SignOutput {
50
+ return SignOutputFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function SignOutputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignOutput {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'signature': SignatureFromJSON(json['signature']),
60
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
61
+ };
62
+ }
63
+
64
+ export function SignOutputToJSON(json: any): SignOutput {
65
+ return SignOutputToJSONTyped(json, false);
66
+ }
67
+
68
+ export function SignOutputToJSONTyped(value?: SignOutput | null, ignoreDiscriminator: boolean = false): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+
73
+ return {
74
+
75
+ 'signature': SignatureToJSON(value['signature']),
76
+ 'metadata': value['metadata'],
77
+ };
78
+ }
79
+
@@ -0,0 +1,103 @@
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 { SignatureAlgorithm } from './SignatureAlgorithm';
21
+ import {
22
+ SignatureAlgorithmFromJSON,
23
+ SignatureAlgorithmToJSON,
24
+ } from './SignatureAlgorithm';
25
+
26
+ /**
27
+ * A cryptographic signature including the signature value and related information.
28
+ * @export
29
+ * @interface Signature
30
+ */
31
+ export interface Signature {
32
+ /**
33
+ * The signature value, encoded as a base64 string.
34
+ * @type {string}
35
+ * @memberof Signature
36
+ */
37
+ value: string;
38
+ /**
39
+ *
40
+ * @type {SignatureAlgorithm}
41
+ * @memberof Signature
42
+ */
43
+ algorithm: SignatureAlgorithm;
44
+ /**
45
+ *
46
+ * @type {KeyInfo}
47
+ * @memberof Signature
48
+ */
49
+ keyInfo?: KeyInfo;
50
+ /**
51
+ * Additional metadata included in the signature.
52
+ * @type {{ [key: string]: any; }}
53
+ * @memberof Signature
54
+ */
55
+ metadata?: { [key: string]: any; };
56
+ }
57
+
58
+
59
+
60
+ /**
61
+ * Check if a given object implements the Signature interface.
62
+ */
63
+ export function instanceOfSignature(value: object): value is Signature {
64
+ if (!('value' in value) || value['value'] === undefined) return false;
65
+ if (!('algorithm' in value) || value['algorithm'] === undefined) return false;
66
+ return true;
67
+ }
68
+
69
+ export function SignatureFromJSON(json: any): Signature {
70
+ return SignatureFromJSONTyped(json, false);
71
+ }
72
+
73
+ export function SignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Signature {
74
+ if (json == null) {
75
+ return json;
76
+ }
77
+ return {
78
+
79
+ 'value': json['value'],
80
+ 'algorithm': SignatureAlgorithmFromJSON(json['algorithm']),
81
+ 'keyInfo': json['keyInfo'] == null ? undefined : KeyInfoFromJSON(json['keyInfo']),
82
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
83
+ };
84
+ }
85
+
86
+ export function SignatureToJSON(json: any): Signature {
87
+ return SignatureToJSONTyped(json, false);
88
+ }
89
+
90
+ export function SignatureToJSONTyped(value?: Signature | null, ignoreDiscriminator: boolean = false): any {
91
+ if (value == null) {
92
+ return value;
93
+ }
94
+
95
+ return {
96
+
97
+ 'value': value['value'],
98
+ 'algorithm': SignatureAlgorithmToJSON(value['algorithm']),
99
+ 'keyInfo': KeyInfoToJSON(value['keyInfo']),
100
+ 'metadata': value['metadata'],
101
+ };
102
+ }
103
+
@@ -0,0 +1,63 @@
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 signature algorithm identifier.
18
+ * @export
19
+ */
20
+ export const SignatureAlgorithm = {
21
+ Ed25519: 'ED25519',
22
+ EcdsaSha256: 'ECDSA_SHA256',
23
+ EcdsaSha384: 'ECDSA_SHA384',
24
+ EcdsaSha512: 'ECDSA_SHA512',
25
+ Es256K: 'ES256K',
26
+ EckaDhSha256: 'ECKA_DH_SHA256',
27
+ HmacSha256: 'HMAC_SHA256',
28
+ HmacSha384: 'HMAC_SHA384',
29
+ HmacSha512: 'HMAC_SHA512',
30
+ RsaSsaPssSha256Mgf1: 'RSA_SSA_PSS_SHA256_MGF1',
31
+ RsaSsaPssSha384Mgf1: 'RSA_SSA_PSS_SHA384_MGF1',
32
+ RsaSsaPssSha512Mgf1: 'RSA_SSA_PSS_SHA512_MGF1'
33
+ } as const;
34
+ export type SignatureAlgorithm = typeof SignatureAlgorithm[keyof typeof SignatureAlgorithm];
35
+
36
+
37
+ export function instanceOfSignatureAlgorithm(value: any): boolean {
38
+ for (const key in SignatureAlgorithm) {
39
+ if (Object.prototype.hasOwnProperty.call(SignatureAlgorithm, key)) {
40
+ if (SignatureAlgorithm[key as keyof typeof SignatureAlgorithm] === value) {
41
+ return true;
42
+ }
43
+ }
44
+ }
45
+ return false;
46
+ }
47
+
48
+ export function SignatureAlgorithmFromJSON(json: any): SignatureAlgorithm {
49
+ return SignatureAlgorithmFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function SignatureAlgorithmFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignatureAlgorithm {
53
+ return json as SignatureAlgorithm;
54
+ }
55
+
56
+ export function SignatureAlgorithmToJSON(value?: SignatureAlgorithm | null): any {
57
+ return value as any;
58
+ }
59
+
60
+ export function SignatureAlgorithmToJSONTyped(value: any, ignoreDiscriminator: boolean): SignatureAlgorithm {
61
+ return value as SignatureAlgorithm;
62
+ }
63
+
@@ -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 { ResolvedKeyInfo } from './ResolvedKeyInfo';
16
+ import {
17
+ ResolvedKeyInfoFromJSON,
18
+ ResolvedKeyInfoToJSON,
19
+ } from './ResolvedKeyInfo';
20
+
21
+ /**
22
+ * Request body for storing a key.
23
+ * @export
24
+ * @interface StoreKey
25
+ */
26
+ export interface StoreKey {
27
+ /**
28
+ *
29
+ * @type {ResolvedKeyInfo}
30
+ * @memberof StoreKey
31
+ */
32
+ keyInfo: ResolvedKeyInfo;
33
+ /**
34
+ * X.509 certificate chain as base64-encoded DER certificates.
35
+ * @type {Array<string>}
36
+ * @memberof StoreKey
37
+ */
38
+ certChain?: Array<string>;
39
+ }
40
+
41
+ /**
42
+ * Check if a given object implements the StoreKey interface.
43
+ */
44
+ export function instanceOfStoreKey(value: object): value is StoreKey {
45
+ if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
46
+ return true;
47
+ }
48
+
49
+ export function StoreKeyFromJSON(json: any): StoreKey {
50
+ return StoreKeyFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function StoreKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreKey {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'keyInfo': ResolvedKeyInfoFromJSON(json['keyInfo']),
60
+ 'certChain': json['certChain'] == null ? undefined : json['certChain'],
61
+ };
62
+ }
63
+
64
+ export function StoreKeyToJSON(json: any): StoreKey {
65
+ return StoreKeyToJSONTyped(json, false);
66
+ }
67
+
68
+ export function StoreKeyToJSONTyped(value?: StoreKey | null, ignoreDiscriminator: boolean = false): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+
73
+ return {
74
+
75
+ 'keyInfo': ResolvedKeyInfoToJSON(value['keyInfo']),
76
+ 'certChain': value['certChain'],
77
+ };
78
+ }
79
+