@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.294

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 (72) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +369 -0
  3. package/dist/index.cjs +3924 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +3927 -0
  6. package/dist/index.d.ts +3927 -0
  7. package/dist/index.js +3903 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +60 -0
  10. package/plugin.schema.json +1004 -0
  11. package/src/agent/KmsRestClient.ts +468 -0
  12. package/src/index.ts +8 -0
  13. package/src/models/AwsAssumeRoleCredentials.ts +90 -0
  14. package/src/models/AwsClientConfiguration.ts +69 -0
  15. package/src/models/AwsKmsSetting.ts +112 -0
  16. package/src/models/AwsStaticCredentials.ts +90 -0
  17. package/src/models/AwsWebIdentityTokenCredentials.ts +91 -0
  18. package/src/models/AzureClientSecretCredentialOpts.ts +85 -0
  19. package/src/models/AzureCredentialOpts.ts +65 -0
  20. package/src/models/AzureKeyVaultSetting.ts +101 -0
  21. package/src/models/CoseKey.ts +137 -0
  22. package/src/models/CoseKeyPair.ts +73 -0
  23. package/src/models/CoseKeyType.ts +52 -0
  24. package/src/models/CreateKeyProvider.ts +101 -0
  25. package/src/models/CreateRawSignature.ts +74 -0
  26. package/src/models/CreateRawSignatureResponse.ts +62 -0
  27. package/src/models/CreateSimpleSignature.ts +86 -0
  28. package/src/models/CryptoAlg.ts +52 -0
  29. package/src/models/Curve.ts +56 -0
  30. package/src/models/DigestAlg.ts +55 -0
  31. package/src/models/ErrorResponse.ts +79 -0
  32. package/src/models/GenerateKey.ts +92 -0
  33. package/src/models/GenerateKeyGlobal.ts +100 -0
  34. package/src/models/GenerateKeyResponse.ts +65 -0
  35. package/src/models/GetKeyResponse.ts +65 -0
  36. package/src/models/IdentifierMethod.ts +53 -0
  37. package/src/models/JoseKeyPair.ts +73 -0
  38. package/src/models/Jwk.ts +231 -0
  39. package/src/models/JwkKeyType.ts +52 -0
  40. package/src/models/JwkUse.ts +50 -0
  41. package/src/models/KeyEncoding.ts +50 -0
  42. package/src/models/KeyInfo.ts +144 -0
  43. package/src/models/KeyOperations.ts +56 -0
  44. package/src/models/KeyProvider.ts +74 -0
  45. package/src/models/KeyProviderResponse.ts +74 -0
  46. package/src/models/KeyProviderType.ts +51 -0
  47. package/src/models/KeyResolver.ts +85 -0
  48. package/src/models/KeyType.ts +51 -0
  49. package/src/models/KeyVisibility.ts +50 -0
  50. package/src/models/ListKeyProvidersResponse.ts +65 -0
  51. package/src/models/ListKeysResponse.ts +65 -0
  52. package/src/models/ListResolversResponse.ts +65 -0
  53. package/src/models/LookupMode.ts +51 -0
  54. package/src/models/ManagedKeyInfo.ts +147 -0
  55. package/src/models/ManagedKeyPair.ts +102 -0
  56. package/src/models/MaskGenFunction.ts +49 -0
  57. package/src/models/ProviderCapabilities.ts +106 -0
  58. package/src/models/ResolvePublicKey.ts +91 -0
  59. package/src/models/ResolvedKeyInfo.ts +145 -0
  60. package/src/models/Resolver.ts +85 -0
  61. package/src/models/SignInput.ts +87 -0
  62. package/src/models/SignOutput.ts +73 -0
  63. package/src/models/Signature.ts +92 -0
  64. package/src/models/SignatureAlgorithm.ts +60 -0
  65. package/src/models/StoreKey.ts +73 -0
  66. package/src/models/StoreKeyResponse.ts +65 -0
  67. package/src/models/UpdateKeyProvider.ts +90 -0
  68. package/src/models/VerifyRawSignature.ts +83 -0
  69. package/src/models/VerifyRawSignatureResponse.ts +62 -0
  70. package/src/models/VerifySimpleSignature.ts +76 -0
  71. package/src/models/index.ts +60 -0
  72. package/src/types/IKmsRestClient.ts +134 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,3924 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ AwsAssumeRoleCredentialsFromJSON: () => AwsAssumeRoleCredentialsFromJSON,
25
+ AwsAssumeRoleCredentialsFromJSONTyped: () => AwsAssumeRoleCredentialsFromJSONTyped,
26
+ AwsAssumeRoleCredentialsToJSON: () => AwsAssumeRoleCredentialsToJSON,
27
+ AwsAssumeRoleCredentialsToJSONTyped: () => AwsAssumeRoleCredentialsToJSONTyped,
28
+ AwsClientConfigurationFromJSON: () => AwsClientConfigurationFromJSON,
29
+ AwsClientConfigurationFromJSONTyped: () => AwsClientConfigurationFromJSONTyped,
30
+ AwsClientConfigurationToJSON: () => AwsClientConfigurationToJSON,
31
+ AwsClientConfigurationToJSONTyped: () => AwsClientConfigurationToJSONTyped,
32
+ AwsKmsSettingFromJSON: () => AwsKmsSettingFromJSON,
33
+ AwsKmsSettingFromJSONTyped: () => AwsKmsSettingFromJSONTyped,
34
+ AwsKmsSettingToJSON: () => AwsKmsSettingToJSON,
35
+ AwsKmsSettingToJSONTyped: () => AwsKmsSettingToJSONTyped,
36
+ AwsStaticCredentialsFromJSON: () => AwsStaticCredentialsFromJSON,
37
+ AwsStaticCredentialsFromJSONTyped: () => AwsStaticCredentialsFromJSONTyped,
38
+ AwsStaticCredentialsToJSON: () => AwsStaticCredentialsToJSON,
39
+ AwsStaticCredentialsToJSONTyped: () => AwsStaticCredentialsToJSONTyped,
40
+ AwsWebIdentityTokenCredentialsFromJSON: () => AwsWebIdentityTokenCredentialsFromJSON,
41
+ AwsWebIdentityTokenCredentialsFromJSONTyped: () => AwsWebIdentityTokenCredentialsFromJSONTyped,
42
+ AwsWebIdentityTokenCredentialsToJSON: () => AwsWebIdentityTokenCredentialsToJSON,
43
+ AwsWebIdentityTokenCredentialsToJSONTyped: () => AwsWebIdentityTokenCredentialsToJSONTyped,
44
+ AzureClientSecretCredentialOptsFromJSON: () => AzureClientSecretCredentialOptsFromJSON,
45
+ AzureClientSecretCredentialOptsFromJSONTyped: () => AzureClientSecretCredentialOptsFromJSONTyped,
46
+ AzureClientSecretCredentialOptsToJSON: () => AzureClientSecretCredentialOptsToJSON,
47
+ AzureClientSecretCredentialOptsToJSONTyped: () => AzureClientSecretCredentialOptsToJSONTyped,
48
+ AzureCredentialOptsFromJSON: () => AzureCredentialOptsFromJSON,
49
+ AzureCredentialOptsFromJSONTyped: () => AzureCredentialOptsFromJSONTyped,
50
+ AzureCredentialOptsToJSON: () => AzureCredentialOptsToJSON,
51
+ AzureCredentialOptsToJSONTyped: () => AzureCredentialOptsToJSONTyped,
52
+ AzureKeyVaultSettingFromJSON: () => AzureKeyVaultSettingFromJSON,
53
+ AzureKeyVaultSettingFromJSONTyped: () => AzureKeyVaultSettingFromJSONTyped,
54
+ AzureKeyVaultSettingToJSON: () => AzureKeyVaultSettingToJSON,
55
+ AzureKeyVaultSettingToJSONTyped: () => AzureKeyVaultSettingToJSONTyped,
56
+ CoseKeyFromJSON: () => CoseKeyFromJSON,
57
+ CoseKeyFromJSONTyped: () => CoseKeyFromJSONTyped,
58
+ CoseKeyPairFromJSON: () => CoseKeyPairFromJSON,
59
+ CoseKeyPairFromJSONTyped: () => CoseKeyPairFromJSONTyped,
60
+ CoseKeyPairToJSON: () => CoseKeyPairToJSON,
61
+ CoseKeyPairToJSONTyped: () => CoseKeyPairToJSONTyped,
62
+ CoseKeyToJSON: () => CoseKeyToJSON,
63
+ CoseKeyToJSONTyped: () => CoseKeyToJSONTyped,
64
+ CoseKeyType: () => CoseKeyType,
65
+ CoseKeyTypeFromJSON: () => CoseKeyTypeFromJSON,
66
+ CoseKeyTypeFromJSONTyped: () => CoseKeyTypeFromJSONTyped,
67
+ CoseKeyTypeToJSON: () => CoseKeyTypeToJSON,
68
+ CoseKeyTypeToJSONTyped: () => CoseKeyTypeToJSONTyped,
69
+ CreateKeyProviderFromJSON: () => CreateKeyProviderFromJSON,
70
+ CreateKeyProviderFromJSONTyped: () => CreateKeyProviderFromJSONTyped,
71
+ CreateKeyProviderToJSON: () => CreateKeyProviderToJSON,
72
+ CreateKeyProviderToJSONTyped: () => CreateKeyProviderToJSONTyped,
73
+ CreateRawSignatureFromJSON: () => CreateRawSignatureFromJSON,
74
+ CreateRawSignatureFromJSONTyped: () => CreateRawSignatureFromJSONTyped,
75
+ CreateRawSignatureResponseFromJSON: () => CreateRawSignatureResponseFromJSON,
76
+ CreateRawSignatureResponseFromJSONTyped: () => CreateRawSignatureResponseFromJSONTyped,
77
+ CreateRawSignatureResponseToJSON: () => CreateRawSignatureResponseToJSON,
78
+ CreateRawSignatureResponseToJSONTyped: () => CreateRawSignatureResponseToJSONTyped,
79
+ CreateRawSignatureToJSON: () => CreateRawSignatureToJSON,
80
+ CreateRawSignatureToJSONTyped: () => CreateRawSignatureToJSONTyped,
81
+ CreateSimpleSignatureFromJSON: () => CreateSimpleSignatureFromJSON,
82
+ CreateSimpleSignatureFromJSONTyped: () => CreateSimpleSignatureFromJSONTyped,
83
+ CreateSimpleSignatureToJSON: () => CreateSimpleSignatureToJSON,
84
+ CreateSimpleSignatureToJSONTyped: () => CreateSimpleSignatureToJSONTyped,
85
+ CryptoAlg: () => CryptoAlg,
86
+ CryptoAlgFromJSON: () => CryptoAlgFromJSON,
87
+ CryptoAlgFromJSONTyped: () => CryptoAlgFromJSONTyped,
88
+ CryptoAlgToJSON: () => CryptoAlgToJSON,
89
+ CryptoAlgToJSONTyped: () => CryptoAlgToJSONTyped,
90
+ Curve: () => Curve,
91
+ CurveFromJSON: () => CurveFromJSON,
92
+ CurveFromJSONTyped: () => CurveFromJSONTyped,
93
+ CurveToJSON: () => CurveToJSON,
94
+ CurveToJSONTyped: () => CurveToJSONTyped,
95
+ DigestAlg: () => DigestAlg,
96
+ DigestAlgFromJSON: () => DigestAlgFromJSON,
97
+ DigestAlgFromJSONTyped: () => DigestAlgFromJSONTyped,
98
+ DigestAlgToJSON: () => DigestAlgToJSON,
99
+ DigestAlgToJSONTyped: () => DigestAlgToJSONTyped,
100
+ ErrorResponseFromJSON: () => ErrorResponseFromJSON,
101
+ ErrorResponseFromJSONTyped: () => ErrorResponseFromJSONTyped,
102
+ ErrorResponseToJSON: () => ErrorResponseToJSON,
103
+ ErrorResponseToJSONTyped: () => ErrorResponseToJSONTyped,
104
+ GenerateKeyFromJSON: () => GenerateKeyFromJSON,
105
+ GenerateKeyFromJSONTyped: () => GenerateKeyFromJSONTyped,
106
+ GenerateKeyGlobalFromJSON: () => GenerateKeyGlobalFromJSON,
107
+ GenerateKeyGlobalFromJSONTyped: () => GenerateKeyGlobalFromJSONTyped,
108
+ GenerateKeyGlobalToJSON: () => GenerateKeyGlobalToJSON,
109
+ GenerateKeyGlobalToJSONTyped: () => GenerateKeyGlobalToJSONTyped,
110
+ GenerateKeyResponseFromJSON: () => GenerateKeyResponseFromJSON,
111
+ GenerateKeyResponseFromJSONTyped: () => GenerateKeyResponseFromJSONTyped,
112
+ GenerateKeyResponseToJSON: () => GenerateKeyResponseToJSON,
113
+ GenerateKeyResponseToJSONTyped: () => GenerateKeyResponseToJSONTyped,
114
+ GenerateKeyToJSON: () => GenerateKeyToJSON,
115
+ GenerateKeyToJSONTyped: () => GenerateKeyToJSONTyped,
116
+ GetKeyResponseFromJSON: () => GetKeyResponseFromJSON,
117
+ GetKeyResponseFromJSONTyped: () => GetKeyResponseFromJSONTyped,
118
+ GetKeyResponseToJSON: () => GetKeyResponseToJSON,
119
+ GetKeyResponseToJSONTyped: () => GetKeyResponseToJSONTyped,
120
+ IdentifierMethod: () => IdentifierMethod,
121
+ IdentifierMethodFromJSON: () => IdentifierMethodFromJSON,
122
+ IdentifierMethodFromJSONTyped: () => IdentifierMethodFromJSONTyped,
123
+ IdentifierMethodToJSON: () => IdentifierMethodToJSON,
124
+ IdentifierMethodToJSONTyped: () => IdentifierMethodToJSONTyped,
125
+ JoseKeyPairFromJSON: () => JoseKeyPairFromJSON,
126
+ JoseKeyPairFromJSONTyped: () => JoseKeyPairFromJSONTyped,
127
+ JoseKeyPairToJSON: () => JoseKeyPairToJSON,
128
+ JoseKeyPairToJSONTyped: () => JoseKeyPairToJSONTyped,
129
+ JwkFromJSON: () => JwkFromJSON,
130
+ JwkFromJSONTyped: () => JwkFromJSONTyped,
131
+ JwkKeyType: () => JwkKeyType,
132
+ JwkKeyTypeFromJSON: () => JwkKeyTypeFromJSON,
133
+ JwkKeyTypeFromJSONTyped: () => JwkKeyTypeFromJSONTyped,
134
+ JwkKeyTypeToJSON: () => JwkKeyTypeToJSON,
135
+ JwkKeyTypeToJSONTyped: () => JwkKeyTypeToJSONTyped,
136
+ JwkToJSON: () => JwkToJSON,
137
+ JwkToJSONTyped: () => JwkToJSONTyped,
138
+ JwkUse: () => JwkUse,
139
+ JwkUseFromJSON: () => JwkUseFromJSON,
140
+ JwkUseFromJSONTyped: () => JwkUseFromJSONTyped,
141
+ JwkUseToJSON: () => JwkUseToJSON,
142
+ JwkUseToJSONTyped: () => JwkUseToJSONTyped,
143
+ KeyEncoding: () => KeyEncoding,
144
+ KeyEncodingFromJSON: () => KeyEncodingFromJSON,
145
+ KeyEncodingFromJSONTyped: () => KeyEncodingFromJSONTyped,
146
+ KeyEncodingToJSON: () => KeyEncodingToJSON,
147
+ KeyEncodingToJSONTyped: () => KeyEncodingToJSONTyped,
148
+ KeyInfoFromJSON: () => KeyInfoFromJSON,
149
+ KeyInfoFromJSONTyped: () => KeyInfoFromJSONTyped,
150
+ KeyInfoToJSON: () => KeyInfoToJSON,
151
+ KeyInfoToJSONTyped: () => KeyInfoToJSONTyped,
152
+ KeyOperations: () => KeyOperations,
153
+ KeyOperationsFromJSON: () => KeyOperationsFromJSON,
154
+ KeyOperationsFromJSONTyped: () => KeyOperationsFromJSONTyped,
155
+ KeyOperationsToJSON: () => KeyOperationsToJSON,
156
+ KeyOperationsToJSONTyped: () => KeyOperationsToJSONTyped,
157
+ KeyProviderFromJSON: () => KeyProviderFromJSON,
158
+ KeyProviderFromJSONTyped: () => KeyProviderFromJSONTyped,
159
+ KeyProviderResponseFromJSON: () => KeyProviderResponseFromJSON,
160
+ KeyProviderResponseFromJSONTyped: () => KeyProviderResponseFromJSONTyped,
161
+ KeyProviderResponseToJSON: () => KeyProviderResponseToJSON,
162
+ KeyProviderResponseToJSONTyped: () => KeyProviderResponseToJSONTyped,
163
+ KeyProviderToJSON: () => KeyProviderToJSON,
164
+ KeyProviderToJSONTyped: () => KeyProviderToJSONTyped,
165
+ KeyProviderType: () => KeyProviderType,
166
+ KeyProviderTypeFromJSON: () => KeyProviderTypeFromJSON,
167
+ KeyProviderTypeFromJSONTyped: () => KeyProviderTypeFromJSONTyped,
168
+ KeyProviderTypeToJSON: () => KeyProviderTypeToJSON,
169
+ KeyProviderTypeToJSONTyped: () => KeyProviderTypeToJSONTyped,
170
+ KeyResolverFromJSON: () => KeyResolverFromJSON,
171
+ KeyResolverFromJSONTyped: () => KeyResolverFromJSONTyped,
172
+ KeyResolverToJSON: () => KeyResolverToJSON,
173
+ KeyResolverToJSONTyped: () => KeyResolverToJSONTyped,
174
+ KeyType: () => KeyType,
175
+ KeyTypeFromJSON: () => KeyTypeFromJSON,
176
+ KeyTypeFromJSONTyped: () => KeyTypeFromJSONTyped,
177
+ KeyTypeToJSON: () => KeyTypeToJSON,
178
+ KeyTypeToJSONTyped: () => KeyTypeToJSONTyped,
179
+ KeyVisibility: () => KeyVisibility,
180
+ KeyVisibilityFromJSON: () => KeyVisibilityFromJSON,
181
+ KeyVisibilityFromJSONTyped: () => KeyVisibilityFromJSONTyped,
182
+ KeyVisibilityToJSON: () => KeyVisibilityToJSON,
183
+ KeyVisibilityToJSONTyped: () => KeyVisibilityToJSONTyped,
184
+ KmsRestClient: () => KmsRestClient,
185
+ ListKeyProvidersResponseFromJSON: () => ListKeyProvidersResponseFromJSON,
186
+ ListKeyProvidersResponseFromJSONTyped: () => ListKeyProvidersResponseFromJSONTyped,
187
+ ListKeyProvidersResponseToJSON: () => ListKeyProvidersResponseToJSON,
188
+ ListKeyProvidersResponseToJSONTyped: () => ListKeyProvidersResponseToJSONTyped,
189
+ ListKeysResponseFromJSON: () => ListKeysResponseFromJSON,
190
+ ListKeysResponseFromJSONTyped: () => ListKeysResponseFromJSONTyped,
191
+ ListKeysResponseToJSON: () => ListKeysResponseToJSON,
192
+ ListKeysResponseToJSONTyped: () => ListKeysResponseToJSONTyped,
193
+ ListResolversResponseFromJSON: () => ListResolversResponseFromJSON,
194
+ ListResolversResponseFromJSONTyped: () => ListResolversResponseFromJSONTyped,
195
+ ListResolversResponseToJSON: () => ListResolversResponseToJSON,
196
+ ListResolversResponseToJSONTyped: () => ListResolversResponseToJSONTyped,
197
+ LookupMode: () => LookupMode,
198
+ LookupModeFromJSON: () => LookupModeFromJSON,
199
+ LookupModeFromJSONTyped: () => LookupModeFromJSONTyped,
200
+ LookupModeToJSON: () => LookupModeToJSON,
201
+ LookupModeToJSONTyped: () => LookupModeToJSONTyped,
202
+ ManagedKeyInfoFromJSON: () => ManagedKeyInfoFromJSON,
203
+ ManagedKeyInfoFromJSONTyped: () => ManagedKeyInfoFromJSONTyped,
204
+ ManagedKeyInfoToJSON: () => ManagedKeyInfoToJSON,
205
+ ManagedKeyInfoToJSONTyped: () => ManagedKeyInfoToJSONTyped,
206
+ ManagedKeyPairFromJSON: () => ManagedKeyPairFromJSON,
207
+ ManagedKeyPairFromJSONTyped: () => ManagedKeyPairFromJSONTyped,
208
+ ManagedKeyPairToJSON: () => ManagedKeyPairToJSON,
209
+ ManagedKeyPairToJSONTyped: () => ManagedKeyPairToJSONTyped,
210
+ MaskGenFunction: () => MaskGenFunction,
211
+ MaskGenFunctionFromJSON: () => MaskGenFunctionFromJSON,
212
+ MaskGenFunctionFromJSONTyped: () => MaskGenFunctionFromJSONTyped,
213
+ MaskGenFunctionToJSON: () => MaskGenFunctionToJSON,
214
+ MaskGenFunctionToJSONTyped: () => MaskGenFunctionToJSONTyped,
215
+ ProviderCapabilitiesFromJSON: () => ProviderCapabilitiesFromJSON,
216
+ ProviderCapabilitiesFromJSONTyped: () => ProviderCapabilitiesFromJSONTyped,
217
+ ProviderCapabilitiesToJSON: () => ProviderCapabilitiesToJSON,
218
+ ProviderCapabilitiesToJSONTyped: () => ProviderCapabilitiesToJSONTyped,
219
+ ResolvePublicKeyFromJSON: () => ResolvePublicKeyFromJSON,
220
+ ResolvePublicKeyFromJSONTyped: () => ResolvePublicKeyFromJSONTyped,
221
+ ResolvePublicKeyToJSON: () => ResolvePublicKeyToJSON,
222
+ ResolvePublicKeyToJSONTyped: () => ResolvePublicKeyToJSONTyped,
223
+ ResolvedKeyInfoFromJSON: () => ResolvedKeyInfoFromJSON,
224
+ ResolvedKeyInfoFromJSONTyped: () => ResolvedKeyInfoFromJSONTyped,
225
+ ResolvedKeyInfoToJSON: () => ResolvedKeyInfoToJSON,
226
+ ResolvedKeyInfoToJSONTyped: () => ResolvedKeyInfoToJSONTyped,
227
+ ResolverFromJSON: () => ResolverFromJSON,
228
+ ResolverFromJSONTyped: () => ResolverFromJSONTyped,
229
+ ResolverToJSON: () => ResolverToJSON,
230
+ ResolverToJSONTyped: () => ResolverToJSONTyped,
231
+ SignInputFromJSON: () => SignInputFromJSON,
232
+ SignInputFromJSONTyped: () => SignInputFromJSONTyped,
233
+ SignInputModeEnum: () => SignInputModeEnum,
234
+ SignInputToJSON: () => SignInputToJSON,
235
+ SignInputToJSONTyped: () => SignInputToJSONTyped,
236
+ SignOutputFromJSON: () => SignOutputFromJSON,
237
+ SignOutputFromJSONTyped: () => SignOutputFromJSONTyped,
238
+ SignOutputToJSON: () => SignOutputToJSON,
239
+ SignOutputToJSONTyped: () => SignOutputToJSONTyped,
240
+ SignatureAlgorithm: () => SignatureAlgorithm,
241
+ SignatureAlgorithmFromJSON: () => SignatureAlgorithmFromJSON,
242
+ SignatureAlgorithmFromJSONTyped: () => SignatureAlgorithmFromJSONTyped,
243
+ SignatureAlgorithmToJSON: () => SignatureAlgorithmToJSON,
244
+ SignatureAlgorithmToJSONTyped: () => SignatureAlgorithmToJSONTyped,
245
+ SignatureFromJSON: () => SignatureFromJSON,
246
+ SignatureFromJSONTyped: () => SignatureFromJSONTyped,
247
+ SignatureToJSON: () => SignatureToJSON,
248
+ SignatureToJSONTyped: () => SignatureToJSONTyped,
249
+ StoreKeyFromJSON: () => StoreKeyFromJSON,
250
+ StoreKeyFromJSONTyped: () => StoreKeyFromJSONTyped,
251
+ StoreKeyResponseFromJSON: () => StoreKeyResponseFromJSON,
252
+ StoreKeyResponseFromJSONTyped: () => StoreKeyResponseFromJSONTyped,
253
+ StoreKeyResponseToJSON: () => StoreKeyResponseToJSON,
254
+ StoreKeyResponseToJSONTyped: () => StoreKeyResponseToJSONTyped,
255
+ StoreKeyToJSON: () => StoreKeyToJSON,
256
+ StoreKeyToJSONTyped: () => StoreKeyToJSONTyped,
257
+ UpdateKeyProviderFromJSON: () => UpdateKeyProviderFromJSON,
258
+ UpdateKeyProviderFromJSONTyped: () => UpdateKeyProviderFromJSONTyped,
259
+ UpdateKeyProviderToJSON: () => UpdateKeyProviderToJSON,
260
+ UpdateKeyProviderToJSONTyped: () => UpdateKeyProviderToJSONTyped,
261
+ VerifyRawSignatureFromJSON: () => VerifyRawSignatureFromJSON,
262
+ VerifyRawSignatureFromJSONTyped: () => VerifyRawSignatureFromJSONTyped,
263
+ VerifyRawSignatureResponseFromJSON: () => VerifyRawSignatureResponseFromJSON,
264
+ VerifyRawSignatureResponseFromJSONTyped: () => VerifyRawSignatureResponseFromJSONTyped,
265
+ VerifyRawSignatureResponseToJSON: () => VerifyRawSignatureResponseToJSON,
266
+ VerifyRawSignatureResponseToJSONTyped: () => VerifyRawSignatureResponseToJSONTyped,
267
+ VerifyRawSignatureToJSON: () => VerifyRawSignatureToJSON,
268
+ VerifyRawSignatureToJSONTyped: () => VerifyRawSignatureToJSONTyped,
269
+ VerifySimpleSignatureFromJSON: () => VerifySimpleSignatureFromJSON,
270
+ VerifySimpleSignatureFromJSONTyped: () => VerifySimpleSignatureFromJSONTyped,
271
+ VerifySimpleSignatureToJSON: () => VerifySimpleSignatureToJSON,
272
+ VerifySimpleSignatureToJSONTyped: () => VerifySimpleSignatureToJSONTyped,
273
+ instanceOfAwsAssumeRoleCredentials: () => instanceOfAwsAssumeRoleCredentials,
274
+ instanceOfAwsClientConfiguration: () => instanceOfAwsClientConfiguration,
275
+ instanceOfAwsKmsSetting: () => instanceOfAwsKmsSetting,
276
+ instanceOfAwsStaticCredentials: () => instanceOfAwsStaticCredentials,
277
+ instanceOfAwsWebIdentityTokenCredentials: () => instanceOfAwsWebIdentityTokenCredentials,
278
+ instanceOfAzureClientSecretCredentialOpts: () => instanceOfAzureClientSecretCredentialOpts,
279
+ instanceOfAzureCredentialOpts: () => instanceOfAzureCredentialOpts,
280
+ instanceOfAzureKeyVaultSetting: () => instanceOfAzureKeyVaultSetting,
281
+ instanceOfCoseKey: () => instanceOfCoseKey,
282
+ instanceOfCoseKeyPair: () => instanceOfCoseKeyPair,
283
+ instanceOfCoseKeyType: () => instanceOfCoseKeyType,
284
+ instanceOfCreateKeyProvider: () => instanceOfCreateKeyProvider,
285
+ instanceOfCreateRawSignature: () => instanceOfCreateRawSignature,
286
+ instanceOfCreateRawSignatureResponse: () => instanceOfCreateRawSignatureResponse,
287
+ instanceOfCreateSimpleSignature: () => instanceOfCreateSimpleSignature,
288
+ instanceOfCryptoAlg: () => instanceOfCryptoAlg,
289
+ instanceOfCurve: () => instanceOfCurve,
290
+ instanceOfDigestAlg: () => instanceOfDigestAlg,
291
+ instanceOfErrorResponse: () => instanceOfErrorResponse,
292
+ instanceOfGenerateKey: () => instanceOfGenerateKey,
293
+ instanceOfGenerateKeyGlobal: () => instanceOfGenerateKeyGlobal,
294
+ instanceOfGenerateKeyResponse: () => instanceOfGenerateKeyResponse,
295
+ instanceOfGetKeyResponse: () => instanceOfGetKeyResponse,
296
+ instanceOfIdentifierMethod: () => instanceOfIdentifierMethod,
297
+ instanceOfJoseKeyPair: () => instanceOfJoseKeyPair,
298
+ instanceOfJwk: () => instanceOfJwk,
299
+ instanceOfJwkKeyType: () => instanceOfJwkKeyType,
300
+ instanceOfJwkUse: () => instanceOfJwkUse,
301
+ instanceOfKeyEncoding: () => instanceOfKeyEncoding,
302
+ instanceOfKeyInfo: () => instanceOfKeyInfo,
303
+ instanceOfKeyOperations: () => instanceOfKeyOperations,
304
+ instanceOfKeyProvider: () => instanceOfKeyProvider,
305
+ instanceOfKeyProviderResponse: () => instanceOfKeyProviderResponse,
306
+ instanceOfKeyProviderType: () => instanceOfKeyProviderType,
307
+ instanceOfKeyResolver: () => instanceOfKeyResolver,
308
+ instanceOfKeyType: () => instanceOfKeyType,
309
+ instanceOfKeyVisibility: () => instanceOfKeyVisibility,
310
+ instanceOfListKeyProvidersResponse: () => instanceOfListKeyProvidersResponse,
311
+ instanceOfListKeysResponse: () => instanceOfListKeysResponse,
312
+ instanceOfListResolversResponse: () => instanceOfListResolversResponse,
313
+ instanceOfLookupMode: () => instanceOfLookupMode,
314
+ instanceOfManagedKeyInfo: () => instanceOfManagedKeyInfo,
315
+ instanceOfManagedKeyPair: () => instanceOfManagedKeyPair,
316
+ instanceOfMaskGenFunction: () => instanceOfMaskGenFunction,
317
+ instanceOfProviderCapabilities: () => instanceOfProviderCapabilities,
318
+ instanceOfResolvePublicKey: () => instanceOfResolvePublicKey,
319
+ instanceOfResolvedKeyInfo: () => instanceOfResolvedKeyInfo,
320
+ instanceOfResolver: () => instanceOfResolver,
321
+ instanceOfSignInput: () => instanceOfSignInput,
322
+ instanceOfSignOutput: () => instanceOfSignOutput,
323
+ instanceOfSignature: () => instanceOfSignature,
324
+ instanceOfSignatureAlgorithm: () => instanceOfSignatureAlgorithm,
325
+ instanceOfStoreKey: () => instanceOfStoreKey,
326
+ instanceOfStoreKeyResponse: () => instanceOfStoreKeyResponse,
327
+ instanceOfUpdateKeyProvider: () => instanceOfUpdateKeyProvider,
328
+ instanceOfVerifyRawSignature: () => instanceOfVerifyRawSignature,
329
+ instanceOfVerifyRawSignatureResponse: () => instanceOfVerifyRawSignatureResponse,
330
+ instanceOfVerifySimpleSignature: () => instanceOfVerifySimpleSignature,
331
+ schema: () => plugin_schema_default
332
+ });
333
+ module.exports = __toCommonJS(index_exports);
334
+
335
+ // plugin.schema.json
336
+ var plugin_schema_default = {
337
+ IKmsRestClient: {
338
+ components: {
339
+ schemas: {
340
+ KmsCreateRawSignatureArgs: {
341
+ type: "object",
342
+ additionalProperties: false,
343
+ properties: {
344
+ keyInfo: {
345
+ $ref: "#/components/schemas/KeyInfo"
346
+ },
347
+ input: {
348
+ type: "string"
349
+ },
350
+ baseUrl: {
351
+ type: "string"
352
+ }
353
+ },
354
+ required: ["input", "keyInfo"]
355
+ },
356
+ KeyInfo: {
357
+ type: "object",
358
+ properties: {
359
+ kid: {
360
+ type: "string",
361
+ description: "Unique identifier for the cryptographic key. Can be null if the key identifier is not provided."
362
+ },
363
+ key: {
364
+ $ref: "#/components/schemas/Jwk"
365
+ },
366
+ signatureAlgorithm: {
367
+ $ref: "#/components/schemas/SignatureAlgorithm"
368
+ },
369
+ keyVisibility: {
370
+ $ref: "#/components/schemas/KeyVisibility"
371
+ },
372
+ x5c: {
373
+ type: "array",
374
+ items: {
375
+ type: "string"
376
+ },
377
+ description: "X.509 certificate chain associated with the key."
378
+ },
379
+ alias: {
380
+ type: "string",
381
+ description: "A reference or alias to the key in the Key Management Service (KMS)."
382
+ },
383
+ providerId: {
384
+ type: "string",
385
+ description: "The Key Management System (KMS) identifier associated with the key."
386
+ },
387
+ keyType: {
388
+ $ref: "#/components/schemas/KeyType"
389
+ },
390
+ keyEncoding: {
391
+ $ref: "#/components/schemas/KeyEncoding"
392
+ },
393
+ opts: {
394
+ type: "object",
395
+ additionalProperties: {
396
+ type: "string"
397
+ },
398
+ description: "Additional configuration options as key-value pairs."
399
+ }
400
+ },
401
+ additionalProperties: false,
402
+ description: "Information about a cryptographic key, providing metadata and configuration details necessary for cryptographic operations."
403
+ },
404
+ Jwk: {
405
+ type: "object",
406
+ properties: {
407
+ kty: {
408
+ $ref: "#/components/schemas/JwkKeyType"
409
+ },
410
+ kid: {
411
+ type: "string",
412
+ description: "Key identifier used to uniquely identify the key."
413
+ },
414
+ alg: {
415
+ type: "string",
416
+ description: "The algorithm intended for use with the key (JWA algorithm name)."
417
+ },
418
+ use: {
419
+ $ref: "#/components/schemas/JwkUse"
420
+ },
421
+ keyOps: {
422
+ type: "array",
423
+ items: {
424
+ $ref: "#/components/schemas/KeyOperations"
425
+ },
426
+ description: "The allowed cryptographic operations for the key."
427
+ },
428
+ crv: {
429
+ $ref: "#/components/schemas/Curve"
430
+ },
431
+ x: {
432
+ type: "string",
433
+ description: "The x coordinate for elliptic curve keys (base64url-encoded)."
434
+ },
435
+ y: {
436
+ type: "string",
437
+ description: "The y coordinate for elliptic curve keys (base64url-encoded)."
438
+ },
439
+ d: {
440
+ type: "string",
441
+ description: "The private key parameter (base64url-encoded)."
442
+ },
443
+ n: {
444
+ type: "string",
445
+ description: "The modulus value for RSA keys (base64url-encoded)."
446
+ },
447
+ e: {
448
+ type: "string",
449
+ description: "The public exponent for RSA keys (base64url-encoded)."
450
+ },
451
+ p: {
452
+ type: "string",
453
+ description: "The first prime factor for RSA private keys (base64url-encoded)."
454
+ },
455
+ q: {
456
+ type: "string",
457
+ description: "The second prime factor for RSA private keys (base64url-encoded)."
458
+ },
459
+ dp: {
460
+ type: "string",
461
+ description: "The first factor CRT exponent for RSA private keys (base64url-encoded)."
462
+ },
463
+ dq: {
464
+ type: "string",
465
+ description: "The second factor CRT exponent for RSA private keys (base64url-encoded)."
466
+ },
467
+ qi: {
468
+ type: "string",
469
+ description: "The first CRT coefficient for RSA private keys (base64url-encoded)."
470
+ },
471
+ k: {
472
+ type: "string",
473
+ description: "The symmetric key value (base64url-encoded)."
474
+ },
475
+ x5c: {
476
+ type: "array",
477
+ items: {
478
+ type: "string"
479
+ },
480
+ description: "X.509 certificate chain as base64-encoded DER certificates."
481
+ },
482
+ x5t: {
483
+ type: "string",
484
+ description: "X.509 certificate SHA-1 thumbprint (base64url-encoded)."
485
+ },
486
+ x5u: {
487
+ type: "string",
488
+ description: "URL pointing to X.509 certificate or certificate chain."
489
+ },
490
+ x5tS256: {
491
+ type: "string",
492
+ description: "X.509 certificate SHA-256 thumbprint (base64url-encoded)."
493
+ }
494
+ },
495
+ required: ["kty"],
496
+ additionalProperties: false,
497
+ description: "Represents a JSON Web Key (JWK) as defined by the JSON Web Key specification."
498
+ },
499
+ JwkKeyType: {
500
+ type: "string",
501
+ enum: ["EC", "RSA", "OKP", "oct"],
502
+ description: "JSON Web Key (JWK) key type parameter identifying the cryptographic algorithm family."
503
+ },
504
+ JwkUse: {
505
+ type: "string",
506
+ enum: ["sig", "enc"],
507
+ description: "Intended use of the key (signing or encryption)."
508
+ },
509
+ KeyOperations: {
510
+ type: "string",
511
+ enum: ["sign", "verify", "encrypt", "decrypt", "wrapKey", "unwrapKey", "deriveKey", "deriveBits"],
512
+ description: "Specific operations the key is intended for."
513
+ },
514
+ Curve: {
515
+ type: "string",
516
+ enum: ["P-256", "P-384", "P-521", "secp256k1", "Ed25519", "Ed448", "X25519", "X448"],
517
+ description: "Elliptic curve identifier."
518
+ },
519
+ SignatureAlgorithm: {
520
+ type: "string",
521
+ enum: [
522
+ "ED25519",
523
+ "ECDSA_SHA256",
524
+ "ECDSA_SHA384",
525
+ "ECDSA_SHA512",
526
+ "ES256K",
527
+ "ECKA_DH_SHA256",
528
+ "HMAC_SHA256",
529
+ "HMAC_SHA384",
530
+ "HMAC_SHA512",
531
+ "RSA_SSA_PSS_SHA256_MGF1",
532
+ "RSA_SSA_PSS_SHA384_MGF1",
533
+ "RSA_SSA_PSS_SHA512_MGF1"
534
+ ],
535
+ description: "Cryptographic signature algorithm identifier."
536
+ },
537
+ KeyVisibility: {
538
+ type: "string",
539
+ enum: ["PUBLIC", "PRIVATE"],
540
+ description: "Indicates the visibility status of a cryptographic key."
541
+ },
542
+ KeyType: {
543
+ type: "string",
544
+ enum: ["OKP", "EC", "RSA"],
545
+ description: "Cryptographic key type identifier."
546
+ },
547
+ KeyEncoding: {
548
+ type: "string",
549
+ enum: ["COSE", "JOSE"],
550
+ description: "The encoding format of the cryptographic key."
551
+ },
552
+ CreateRawSignatureResponse: {
553
+ type: "object",
554
+ properties: {
555
+ signature: {
556
+ type: "string",
557
+ description: "The created signature encoded as a base64 string."
558
+ }
559
+ },
560
+ required: ["signature"],
561
+ additionalProperties: false,
562
+ description: "Response body containing the created signature."
563
+ },
564
+ KmsDeleteKeyArgs: {
565
+ type: "object",
566
+ properties: {
567
+ baseUrl: {
568
+ type: "string"
569
+ },
570
+ aliasOrKid: {
571
+ type: "string"
572
+ }
573
+ },
574
+ additionalProperties: false
575
+ },
576
+ KmsGenerateKeyArgs: {
577
+ type: "object",
578
+ additionalProperties: false,
579
+ properties: {
580
+ alias: {
581
+ type: "string",
582
+ description: "Alias for the generated key."
583
+ },
584
+ use: {
585
+ $ref: "#/components/schemas/JwkUse"
586
+ },
587
+ keyOperations: {
588
+ type: "array",
589
+ items: {
590
+ $ref: "#/components/schemas/KeyOperations"
591
+ }
592
+ },
593
+ alg: {
594
+ $ref: "#/components/schemas/SignatureAlgorithm"
595
+ },
596
+ providerId: {
597
+ type: "string",
598
+ description: "Optional provider ID. If not specified, the default provider will be used."
599
+ },
600
+ baseUrl: {
601
+ type: "string"
602
+ }
603
+ }
604
+ },
605
+ ManagedKeyPair: {
606
+ type: "object",
607
+ properties: {
608
+ kid: {
609
+ type: "string",
610
+ description: "Key identifier, may be null."
611
+ },
612
+ providerId: {
613
+ type: "string",
614
+ description: "Key Management System identifier."
615
+ },
616
+ alias: {
617
+ type: "string",
618
+ description: "Reference to the key in the KMS."
619
+ },
620
+ cose: {
621
+ $ref: "#/components/schemas/CoseKeyPair"
622
+ },
623
+ jose: {
624
+ $ref: "#/components/schemas/JoseKeyPair"
625
+ }
626
+ },
627
+ required: ["providerId", "alias", "cose", "jose"],
628
+ additionalProperties: false,
629
+ description: "Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs."
630
+ },
631
+ CoseKeyPair: {
632
+ type: "object",
633
+ properties: {
634
+ privateCoseKey: {
635
+ $ref: "#/components/schemas/CoseKey"
636
+ },
637
+ publicCoseKey: {
638
+ $ref: "#/components/schemas/CoseKey"
639
+ }
640
+ },
641
+ required: ["publicCoseKey"],
642
+ additionalProperties: false,
643
+ description: "Represents a cryptographic key pair for COSE (CBOR Object Signing and Encryption) operations."
644
+ },
645
+ CoseKey: {
646
+ type: "object",
647
+ properties: {
648
+ kty: {
649
+ $ref: "#/components/schemas/CoseKeyType"
650
+ },
651
+ kid: {
652
+ type: "string",
653
+ description: "Key identifier (base64url-encoded byte string)."
654
+ },
655
+ alg: {
656
+ type: "number",
657
+ description: "The COSE algorithm identifier (e.g., -7=ES256, -35=ES384, -36=ES512, -8=EdDSA)."
658
+ },
659
+ keyOps: {
660
+ type: "array",
661
+ items: {
662
+ type: "number"
663
+ },
664
+ description: "The allowed COSE key operations (1=sign, 2=verify, 3=encrypt, 4=decrypt, etc.)."
665
+ },
666
+ baseIV: {
667
+ type: "string",
668
+ description: "Base initialization vector (base64url-encoded)."
669
+ },
670
+ crv: {
671
+ type: "number",
672
+ description: "The COSE curve identifier (1=P-256, 2=P-384, 3=P-521, 8=secp256k1, 6=Ed25519, etc.)."
673
+ },
674
+ x: {
675
+ type: "string",
676
+ description: "The x coordinate (base64url-encoded byte string)."
677
+ },
678
+ y: {
679
+ type: "string",
680
+ description: "The y coordinate (base64url-encoded byte string)."
681
+ },
682
+ d: {
683
+ type: "string",
684
+ description: "The private key parameter (base64url-encoded byte string)."
685
+ },
686
+ x5chain: {
687
+ type: "array",
688
+ items: {
689
+ type: "string"
690
+ },
691
+ description: "X.509 certificate chain as base64-encoded certificates."
692
+ }
693
+ },
694
+ required: ["kty"],
695
+ additionalProperties: false,
696
+ description: "Represents a COSE (CBOR Object Signing and Encryption) key in JSON format."
697
+ },
698
+ CoseKeyType: {
699
+ type: "number",
700
+ enum: [1, 2, 3, 4],
701
+ description: "COSE key type parameter. 1=OKP (Octet Key Pair), 2=EC2 (Elliptic Curve), 3=RSA, 4=Symmetric."
702
+ },
703
+ JoseKeyPair: {
704
+ type: "object",
705
+ properties: {
706
+ privateJwk: {
707
+ $ref: "#/components/schemas/Jwk"
708
+ },
709
+ publicJwk: {
710
+ $ref: "#/components/schemas/Jwk"
711
+ }
712
+ },
713
+ required: ["publicJwk"],
714
+ additionalProperties: false,
715
+ description: "Data class representing a cryptographic key pair used with JOSE (JSON Object Signing and Encryption)."
716
+ },
717
+ KmsGetKeyArgs: {
718
+ type: "object",
719
+ properties: {
720
+ baseUrl: {
721
+ type: "string"
722
+ },
723
+ aliasOrKid: {
724
+ type: "string"
725
+ }
726
+ },
727
+ required: ["aliasOrKid"],
728
+ additionalProperties: false
729
+ },
730
+ ManagedKeyInfo: {
731
+ type: "object",
732
+ properties: {
733
+ kid: {
734
+ type: "string",
735
+ description: "Unique identifier for the cryptographic key. Can be null if the key identifier is not provided."
736
+ },
737
+ key: {
738
+ $ref: "#/components/schemas/Jwk"
739
+ },
740
+ signatureAlgorithm: {
741
+ $ref: "#/components/schemas/SignatureAlgorithm"
742
+ },
743
+ keyVisibility: {
744
+ $ref: "#/components/schemas/KeyVisibility"
745
+ },
746
+ x5c: {
747
+ type: "array",
748
+ items: {
749
+ type: "string"
750
+ },
751
+ description: "X.509 certificate chain associated with the key."
752
+ },
753
+ alias: {
754
+ type: "string",
755
+ description: "A reference or alias to the key in the Key Management Service (KMS)."
756
+ },
757
+ providerId: {
758
+ type: "string",
759
+ description: "The Key Management System (KMS) identifier associated with the key."
760
+ },
761
+ keyType: {
762
+ $ref: "#/components/schemas/KeyType"
763
+ },
764
+ keyEncoding: {
765
+ $ref: "#/components/schemas/KeyEncoding"
766
+ },
767
+ opts: {
768
+ type: "object",
769
+ additionalProperties: {
770
+ type: "string"
771
+ },
772
+ description: "Additional configuration options as key-value pairs."
773
+ }
774
+ },
775
+ required: ["key", "alias", "providerId"],
776
+ additionalProperties: false,
777
+ description: "Represents a managed cryptographic key information that is guaranteed to be present and resolved, part of a KMS providing concrete access to the key."
778
+ },
779
+ KmsGetKeyProviderArgs: {
780
+ type: "object",
781
+ properties: {
782
+ baseUrl: {
783
+ type: "string"
784
+ },
785
+ providerId: {
786
+ type: "string"
787
+ }
788
+ },
789
+ additionalProperties: false
790
+ },
791
+ KeyProviderResponse: {
792
+ type: "object",
793
+ properties: {
794
+ providerId: {
795
+ type: "string",
796
+ description: "The unique identifier assigned to the Key Provider instance upon creation."
797
+ },
798
+ type: {
799
+ $ref: "#/components/schemas/KeyProviderType"
800
+ }
801
+ },
802
+ required: ["providerId", "type"],
803
+ additionalProperties: false,
804
+ description: "Response body containing the details of a Key Provider instance."
805
+ },
806
+ KeyProviderType: {
807
+ type: "string",
808
+ enum: ["SOFTWARE", "AZURE_KEYVAULT", "AWS_KMS"],
809
+ description: "The type of Key Provider. Determines the required configuration settings. - AZURE_KEYVAULT: Microsoft Azure Key Vault or Managed HSM. - AWS_KMS: Amazon Web Services Key Management Service."
810
+ },
811
+ kmsGetResolverArgs: {
812
+ type: "object",
813
+ properties: {
814
+ baseUrl: {
815
+ type: "string"
816
+ },
817
+ resolverId: {
818
+ type: "string"
819
+ }
820
+ },
821
+ required: ["resolverId"],
822
+ additionalProperties: false
823
+ },
824
+ Resolver: {
825
+ type: "object",
826
+ properties: {
827
+ resolverId: {
828
+ type: "string",
829
+ description: "Unique identifier for the resolver."
830
+ },
831
+ supportedIdentifierMethods: {
832
+ type: "array",
833
+ items: {
834
+ $ref: "#/components/schemas/IdentifierMethod"
835
+ },
836
+ description: "List of identifier methods supported by this resolver."
837
+ },
838
+ supportedKeyTypes: {
839
+ type: "array",
840
+ items: {
841
+ $ref: "#/components/schemas/KeyType"
842
+ },
843
+ description: "List of key types supported by this resolver."
844
+ }
845
+ },
846
+ required: ["resolverId"],
847
+ additionalProperties: false,
848
+ description: "Represents a key resolver configuration."
849
+ },
850
+ IdentifierMethod: {
851
+ type: "string",
852
+ enum: ["JWK", "KID", "COSE_KEY", "X5C", "DID"],
853
+ description: "Method used to identify cryptographic keys."
854
+ },
855
+ KmsIsValidRawSignatureArgs: {
856
+ type: "object",
857
+ additionalProperties: false,
858
+ properties: {
859
+ keyInfo: {
860
+ $ref: "#/components/schemas/KeyInfo"
861
+ },
862
+ input: {
863
+ type: "string"
864
+ },
865
+ signature: {
866
+ type: "string"
867
+ },
868
+ baseUrl: {
869
+ type: "string"
870
+ }
871
+ },
872
+ required: ["input", "keyInfo", "signature"]
873
+ },
874
+ VerifyRawSignatureResponse: {
875
+ type: "object",
876
+ properties: {
877
+ isValid: {
878
+ type: "boolean",
879
+ description: "Indicates whether the signature is valid or not."
880
+ }
881
+ },
882
+ required: ["isValid"],
883
+ additionalProperties: false,
884
+ description: "Response body containing the details of the signature verification."
885
+ },
886
+ KmsListKeyProvidersArgs: {
887
+ type: "object",
888
+ properties: {
889
+ baseUrl: {
890
+ type: "string"
891
+ }
892
+ },
893
+ additionalProperties: false
894
+ },
895
+ ListKeyProvidersResponse: {
896
+ type: "object",
897
+ properties: {
898
+ providers: {
899
+ type: "array",
900
+ items: {
901
+ $ref: "#/components/schemas/KeyProvider"
902
+ }
903
+ }
904
+ },
905
+ required: ["providers"],
906
+ additionalProperties: false,
907
+ description: "Response body containing the details of a Key Provider instance."
908
+ },
909
+ KeyProvider: {
910
+ type: "object",
911
+ properties: {
912
+ providerId: {
913
+ type: "string",
914
+ description: "The unique identifier assigned to the Key Provider instance upon creation."
915
+ },
916
+ type: {
917
+ $ref: "#/components/schemas/KeyProviderType"
918
+ }
919
+ },
920
+ required: ["providerId", "type"],
921
+ additionalProperties: false,
922
+ description: "Response body containing the details of a Key Provider instance."
923
+ },
924
+ KmsListKeysArgs: {
925
+ type: "object",
926
+ properties: {
927
+ baseUrl: {
928
+ type: "string"
929
+ },
930
+ providerId: {
931
+ type: "string"
932
+ }
933
+ },
934
+ additionalProperties: false
935
+ },
936
+ ListKeysResponse: {
937
+ type: "object",
938
+ properties: {
939
+ keyInfos: {
940
+ type: "array",
941
+ items: {
942
+ $ref: "#/components/schemas/ManagedKeyInfo"
943
+ }
944
+ }
945
+ },
946
+ required: ["keyInfos"],
947
+ additionalProperties: false,
948
+ description: "Response body containing all the managed keys."
949
+ },
950
+ KmsListResolversArgs: {
951
+ type: "object",
952
+ properties: {
953
+ baseUrl: {
954
+ type: "string"
955
+ }
956
+ },
957
+ additionalProperties: false
958
+ },
959
+ ListResolversResponse: {
960
+ type: "object",
961
+ properties: {
962
+ resolvers: {
963
+ type: "array",
964
+ items: {
965
+ $ref: "#/components/schemas/Resolver"
966
+ }
967
+ }
968
+ },
969
+ required: ["resolvers"],
970
+ additionalProperties: false,
971
+ description: "Response body containing all the resolvers."
972
+ },
973
+ KmsProviderDeleteKeyArgs: {
974
+ type: "object",
975
+ properties: {
976
+ baseUrl: {
977
+ type: "string"
978
+ },
979
+ providerId: {
980
+ type: "string"
981
+ },
982
+ aliasOrKid: {
983
+ type: "string"
984
+ }
985
+ },
986
+ required: ["providerId", "aliasOrKid"],
987
+ additionalProperties: false
988
+ },
989
+ KmsProviderGenerateKey: {
990
+ type: "object",
991
+ additionalProperties: false,
992
+ properties: {
993
+ alias: {
994
+ type: "string",
995
+ description: "Alias for the generated key."
996
+ },
997
+ use: {
998
+ $ref: "#/components/schemas/JwkUse"
999
+ },
1000
+ keyOperations: {
1001
+ type: "array",
1002
+ items: {
1003
+ $ref: "#/components/schemas/KeyOperations"
1004
+ }
1005
+ },
1006
+ alg: {
1007
+ $ref: "#/components/schemas/SignatureAlgorithm"
1008
+ },
1009
+ baseUrl: {
1010
+ type: "string"
1011
+ },
1012
+ providerId: {
1013
+ type: "string"
1014
+ }
1015
+ },
1016
+ required: ["providerId"]
1017
+ },
1018
+ KmsProviderGetKeyArgs: {
1019
+ type: "object",
1020
+ properties: {
1021
+ baseUrl: {
1022
+ type: "string"
1023
+ },
1024
+ providerId: {
1025
+ type: "string"
1026
+ },
1027
+ aliasOrKid: {
1028
+ type: "string"
1029
+ }
1030
+ },
1031
+ required: ["providerId", "aliasOrKid"],
1032
+ additionalProperties: false
1033
+ },
1034
+ KmsProviderListKeysArgs: {
1035
+ type: "object",
1036
+ properties: {
1037
+ baseUrl: {
1038
+ type: "string"
1039
+ },
1040
+ providerId: {
1041
+ type: "string"
1042
+ }
1043
+ },
1044
+ required: ["providerId"],
1045
+ additionalProperties: false
1046
+ },
1047
+ KmsProviderStoreKey: {
1048
+ type: "object",
1049
+ additionalProperties: false,
1050
+ properties: {
1051
+ keyInfo: {
1052
+ $ref: "#/components/schemas/ResolvedKeyInfo"
1053
+ },
1054
+ certChain: {
1055
+ type: "array",
1056
+ items: {
1057
+ type: "string"
1058
+ },
1059
+ description: "X.509 certificate chain as base64-encoded DER certificates."
1060
+ },
1061
+ baseUrl: {
1062
+ type: "string"
1063
+ },
1064
+ providerId: {
1065
+ type: "string"
1066
+ }
1067
+ },
1068
+ required: ["keyInfo", "providerId"]
1069
+ },
1070
+ ResolvedKeyInfo: {
1071
+ type: "object",
1072
+ properties: {
1073
+ kid: {
1074
+ type: "string",
1075
+ description: "Unique identifier for the cryptographic key. Can be null if the key identifier is not provided."
1076
+ },
1077
+ key: {
1078
+ $ref: "#/components/schemas/Jwk"
1079
+ },
1080
+ signatureAlgorithm: {
1081
+ $ref: "#/components/schemas/SignatureAlgorithm"
1082
+ },
1083
+ keyVisibility: {
1084
+ $ref: "#/components/schemas/KeyVisibility"
1085
+ },
1086
+ x5c: {
1087
+ type: "array",
1088
+ items: {
1089
+ type: "string"
1090
+ },
1091
+ description: "X.509 certificate chain associated with the key."
1092
+ },
1093
+ alias: {
1094
+ type: "string",
1095
+ description: "A reference or alias to the key in the Key Management Service (KMS)."
1096
+ },
1097
+ providerId: {
1098
+ type: "string",
1099
+ description: "The Key Management System (KMS) identifier associated with the key."
1100
+ },
1101
+ keyType: {
1102
+ $ref: "#/components/schemas/KeyType"
1103
+ },
1104
+ keyEncoding: {
1105
+ $ref: "#/components/schemas/KeyEncoding"
1106
+ },
1107
+ opts: {
1108
+ type: "object",
1109
+ additionalProperties: {
1110
+ type: "string"
1111
+ },
1112
+ description: "Additional configuration options as key-value pairs."
1113
+ }
1114
+ },
1115
+ required: ["key"],
1116
+ additionalProperties: false,
1117
+ description: "Represents a resolved cryptographic key information where the key is guaranteed to be present and resolved, providing concrete access to the key."
1118
+ },
1119
+ KmsResolveKeyArgs: {
1120
+ type: "object",
1121
+ additionalProperties: false,
1122
+ properties: {
1123
+ keyInfo: {
1124
+ $ref: "#/components/schemas/KeyInfo"
1125
+ },
1126
+ identifierMethod: {
1127
+ $ref: "#/components/schemas/IdentifierMethod"
1128
+ },
1129
+ trustedCerts: {
1130
+ type: "array",
1131
+ items: {
1132
+ type: "string"
1133
+ },
1134
+ description: "Optional array of trusted certificates (base64-encoded) that may be used in the resolution process."
1135
+ },
1136
+ verifyX509CertificateChain: {
1137
+ type: "boolean",
1138
+ description: "Optional boolean indicating whether the X.509 certificate chain should be verified."
1139
+ },
1140
+ baseUrl: {
1141
+ type: "string"
1142
+ },
1143
+ resolverId: {
1144
+ $ref: "#/components/schemas/String"
1145
+ }
1146
+ },
1147
+ required: ["keyInfo", "resolverId"]
1148
+ },
1149
+ String: {
1150
+ type: "object",
1151
+ properties: {
1152
+ length: {
1153
+ type: "number"
1154
+ }
1155
+ },
1156
+ required: ["length"],
1157
+ additionalProperties: {
1158
+ type: "string"
1159
+ }
1160
+ },
1161
+ KmsStoreKeyArgs: {
1162
+ type: "object",
1163
+ additionalProperties: false,
1164
+ properties: {
1165
+ keyInfo: {
1166
+ $ref: "#/components/schemas/ResolvedKeyInfo"
1167
+ },
1168
+ certChain: {
1169
+ type: "array",
1170
+ items: {
1171
+ type: "string"
1172
+ },
1173
+ description: "X.509 certificate chain as base64-encoded DER certificates."
1174
+ },
1175
+ baseUrl: {
1176
+ type: "string"
1177
+ }
1178
+ },
1179
+ required: ["keyInfo"]
1180
+ }
1181
+ },
1182
+ methods: {
1183
+ kmsCreateRawSignature: {
1184
+ description: "",
1185
+ arguments: {
1186
+ $ref: "#/components/schemas/KmsCreateRawSignatureArgs"
1187
+ },
1188
+ returnType: {
1189
+ $ref: "#/components/schemas/CreateRawSignatureResponse"
1190
+ }
1191
+ },
1192
+ kmsDeleteKey: {
1193
+ description: "",
1194
+ arguments: {
1195
+ $ref: "#/components/schemas/KmsDeleteKeyArgs"
1196
+ },
1197
+ returnType: {
1198
+ type: "boolean"
1199
+ }
1200
+ },
1201
+ kmsGenerateKey: {
1202
+ description: "",
1203
+ arguments: {
1204
+ $ref: "#/components/schemas/KmsGenerateKeyArgs"
1205
+ },
1206
+ returnType: {
1207
+ $ref: "#/components/schemas/ManagedKeyPair"
1208
+ }
1209
+ },
1210
+ kmsGetKey: {
1211
+ description: "",
1212
+ arguments: {
1213
+ $ref: "#/components/schemas/KmsGetKeyArgs"
1214
+ },
1215
+ returnType: {
1216
+ $ref: "#/components/schemas/ManagedKeyInfo"
1217
+ }
1218
+ },
1219
+ kmsGetKeyProvider: {
1220
+ description: "",
1221
+ arguments: {
1222
+ $ref: "#/components/schemas/KmsGetKeyProviderArgs"
1223
+ },
1224
+ returnType: {
1225
+ $ref: "#/components/schemas/KeyProviderResponse"
1226
+ }
1227
+ },
1228
+ kmsGetResolver: {
1229
+ description: "",
1230
+ arguments: {
1231
+ $ref: "#/components/schemas/kmsGetResolverArgs"
1232
+ },
1233
+ returnType: {
1234
+ $ref: "#/components/schemas/Resolver"
1235
+ }
1236
+ },
1237
+ kmsIsValidRawSignature: {
1238
+ description: "",
1239
+ arguments: {
1240
+ $ref: "#/components/schemas/KmsIsValidRawSignatureArgs"
1241
+ },
1242
+ returnType: {
1243
+ $ref: "#/components/schemas/VerifyRawSignatureResponse"
1244
+ }
1245
+ },
1246
+ kmsListKeyProviders: {
1247
+ description: "",
1248
+ arguments: {
1249
+ $ref: "#/components/schemas/KmsListKeyProvidersArgs"
1250
+ },
1251
+ returnType: {
1252
+ $ref: "#/components/schemas/ListKeyProvidersResponse"
1253
+ }
1254
+ },
1255
+ kmsListKeys: {
1256
+ description: "",
1257
+ arguments: {
1258
+ $ref: "#/components/schemas/KmsListKeysArgs"
1259
+ },
1260
+ returnType: {
1261
+ $ref: "#/components/schemas/ListKeysResponse"
1262
+ }
1263
+ },
1264
+ kmsListResolvers: {
1265
+ description: "",
1266
+ arguments: {
1267
+ $ref: "#/components/schemas/KmsListResolversArgs"
1268
+ },
1269
+ returnType: {
1270
+ $ref: "#/components/schemas/ListResolversResponse"
1271
+ }
1272
+ },
1273
+ kmsProviderDeleteKey: {
1274
+ description: "",
1275
+ arguments: {
1276
+ $ref: "#/components/schemas/KmsProviderDeleteKeyArgs"
1277
+ },
1278
+ returnType: {
1279
+ type: "boolean"
1280
+ }
1281
+ },
1282
+ kmsProviderGenerateKey: {
1283
+ description: "",
1284
+ arguments: {
1285
+ $ref: "#/components/schemas/KmsProviderGenerateKey"
1286
+ },
1287
+ returnType: {
1288
+ $ref: "#/components/schemas/ManagedKeyPair"
1289
+ }
1290
+ },
1291
+ kmsProviderGetKey: {
1292
+ description: "",
1293
+ arguments: {
1294
+ $ref: "#/components/schemas/KmsProviderGetKeyArgs"
1295
+ },
1296
+ returnType: {
1297
+ $ref: "#/components/schemas/ManagedKeyInfo"
1298
+ }
1299
+ },
1300
+ kmsProviderListKeys: {
1301
+ description: "",
1302
+ arguments: {
1303
+ $ref: "#/components/schemas/KmsProviderListKeysArgs"
1304
+ },
1305
+ returnType: {
1306
+ $ref: "#/components/schemas/ListKeysResponse"
1307
+ }
1308
+ },
1309
+ kmsProviderStoreKey: {
1310
+ description: "",
1311
+ arguments: {
1312
+ $ref: "#/components/schemas/KmsProviderStoreKey"
1313
+ },
1314
+ returnType: {
1315
+ $ref: "#/components/schemas/ManagedKeyInfo"
1316
+ }
1317
+ },
1318
+ kmsResolveKey: {
1319
+ description: "",
1320
+ arguments: {
1321
+ $ref: "#/components/schemas/KmsResolveKeyArgs"
1322
+ },
1323
+ returnType: {
1324
+ $ref: "#/components/schemas/ResolvedKeyInfo"
1325
+ }
1326
+ },
1327
+ kmsStoreKey: {
1328
+ description: "",
1329
+ arguments: {
1330
+ $ref: "#/components/schemas/KmsStoreKeyArgs"
1331
+ },
1332
+ returnType: {
1333
+ $ref: "#/components/schemas/ManagedKeyInfo"
1334
+ }
1335
+ }
1336
+ }
1337
+ }
1338
+ }
1339
+ };
1340
+
1341
+ // src/agent/KmsRestClient.ts
1342
+ var import_ssi_types = require("@sphereon/ssi-types");
1343
+ var import_cross_fetch = require("cross-fetch");
1344
+
1345
+ // src/models/LookupMode.ts
1346
+ var LookupMode = {
1347
+ Value: "VALUE",
1348
+ ConfigService: "CONFIG_SERVICE",
1349
+ SecretService: "SECRET_SERVICE"
1350
+ };
1351
+ function instanceOfLookupMode(value) {
1352
+ for (const key in LookupMode) {
1353
+ if (Object.prototype.hasOwnProperty.call(LookupMode, key)) {
1354
+ if (LookupMode[key] === value) {
1355
+ return true;
1356
+ }
1357
+ }
1358
+ }
1359
+ return false;
1360
+ }
1361
+ __name(instanceOfLookupMode, "instanceOfLookupMode");
1362
+ function LookupModeFromJSON(json) {
1363
+ return LookupModeFromJSONTyped(json, false);
1364
+ }
1365
+ __name(LookupModeFromJSON, "LookupModeFromJSON");
1366
+ function LookupModeFromJSONTyped(json, ignoreDiscriminator) {
1367
+ return json;
1368
+ }
1369
+ __name(LookupModeFromJSONTyped, "LookupModeFromJSONTyped");
1370
+ function LookupModeToJSON(value) {
1371
+ return value;
1372
+ }
1373
+ __name(LookupModeToJSON, "LookupModeToJSON");
1374
+ function LookupModeToJSONTyped(value, ignoreDiscriminator) {
1375
+ return value;
1376
+ }
1377
+ __name(LookupModeToJSONTyped, "LookupModeToJSONTyped");
1378
+
1379
+ // src/models/AwsAssumeRoleCredentials.ts
1380
+ function instanceOfAwsAssumeRoleCredentials(value) {
1381
+ if (!("roleArn" in value) || value["roleArn"] === void 0) return false;
1382
+ if (!("roleSessionName" in value) || value["roleSessionName"] === void 0) return false;
1383
+ return true;
1384
+ }
1385
+ __name(instanceOfAwsAssumeRoleCredentials, "instanceOfAwsAssumeRoleCredentials");
1386
+ function AwsAssumeRoleCredentialsFromJSON(json) {
1387
+ return AwsAssumeRoleCredentialsFromJSONTyped(json, false);
1388
+ }
1389
+ __name(AwsAssumeRoleCredentialsFromJSON, "AwsAssumeRoleCredentialsFromJSON");
1390
+ function AwsAssumeRoleCredentialsFromJSONTyped(json, ignoreDiscriminator) {
1391
+ if (json == null) {
1392
+ return json;
1393
+ }
1394
+ return {
1395
+ roleArn: json["roleArn"],
1396
+ roleSessionName: json["roleSessionName"],
1397
+ externalId: json["externalId"] == null ? void 0 : json["externalId"],
1398
+ lookupMode: json["lookupMode"] == null ? void 0 : LookupModeFromJSON(json["lookupMode"])
1399
+ };
1400
+ }
1401
+ __name(AwsAssumeRoleCredentialsFromJSONTyped, "AwsAssumeRoleCredentialsFromJSONTyped");
1402
+ function AwsAssumeRoleCredentialsToJSON(json) {
1403
+ return AwsAssumeRoleCredentialsToJSONTyped(json, false);
1404
+ }
1405
+ __name(AwsAssumeRoleCredentialsToJSON, "AwsAssumeRoleCredentialsToJSON");
1406
+ function AwsAssumeRoleCredentialsToJSONTyped(value, ignoreDiscriminator = false) {
1407
+ if (value == null) {
1408
+ return value;
1409
+ }
1410
+ return {
1411
+ roleArn: value["roleArn"],
1412
+ roleSessionName: value["roleSessionName"],
1413
+ externalId: value["externalId"],
1414
+ lookupMode: LookupModeToJSON(value["lookupMode"])
1415
+ };
1416
+ }
1417
+ __name(AwsAssumeRoleCredentialsToJSONTyped, "AwsAssumeRoleCredentialsToJSONTyped");
1418
+
1419
+ // src/models/AwsClientConfiguration.ts
1420
+ function instanceOfAwsClientConfiguration(value) {
1421
+ return true;
1422
+ }
1423
+ __name(instanceOfAwsClientConfiguration, "instanceOfAwsClientConfiguration");
1424
+ function AwsClientConfigurationFromJSON(json) {
1425
+ return AwsClientConfigurationFromJSONTyped(json, false);
1426
+ }
1427
+ __name(AwsClientConfigurationFromJSON, "AwsClientConfigurationFromJSON");
1428
+ function AwsClientConfigurationFromJSONTyped(json, ignoreDiscriminator) {
1429
+ if (json == null) {
1430
+ return json;
1431
+ }
1432
+ return {
1433
+ connectionTimeoutInMillis: json["connectionTimeoutInMillis"] == null ? void 0 : json["connectionTimeoutInMillis"],
1434
+ socketTimeoutInMillis: json["socketTimeoutInMillis"] == null ? void 0 : json["socketTimeoutInMillis"]
1435
+ };
1436
+ }
1437
+ __name(AwsClientConfigurationFromJSONTyped, "AwsClientConfigurationFromJSONTyped");
1438
+ function AwsClientConfigurationToJSON(json) {
1439
+ return AwsClientConfigurationToJSONTyped(json, false);
1440
+ }
1441
+ __name(AwsClientConfigurationToJSON, "AwsClientConfigurationToJSON");
1442
+ function AwsClientConfigurationToJSONTyped(value, ignoreDiscriminator = false) {
1443
+ if (value == null) {
1444
+ return value;
1445
+ }
1446
+ return {
1447
+ connectionTimeoutInMillis: value["connectionTimeoutInMillis"],
1448
+ socketTimeoutInMillis: value["socketTimeoutInMillis"]
1449
+ };
1450
+ }
1451
+ __name(AwsClientConfigurationToJSONTyped, "AwsClientConfigurationToJSONTyped");
1452
+
1453
+ // src/models/AwsStaticCredentials.ts
1454
+ function instanceOfAwsStaticCredentials(value) {
1455
+ if (!("accesskid" in value) || value["accesskid"] === void 0) return false;
1456
+ if (!("secretAccessKey" in value) || value["secretAccessKey"] === void 0) return false;
1457
+ return true;
1458
+ }
1459
+ __name(instanceOfAwsStaticCredentials, "instanceOfAwsStaticCredentials");
1460
+ function AwsStaticCredentialsFromJSON(json) {
1461
+ return AwsStaticCredentialsFromJSONTyped(json, false);
1462
+ }
1463
+ __name(AwsStaticCredentialsFromJSON, "AwsStaticCredentialsFromJSON");
1464
+ function AwsStaticCredentialsFromJSONTyped(json, ignoreDiscriminator) {
1465
+ if (json == null) {
1466
+ return json;
1467
+ }
1468
+ return {
1469
+ accesskid: json["accesskid"],
1470
+ secretAccessKey: json["secretAccessKey"],
1471
+ sessionToken: json["sessionToken"] == null ? void 0 : json["sessionToken"],
1472
+ lookupMode: json["lookupMode"] == null ? void 0 : LookupModeFromJSON(json["lookupMode"])
1473
+ };
1474
+ }
1475
+ __name(AwsStaticCredentialsFromJSONTyped, "AwsStaticCredentialsFromJSONTyped");
1476
+ function AwsStaticCredentialsToJSON(json) {
1477
+ return AwsStaticCredentialsToJSONTyped(json, false);
1478
+ }
1479
+ __name(AwsStaticCredentialsToJSON, "AwsStaticCredentialsToJSON");
1480
+ function AwsStaticCredentialsToJSONTyped(value, ignoreDiscriminator = false) {
1481
+ if (value == null) {
1482
+ return value;
1483
+ }
1484
+ return {
1485
+ accesskid: value["accesskid"],
1486
+ secretAccessKey: value["secretAccessKey"],
1487
+ sessionToken: value["sessionToken"],
1488
+ lookupMode: LookupModeToJSON(value["lookupMode"])
1489
+ };
1490
+ }
1491
+ __name(AwsStaticCredentialsToJSONTyped, "AwsStaticCredentialsToJSONTyped");
1492
+
1493
+ // src/models/AwsWebIdentityTokenCredentials.ts
1494
+ function instanceOfAwsWebIdentityTokenCredentials(value) {
1495
+ if (!("roleArn" in value) || value["roleArn"] === void 0) return false;
1496
+ if (!("roleSessionName" in value) || value["roleSessionName"] === void 0) return false;
1497
+ if (!("webIdentityToken" in value) || value["webIdentityToken"] === void 0) return false;
1498
+ return true;
1499
+ }
1500
+ __name(instanceOfAwsWebIdentityTokenCredentials, "instanceOfAwsWebIdentityTokenCredentials");
1501
+ function AwsWebIdentityTokenCredentialsFromJSON(json) {
1502
+ return AwsWebIdentityTokenCredentialsFromJSONTyped(json, false);
1503
+ }
1504
+ __name(AwsWebIdentityTokenCredentialsFromJSON, "AwsWebIdentityTokenCredentialsFromJSON");
1505
+ function AwsWebIdentityTokenCredentialsFromJSONTyped(json, ignoreDiscriminator) {
1506
+ if (json == null) {
1507
+ return json;
1508
+ }
1509
+ return {
1510
+ roleArn: json["roleArn"],
1511
+ roleSessionName: json["roleSessionName"],
1512
+ webIdentityToken: json["webIdentityToken"],
1513
+ lookupMode: json["lookupMode"] == null ? void 0 : LookupModeFromJSON(json["lookupMode"])
1514
+ };
1515
+ }
1516
+ __name(AwsWebIdentityTokenCredentialsFromJSONTyped, "AwsWebIdentityTokenCredentialsFromJSONTyped");
1517
+ function AwsWebIdentityTokenCredentialsToJSON(json) {
1518
+ return AwsWebIdentityTokenCredentialsToJSONTyped(json, false);
1519
+ }
1520
+ __name(AwsWebIdentityTokenCredentialsToJSON, "AwsWebIdentityTokenCredentialsToJSON");
1521
+ function AwsWebIdentityTokenCredentialsToJSONTyped(value, ignoreDiscriminator = false) {
1522
+ if (value == null) {
1523
+ return value;
1524
+ }
1525
+ return {
1526
+ roleArn: value["roleArn"],
1527
+ roleSessionName: value["roleSessionName"],
1528
+ webIdentityToken: value["webIdentityToken"],
1529
+ lookupMode: LookupModeToJSON(value["lookupMode"])
1530
+ };
1531
+ }
1532
+ __name(AwsWebIdentityTokenCredentialsToJSONTyped, "AwsWebIdentityTokenCredentialsToJSONTyped");
1533
+
1534
+ // src/models/AwsKmsSetting.ts
1535
+ function instanceOfAwsKmsSetting(value) {
1536
+ if (!("region" in value) || value["region"] === void 0) return false;
1537
+ return true;
1538
+ }
1539
+ __name(instanceOfAwsKmsSetting, "instanceOfAwsKmsSetting");
1540
+ function AwsKmsSettingFromJSON(json) {
1541
+ return AwsKmsSettingFromJSONTyped(json, false);
1542
+ }
1543
+ __name(AwsKmsSettingFromJSON, "AwsKmsSettingFromJSON");
1544
+ function AwsKmsSettingFromJSONTyped(json, ignoreDiscriminator) {
1545
+ if (json == null) {
1546
+ return json;
1547
+ }
1548
+ return {
1549
+ region: json["region"],
1550
+ staticCredentials: json["staticCredentials"] == null ? void 0 : AwsStaticCredentialsFromJSON(json["staticCredentials"]),
1551
+ assumeRoleCredentials: json["assumeRoleCredentials"] == null ? void 0 : AwsAssumeRoleCredentialsFromJSON(json["assumeRoleCredentials"]),
1552
+ webIdentityTokenCredentials: json["webIdentityTokenCredentials"] == null ? void 0 : AwsWebIdentityTokenCredentialsFromJSON(json["webIdentityTokenCredentials"]),
1553
+ endpointUrl: json["endpointUrl"] == null ? void 0 : json["endpointUrl"],
1554
+ clientConfiguration: json["clientConfiguration"] == null ? void 0 : AwsClientConfigurationFromJSON(json["clientConfiguration"])
1555
+ };
1556
+ }
1557
+ __name(AwsKmsSettingFromJSONTyped, "AwsKmsSettingFromJSONTyped");
1558
+ function AwsKmsSettingToJSON(json) {
1559
+ return AwsKmsSettingToJSONTyped(json, false);
1560
+ }
1561
+ __name(AwsKmsSettingToJSON, "AwsKmsSettingToJSON");
1562
+ function AwsKmsSettingToJSONTyped(value, ignoreDiscriminator = false) {
1563
+ if (value == null) {
1564
+ return value;
1565
+ }
1566
+ return {
1567
+ region: value["region"],
1568
+ staticCredentials: AwsStaticCredentialsToJSON(value["staticCredentials"]),
1569
+ assumeRoleCredentials: AwsAssumeRoleCredentialsToJSON(value["assumeRoleCredentials"]),
1570
+ webIdentityTokenCredentials: AwsWebIdentityTokenCredentialsToJSON(value["webIdentityTokenCredentials"]),
1571
+ endpointUrl: value["endpointUrl"],
1572
+ clientConfiguration: AwsClientConfigurationToJSON(value["clientConfiguration"])
1573
+ };
1574
+ }
1575
+ __name(AwsKmsSettingToJSONTyped, "AwsKmsSettingToJSONTyped");
1576
+
1577
+ // src/models/AzureClientSecretCredentialOpts.ts
1578
+ function instanceOfAzureClientSecretCredentialOpts(value) {
1579
+ if (!("clientId" in value) || value["clientId"] === void 0) return false;
1580
+ if (!("clientSecret" in value) || value["clientSecret"] === void 0) return false;
1581
+ return true;
1582
+ }
1583
+ __name(instanceOfAzureClientSecretCredentialOpts, "instanceOfAzureClientSecretCredentialOpts");
1584
+ function AzureClientSecretCredentialOptsFromJSON(json) {
1585
+ return AzureClientSecretCredentialOptsFromJSONTyped(json, false);
1586
+ }
1587
+ __name(AzureClientSecretCredentialOptsFromJSON, "AzureClientSecretCredentialOptsFromJSON");
1588
+ function AzureClientSecretCredentialOptsFromJSONTyped(json, ignoreDiscriminator) {
1589
+ if (json == null) {
1590
+ return json;
1591
+ }
1592
+ return {
1593
+ clientId: json["clientId"],
1594
+ clientSecret: json["clientSecret"],
1595
+ lookupMode: json["lookupMode"] == null ? void 0 : LookupModeFromJSON(json["lookupMode"])
1596
+ };
1597
+ }
1598
+ __name(AzureClientSecretCredentialOptsFromJSONTyped, "AzureClientSecretCredentialOptsFromJSONTyped");
1599
+ function AzureClientSecretCredentialOptsToJSON(json) {
1600
+ return AzureClientSecretCredentialOptsToJSONTyped(json, false);
1601
+ }
1602
+ __name(AzureClientSecretCredentialOptsToJSON, "AzureClientSecretCredentialOptsToJSON");
1603
+ function AzureClientSecretCredentialOptsToJSONTyped(value, ignoreDiscriminator = false) {
1604
+ if (value == null) {
1605
+ return value;
1606
+ }
1607
+ return {
1608
+ clientId: value["clientId"],
1609
+ clientSecret: value["clientSecret"],
1610
+ lookupMode: LookupModeToJSON(value["lookupMode"])
1611
+ };
1612
+ }
1613
+ __name(AzureClientSecretCredentialOptsToJSONTyped, "AzureClientSecretCredentialOptsToJSONTyped");
1614
+
1615
+ // src/models/AzureCredentialOpts.ts
1616
+ function instanceOfAzureCredentialOpts(value) {
1617
+ return true;
1618
+ }
1619
+ __name(instanceOfAzureCredentialOpts, "instanceOfAzureCredentialOpts");
1620
+ function AzureCredentialOptsFromJSON(json) {
1621
+ return AzureCredentialOptsFromJSONTyped(json, false);
1622
+ }
1623
+ __name(AzureCredentialOptsFromJSON, "AzureCredentialOptsFromJSON");
1624
+ function AzureCredentialOptsFromJSONTyped(json, ignoreDiscriminator) {
1625
+ if (json == null) {
1626
+ return json;
1627
+ }
1628
+ return {
1629
+ clientSecretCredentialOpts: json["clientSecretCredentialOpts"] == null ? void 0 : AzureClientSecretCredentialOptsFromJSON(json["clientSecretCredentialOpts"])
1630
+ };
1631
+ }
1632
+ __name(AzureCredentialOptsFromJSONTyped, "AzureCredentialOptsFromJSONTyped");
1633
+ function AzureCredentialOptsToJSON(json) {
1634
+ return AzureCredentialOptsToJSONTyped(json, false);
1635
+ }
1636
+ __name(AzureCredentialOptsToJSON, "AzureCredentialOptsToJSON");
1637
+ function AzureCredentialOptsToJSONTyped(value, ignoreDiscriminator = false) {
1638
+ if (value == null) {
1639
+ return value;
1640
+ }
1641
+ return {
1642
+ clientSecretCredentialOpts: AzureClientSecretCredentialOptsToJSON(value["clientSecretCredentialOpts"])
1643
+ };
1644
+ }
1645
+ __name(AzureCredentialOptsToJSONTyped, "AzureCredentialOptsToJSONTyped");
1646
+
1647
+ // src/models/AzureKeyVaultSetting.ts
1648
+ function instanceOfAzureKeyVaultSetting(value) {
1649
+ if (!("keyvaultUrl" in value) || value["keyvaultUrl"] === void 0) return false;
1650
+ if (!("tenantId" in value) || value["tenantId"] === void 0) return false;
1651
+ if (!("credentialOpts" in value) || value["credentialOpts"] === void 0) return false;
1652
+ return true;
1653
+ }
1654
+ __name(instanceOfAzureKeyVaultSetting, "instanceOfAzureKeyVaultSetting");
1655
+ function AzureKeyVaultSettingFromJSON(json) {
1656
+ return AzureKeyVaultSettingFromJSONTyped(json, false);
1657
+ }
1658
+ __name(AzureKeyVaultSettingFromJSON, "AzureKeyVaultSettingFromJSON");
1659
+ function AzureKeyVaultSettingFromJSONTyped(json, ignoreDiscriminator) {
1660
+ if (json == null) {
1661
+ return json;
1662
+ }
1663
+ return {
1664
+ keyvaultUrl: json["keyvaultUrl"],
1665
+ tenantId: json["tenantId"],
1666
+ credentialOpts: AzureCredentialOptsFromJSON(json["credentialOpts"]),
1667
+ applicationId: json["applicationId"] == null ? void 0 : json["applicationId"],
1668
+ lookupMode: json["lookupMode"] == null ? void 0 : LookupModeFromJSON(json["lookupMode"])
1669
+ };
1670
+ }
1671
+ __name(AzureKeyVaultSettingFromJSONTyped, "AzureKeyVaultSettingFromJSONTyped");
1672
+ function AzureKeyVaultSettingToJSON(json) {
1673
+ return AzureKeyVaultSettingToJSONTyped(json, false);
1674
+ }
1675
+ __name(AzureKeyVaultSettingToJSON, "AzureKeyVaultSettingToJSON");
1676
+ function AzureKeyVaultSettingToJSONTyped(value, ignoreDiscriminator = false) {
1677
+ if (value == null) {
1678
+ return value;
1679
+ }
1680
+ return {
1681
+ keyvaultUrl: value["keyvaultUrl"],
1682
+ tenantId: value["tenantId"],
1683
+ credentialOpts: AzureCredentialOptsToJSON(value["credentialOpts"]),
1684
+ applicationId: value["applicationId"],
1685
+ lookupMode: LookupModeToJSON(value["lookupMode"])
1686
+ };
1687
+ }
1688
+ __name(AzureKeyVaultSettingToJSONTyped, "AzureKeyVaultSettingToJSONTyped");
1689
+
1690
+ // src/models/CoseKeyType.ts
1691
+ var CoseKeyType = {
1692
+ NUMBER_1: 1,
1693
+ NUMBER_2: 2,
1694
+ NUMBER_3: 3,
1695
+ NUMBER_4: 4
1696
+ };
1697
+ function instanceOfCoseKeyType(value) {
1698
+ for (const key in CoseKeyType) {
1699
+ if (Object.prototype.hasOwnProperty.call(CoseKeyType, key)) {
1700
+ if (CoseKeyType[key] === value) {
1701
+ return true;
1702
+ }
1703
+ }
1704
+ }
1705
+ return false;
1706
+ }
1707
+ __name(instanceOfCoseKeyType, "instanceOfCoseKeyType");
1708
+ function CoseKeyTypeFromJSON(json) {
1709
+ return CoseKeyTypeFromJSONTyped(json, false);
1710
+ }
1711
+ __name(CoseKeyTypeFromJSON, "CoseKeyTypeFromJSON");
1712
+ function CoseKeyTypeFromJSONTyped(json, ignoreDiscriminator) {
1713
+ return json;
1714
+ }
1715
+ __name(CoseKeyTypeFromJSONTyped, "CoseKeyTypeFromJSONTyped");
1716
+ function CoseKeyTypeToJSON(value) {
1717
+ return value;
1718
+ }
1719
+ __name(CoseKeyTypeToJSON, "CoseKeyTypeToJSON");
1720
+ function CoseKeyTypeToJSONTyped(value, ignoreDiscriminator) {
1721
+ return value;
1722
+ }
1723
+ __name(CoseKeyTypeToJSONTyped, "CoseKeyTypeToJSONTyped");
1724
+
1725
+ // src/models/CoseKey.ts
1726
+ function instanceOfCoseKey(value) {
1727
+ if (!("kty" in value) || value["kty"] === void 0) return false;
1728
+ return true;
1729
+ }
1730
+ __name(instanceOfCoseKey, "instanceOfCoseKey");
1731
+ function CoseKeyFromJSON(json) {
1732
+ return CoseKeyFromJSONTyped(json, false);
1733
+ }
1734
+ __name(CoseKeyFromJSON, "CoseKeyFromJSON");
1735
+ function CoseKeyFromJSONTyped(json, ignoreDiscriminator) {
1736
+ if (json == null) {
1737
+ return json;
1738
+ }
1739
+ return {
1740
+ kty: CoseKeyTypeFromJSON(json["kty"]),
1741
+ kid: json["kid"] == null ? void 0 : json["kid"],
1742
+ alg: json["alg"] == null ? void 0 : json["alg"],
1743
+ keyOps: json["key_ops"] == null ? void 0 : json["key_ops"],
1744
+ baseIV: json["baseIV"] == null ? void 0 : json["baseIV"],
1745
+ crv: json["crv"] == null ? void 0 : json["crv"],
1746
+ x: json["x"] == null ? void 0 : json["x"],
1747
+ y: json["y"] == null ? void 0 : json["y"],
1748
+ d: json["d"] == null ? void 0 : json["d"],
1749
+ x5chain: json["x5chain"] == null ? void 0 : json["x5chain"]
1750
+ };
1751
+ }
1752
+ __name(CoseKeyFromJSONTyped, "CoseKeyFromJSONTyped");
1753
+ function CoseKeyToJSON(json) {
1754
+ return CoseKeyToJSONTyped(json, false);
1755
+ }
1756
+ __name(CoseKeyToJSON, "CoseKeyToJSON");
1757
+ function CoseKeyToJSONTyped(value, ignoreDiscriminator = false) {
1758
+ if (value == null) {
1759
+ return value;
1760
+ }
1761
+ return {
1762
+ kty: CoseKeyTypeToJSON(value["kty"]),
1763
+ kid: value["kid"],
1764
+ alg: value["alg"],
1765
+ key_ops: value["keyOps"],
1766
+ baseIV: value["baseIV"],
1767
+ crv: value["crv"],
1768
+ x: value["x"],
1769
+ y: value["y"],
1770
+ d: value["d"],
1771
+ x5chain: value["x5chain"]
1772
+ };
1773
+ }
1774
+ __name(CoseKeyToJSONTyped, "CoseKeyToJSONTyped");
1775
+
1776
+ // src/models/CoseKeyPair.ts
1777
+ function instanceOfCoseKeyPair(value) {
1778
+ if (!("publicCoseKey" in value) || value["publicCoseKey"] === void 0) return false;
1779
+ return true;
1780
+ }
1781
+ __name(instanceOfCoseKeyPair, "instanceOfCoseKeyPair");
1782
+ function CoseKeyPairFromJSON(json) {
1783
+ return CoseKeyPairFromJSONTyped(json, false);
1784
+ }
1785
+ __name(CoseKeyPairFromJSON, "CoseKeyPairFromJSON");
1786
+ function CoseKeyPairFromJSONTyped(json, ignoreDiscriminator) {
1787
+ if (json == null) {
1788
+ return json;
1789
+ }
1790
+ return {
1791
+ privateCoseKey: json["privateCoseKey"] == null ? void 0 : CoseKeyFromJSON(json["privateCoseKey"]),
1792
+ publicCoseKey: CoseKeyFromJSON(json["publicCoseKey"])
1793
+ };
1794
+ }
1795
+ __name(CoseKeyPairFromJSONTyped, "CoseKeyPairFromJSONTyped");
1796
+ function CoseKeyPairToJSON(json) {
1797
+ return CoseKeyPairToJSONTyped(json, false);
1798
+ }
1799
+ __name(CoseKeyPairToJSON, "CoseKeyPairToJSON");
1800
+ function CoseKeyPairToJSONTyped(value, ignoreDiscriminator = false) {
1801
+ if (value == null) {
1802
+ return value;
1803
+ }
1804
+ return {
1805
+ privateCoseKey: CoseKeyToJSON(value["privateCoseKey"]),
1806
+ publicCoseKey: CoseKeyToJSON(value["publicCoseKey"])
1807
+ };
1808
+ }
1809
+ __name(CoseKeyPairToJSONTyped, "CoseKeyPairToJSONTyped");
1810
+
1811
+ // src/models/KeyProviderType.ts
1812
+ var KeyProviderType = {
1813
+ Software: "SOFTWARE",
1814
+ AzureKeyvault: "AZURE_KEYVAULT",
1815
+ AwsKms: "AWS_KMS"
1816
+ };
1817
+ function instanceOfKeyProviderType(value) {
1818
+ for (const key in KeyProviderType) {
1819
+ if (Object.prototype.hasOwnProperty.call(KeyProviderType, key)) {
1820
+ if (KeyProviderType[key] === value) {
1821
+ return true;
1822
+ }
1823
+ }
1824
+ }
1825
+ return false;
1826
+ }
1827
+ __name(instanceOfKeyProviderType, "instanceOfKeyProviderType");
1828
+ function KeyProviderTypeFromJSON(json) {
1829
+ return KeyProviderTypeFromJSONTyped(json, false);
1830
+ }
1831
+ __name(KeyProviderTypeFromJSON, "KeyProviderTypeFromJSON");
1832
+ function KeyProviderTypeFromJSONTyped(json, ignoreDiscriminator) {
1833
+ return json;
1834
+ }
1835
+ __name(KeyProviderTypeFromJSONTyped, "KeyProviderTypeFromJSONTyped");
1836
+ function KeyProviderTypeToJSON(value) {
1837
+ return value;
1838
+ }
1839
+ __name(KeyProviderTypeToJSON, "KeyProviderTypeToJSON");
1840
+ function KeyProviderTypeToJSONTyped(value, ignoreDiscriminator) {
1841
+ return value;
1842
+ }
1843
+ __name(KeyProviderTypeToJSONTyped, "KeyProviderTypeToJSONTyped");
1844
+
1845
+ // src/models/CreateKeyProvider.ts
1846
+ function instanceOfCreateKeyProvider(value) {
1847
+ if (!("type" in value) || value["type"] === void 0) return false;
1848
+ return true;
1849
+ }
1850
+ __name(instanceOfCreateKeyProvider, "instanceOfCreateKeyProvider");
1851
+ function CreateKeyProviderFromJSON(json) {
1852
+ return CreateKeyProviderFromJSONTyped(json, false);
1853
+ }
1854
+ __name(CreateKeyProviderFromJSON, "CreateKeyProviderFromJSON");
1855
+ function CreateKeyProviderFromJSONTyped(json, ignoreDiscriminator) {
1856
+ if (json == null) {
1857
+ return json;
1858
+ }
1859
+ return {
1860
+ type: KeyProviderTypeFromJSON(json["type"]),
1861
+ azureKeyvaultSettings: json["azureKeyvaultSettings"] == null ? void 0 : AzureKeyVaultSettingFromJSON(json["azureKeyvaultSettings"]),
1862
+ awsKmsSettings: json["awsKmsSettings"] == null ? void 0 : AwsKmsSettingFromJSON(json["awsKmsSettings"]),
1863
+ cacheEnabled: json["cacheEnabled"] == null ? void 0 : json["cacheEnabled"],
1864
+ cacheTTLInSeconds: json["cacheTTLInSeconds"] == null ? void 0 : json["cacheTTLInSeconds"]
1865
+ };
1866
+ }
1867
+ __name(CreateKeyProviderFromJSONTyped, "CreateKeyProviderFromJSONTyped");
1868
+ function CreateKeyProviderToJSON(json) {
1869
+ return CreateKeyProviderToJSONTyped(json, false);
1870
+ }
1871
+ __name(CreateKeyProviderToJSON, "CreateKeyProviderToJSON");
1872
+ function CreateKeyProviderToJSONTyped(value, ignoreDiscriminator = false) {
1873
+ if (value == null) {
1874
+ return value;
1875
+ }
1876
+ return {
1877
+ type: KeyProviderTypeToJSON(value["type"]),
1878
+ azureKeyvaultSettings: AzureKeyVaultSettingToJSON(value["azureKeyvaultSettings"]),
1879
+ awsKmsSettings: AwsKmsSettingToJSON(value["awsKmsSettings"]),
1880
+ cacheEnabled: value["cacheEnabled"],
1881
+ cacheTTLInSeconds: value["cacheTTLInSeconds"]
1882
+ };
1883
+ }
1884
+ __name(CreateKeyProviderToJSONTyped, "CreateKeyProviderToJSONTyped");
1885
+
1886
+ // src/models/KeyType.ts
1887
+ var KeyType = {
1888
+ Okp: "OKP",
1889
+ Ec: "EC",
1890
+ Rsa: "RSA"
1891
+ };
1892
+ function instanceOfKeyType(value) {
1893
+ for (const key in KeyType) {
1894
+ if (Object.prototype.hasOwnProperty.call(KeyType, key)) {
1895
+ if (KeyType[key] === value) {
1896
+ return true;
1897
+ }
1898
+ }
1899
+ }
1900
+ return false;
1901
+ }
1902
+ __name(instanceOfKeyType, "instanceOfKeyType");
1903
+ function KeyTypeFromJSON(json) {
1904
+ return KeyTypeFromJSONTyped(json, false);
1905
+ }
1906
+ __name(KeyTypeFromJSON, "KeyTypeFromJSON");
1907
+ function KeyTypeFromJSONTyped(json, ignoreDiscriminator) {
1908
+ return json;
1909
+ }
1910
+ __name(KeyTypeFromJSONTyped, "KeyTypeFromJSONTyped");
1911
+ function KeyTypeToJSON(value) {
1912
+ return value;
1913
+ }
1914
+ __name(KeyTypeToJSON, "KeyTypeToJSON");
1915
+ function KeyTypeToJSONTyped(value, ignoreDiscriminator) {
1916
+ return value;
1917
+ }
1918
+ __name(KeyTypeToJSONTyped, "KeyTypeToJSONTyped");
1919
+
1920
+ // src/models/KeyVisibility.ts
1921
+ var KeyVisibility = {
1922
+ Public: "PUBLIC",
1923
+ Private: "PRIVATE"
1924
+ };
1925
+ function instanceOfKeyVisibility(value) {
1926
+ for (const key in KeyVisibility) {
1927
+ if (Object.prototype.hasOwnProperty.call(KeyVisibility, key)) {
1928
+ if (KeyVisibility[key] === value) {
1929
+ return true;
1930
+ }
1931
+ }
1932
+ }
1933
+ return false;
1934
+ }
1935
+ __name(instanceOfKeyVisibility, "instanceOfKeyVisibility");
1936
+ function KeyVisibilityFromJSON(json) {
1937
+ return KeyVisibilityFromJSONTyped(json, false);
1938
+ }
1939
+ __name(KeyVisibilityFromJSON, "KeyVisibilityFromJSON");
1940
+ function KeyVisibilityFromJSONTyped(json, ignoreDiscriminator) {
1941
+ return json;
1942
+ }
1943
+ __name(KeyVisibilityFromJSONTyped, "KeyVisibilityFromJSONTyped");
1944
+ function KeyVisibilityToJSON(value) {
1945
+ return value;
1946
+ }
1947
+ __name(KeyVisibilityToJSON, "KeyVisibilityToJSON");
1948
+ function KeyVisibilityToJSONTyped(value, ignoreDiscriminator) {
1949
+ return value;
1950
+ }
1951
+ __name(KeyVisibilityToJSONTyped, "KeyVisibilityToJSONTyped");
1952
+
1953
+ // src/models/SignatureAlgorithm.ts
1954
+ var SignatureAlgorithm = {
1955
+ Ed25519: "ED25519",
1956
+ EcdsaSha256: "ECDSA_SHA256",
1957
+ EcdsaSha384: "ECDSA_SHA384",
1958
+ EcdsaSha512: "ECDSA_SHA512",
1959
+ Es256K: "ES256K",
1960
+ EckaDhSha256: "ECKA_DH_SHA256",
1961
+ HmacSha256: "HMAC_SHA256",
1962
+ HmacSha384: "HMAC_SHA384",
1963
+ HmacSha512: "HMAC_SHA512",
1964
+ RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1",
1965
+ RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1",
1966
+ RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1"
1967
+ };
1968
+ function instanceOfSignatureAlgorithm(value) {
1969
+ for (const key in SignatureAlgorithm) {
1970
+ if (Object.prototype.hasOwnProperty.call(SignatureAlgorithm, key)) {
1971
+ if (SignatureAlgorithm[key] === value) {
1972
+ return true;
1973
+ }
1974
+ }
1975
+ }
1976
+ return false;
1977
+ }
1978
+ __name(instanceOfSignatureAlgorithm, "instanceOfSignatureAlgorithm");
1979
+ function SignatureAlgorithmFromJSON(json) {
1980
+ return SignatureAlgorithmFromJSONTyped(json, false);
1981
+ }
1982
+ __name(SignatureAlgorithmFromJSON, "SignatureAlgorithmFromJSON");
1983
+ function SignatureAlgorithmFromJSONTyped(json, ignoreDiscriminator) {
1984
+ return json;
1985
+ }
1986
+ __name(SignatureAlgorithmFromJSONTyped, "SignatureAlgorithmFromJSONTyped");
1987
+ function SignatureAlgorithmToJSON(value) {
1988
+ return value;
1989
+ }
1990
+ __name(SignatureAlgorithmToJSON, "SignatureAlgorithmToJSON");
1991
+ function SignatureAlgorithmToJSONTyped(value, ignoreDiscriminator) {
1992
+ return value;
1993
+ }
1994
+ __name(SignatureAlgorithmToJSONTyped, "SignatureAlgorithmToJSONTyped");
1995
+
1996
+ // src/models/KeyEncoding.ts
1997
+ var KeyEncoding = {
1998
+ Cose: "COSE",
1999
+ Jose: "JOSE"
2000
+ };
2001
+ function instanceOfKeyEncoding(value) {
2002
+ for (const key in KeyEncoding) {
2003
+ if (Object.prototype.hasOwnProperty.call(KeyEncoding, key)) {
2004
+ if (KeyEncoding[key] === value) {
2005
+ return true;
2006
+ }
2007
+ }
2008
+ }
2009
+ return false;
2010
+ }
2011
+ __name(instanceOfKeyEncoding, "instanceOfKeyEncoding");
2012
+ function KeyEncodingFromJSON(json) {
2013
+ return KeyEncodingFromJSONTyped(json, false);
2014
+ }
2015
+ __name(KeyEncodingFromJSON, "KeyEncodingFromJSON");
2016
+ function KeyEncodingFromJSONTyped(json, ignoreDiscriminator) {
2017
+ return json;
2018
+ }
2019
+ __name(KeyEncodingFromJSONTyped, "KeyEncodingFromJSONTyped");
2020
+ function KeyEncodingToJSON(value) {
2021
+ return value;
2022
+ }
2023
+ __name(KeyEncodingToJSON, "KeyEncodingToJSON");
2024
+ function KeyEncodingToJSONTyped(value, ignoreDiscriminator) {
2025
+ return value;
2026
+ }
2027
+ __name(KeyEncodingToJSONTyped, "KeyEncodingToJSONTyped");
2028
+
2029
+ // src/models/Curve.ts
2030
+ var Curve = {
2031
+ P256: "P-256",
2032
+ P384: "P-384",
2033
+ P521: "P-521",
2034
+ Secp256k1: "secp256k1",
2035
+ Ed25519: "Ed25519",
2036
+ Ed448: "Ed448",
2037
+ X25519: "X25519",
2038
+ X448: "X448"
2039
+ };
2040
+ function instanceOfCurve(value) {
2041
+ for (const key in Curve) {
2042
+ if (Object.prototype.hasOwnProperty.call(Curve, key)) {
2043
+ if (Curve[key] === value) {
2044
+ return true;
2045
+ }
2046
+ }
2047
+ }
2048
+ return false;
2049
+ }
2050
+ __name(instanceOfCurve, "instanceOfCurve");
2051
+ function CurveFromJSON(json) {
2052
+ return CurveFromJSONTyped(json, false);
2053
+ }
2054
+ __name(CurveFromJSON, "CurveFromJSON");
2055
+ function CurveFromJSONTyped(json, ignoreDiscriminator) {
2056
+ return json;
2057
+ }
2058
+ __name(CurveFromJSONTyped, "CurveFromJSONTyped");
2059
+ function CurveToJSON(value) {
2060
+ return value;
2061
+ }
2062
+ __name(CurveToJSON, "CurveToJSON");
2063
+ function CurveToJSONTyped(value, ignoreDiscriminator) {
2064
+ return value;
2065
+ }
2066
+ __name(CurveToJSONTyped, "CurveToJSONTyped");
2067
+
2068
+ // src/models/KeyOperations.ts
2069
+ var KeyOperations = {
2070
+ Sign: "sign",
2071
+ Verify: "verify",
2072
+ Encrypt: "encrypt",
2073
+ Decrypt: "decrypt",
2074
+ WrapKey: "wrapKey",
2075
+ UnwrapKey: "unwrapKey",
2076
+ DeriveKey: "deriveKey",
2077
+ DeriveBits: "deriveBits"
2078
+ };
2079
+ function instanceOfKeyOperations(value) {
2080
+ for (const key in KeyOperations) {
2081
+ if (Object.prototype.hasOwnProperty.call(KeyOperations, key)) {
2082
+ if (KeyOperations[key] === value) {
2083
+ return true;
2084
+ }
2085
+ }
2086
+ }
2087
+ return false;
2088
+ }
2089
+ __name(instanceOfKeyOperations, "instanceOfKeyOperations");
2090
+ function KeyOperationsFromJSON(json) {
2091
+ return KeyOperationsFromJSONTyped(json, false);
2092
+ }
2093
+ __name(KeyOperationsFromJSON, "KeyOperationsFromJSON");
2094
+ function KeyOperationsFromJSONTyped(json, ignoreDiscriminator) {
2095
+ return json;
2096
+ }
2097
+ __name(KeyOperationsFromJSONTyped, "KeyOperationsFromJSONTyped");
2098
+ function KeyOperationsToJSON(value) {
2099
+ return value;
2100
+ }
2101
+ __name(KeyOperationsToJSON, "KeyOperationsToJSON");
2102
+ function KeyOperationsToJSONTyped(value, ignoreDiscriminator) {
2103
+ return value;
2104
+ }
2105
+ __name(KeyOperationsToJSONTyped, "KeyOperationsToJSONTyped");
2106
+
2107
+ // src/models/JwkUse.ts
2108
+ var JwkUse = {
2109
+ Sig: "sig",
2110
+ Enc: "enc"
2111
+ };
2112
+ function instanceOfJwkUse(value) {
2113
+ for (const key in JwkUse) {
2114
+ if (Object.prototype.hasOwnProperty.call(JwkUse, key)) {
2115
+ if (JwkUse[key] === value) {
2116
+ return true;
2117
+ }
2118
+ }
2119
+ }
2120
+ return false;
2121
+ }
2122
+ __name(instanceOfJwkUse, "instanceOfJwkUse");
2123
+ function JwkUseFromJSON(json) {
2124
+ return JwkUseFromJSONTyped(json, false);
2125
+ }
2126
+ __name(JwkUseFromJSON, "JwkUseFromJSON");
2127
+ function JwkUseFromJSONTyped(json, ignoreDiscriminator) {
2128
+ return json;
2129
+ }
2130
+ __name(JwkUseFromJSONTyped, "JwkUseFromJSONTyped");
2131
+ function JwkUseToJSON(value) {
2132
+ return value;
2133
+ }
2134
+ __name(JwkUseToJSON, "JwkUseToJSON");
2135
+ function JwkUseToJSONTyped(value, ignoreDiscriminator) {
2136
+ return value;
2137
+ }
2138
+ __name(JwkUseToJSONTyped, "JwkUseToJSONTyped");
2139
+
2140
+ // src/models/JwkKeyType.ts
2141
+ var JwkKeyType = {
2142
+ Ec: "EC",
2143
+ Rsa: "RSA",
2144
+ Okp: "OKP",
2145
+ Oct: "oct"
2146
+ };
2147
+ function instanceOfJwkKeyType(value) {
2148
+ for (const key in JwkKeyType) {
2149
+ if (Object.prototype.hasOwnProperty.call(JwkKeyType, key)) {
2150
+ if (JwkKeyType[key] === value) {
2151
+ return true;
2152
+ }
2153
+ }
2154
+ }
2155
+ return false;
2156
+ }
2157
+ __name(instanceOfJwkKeyType, "instanceOfJwkKeyType");
2158
+ function JwkKeyTypeFromJSON(json) {
2159
+ return JwkKeyTypeFromJSONTyped(json, false);
2160
+ }
2161
+ __name(JwkKeyTypeFromJSON, "JwkKeyTypeFromJSON");
2162
+ function JwkKeyTypeFromJSONTyped(json, ignoreDiscriminator) {
2163
+ return json;
2164
+ }
2165
+ __name(JwkKeyTypeFromJSONTyped, "JwkKeyTypeFromJSONTyped");
2166
+ function JwkKeyTypeToJSON(value) {
2167
+ return value;
2168
+ }
2169
+ __name(JwkKeyTypeToJSON, "JwkKeyTypeToJSON");
2170
+ function JwkKeyTypeToJSONTyped(value, ignoreDiscriminator) {
2171
+ return value;
2172
+ }
2173
+ __name(JwkKeyTypeToJSONTyped, "JwkKeyTypeToJSONTyped");
2174
+
2175
+ // src/models/Jwk.ts
2176
+ function instanceOfJwk(value) {
2177
+ if (!("kty" in value) || value["kty"] === void 0) return false;
2178
+ return true;
2179
+ }
2180
+ __name(instanceOfJwk, "instanceOfJwk");
2181
+ function JwkFromJSON(json) {
2182
+ return JwkFromJSONTyped(json, false);
2183
+ }
2184
+ __name(JwkFromJSON, "JwkFromJSON");
2185
+ function JwkFromJSONTyped(json, ignoreDiscriminator) {
2186
+ if (json == null) {
2187
+ return json;
2188
+ }
2189
+ return {
2190
+ kty: JwkKeyTypeFromJSON(json["kty"]),
2191
+ kid: json["kid"] == null ? void 0 : json["kid"],
2192
+ alg: json["alg"] == null ? void 0 : json["alg"],
2193
+ use: json["use"] == null ? void 0 : JwkUseFromJSON(json["use"]),
2194
+ keyOps: json["key_ops"] == null ? void 0 : json["key_ops"].map(KeyOperationsFromJSON),
2195
+ crv: json["crv"] == null ? void 0 : CurveFromJSON(json["crv"]),
2196
+ x: json["x"] == null ? void 0 : json["x"],
2197
+ y: json["y"] == null ? void 0 : json["y"],
2198
+ d: json["d"] == null ? void 0 : json["d"],
2199
+ n: json["n"] == null ? void 0 : json["n"],
2200
+ e: json["e"] == null ? void 0 : json["e"],
2201
+ p: json["p"] == null ? void 0 : json["p"],
2202
+ q: json["q"] == null ? void 0 : json["q"],
2203
+ dp: json["dp"] == null ? void 0 : json["dp"],
2204
+ dq: json["dq"] == null ? void 0 : json["dq"],
2205
+ qi: json["qi"] == null ? void 0 : json["qi"],
2206
+ k: json["k"] == null ? void 0 : json["k"],
2207
+ x5c: json["x5c"] == null ? void 0 : json["x5c"],
2208
+ x5t: json["x5t"] == null ? void 0 : json["x5t"],
2209
+ x5u: json["x5u"] == null ? void 0 : json["x5u"],
2210
+ x5tS256: json["x5t#S256"] == null ? void 0 : json["x5t#S256"]
2211
+ };
2212
+ }
2213
+ __name(JwkFromJSONTyped, "JwkFromJSONTyped");
2214
+ function JwkToJSON(json) {
2215
+ return JwkToJSONTyped(json, false);
2216
+ }
2217
+ __name(JwkToJSON, "JwkToJSON");
2218
+ function JwkToJSONTyped(value, ignoreDiscriminator = false) {
2219
+ if (value == null) {
2220
+ return value;
2221
+ }
2222
+ return {
2223
+ kty: JwkKeyTypeToJSON(value["kty"]),
2224
+ kid: value["kid"],
2225
+ alg: value["alg"],
2226
+ use: JwkUseToJSON(value["use"]),
2227
+ key_ops: value["keyOps"] == null ? void 0 : value["keyOps"].map(KeyOperationsToJSON),
2228
+ crv: CurveToJSON(value["crv"]),
2229
+ x: value["x"],
2230
+ y: value["y"],
2231
+ d: value["d"],
2232
+ n: value["n"],
2233
+ e: value["e"],
2234
+ p: value["p"],
2235
+ q: value["q"],
2236
+ dp: value["dp"],
2237
+ dq: value["dq"],
2238
+ qi: value["qi"],
2239
+ k: value["k"],
2240
+ x5c: value["x5c"],
2241
+ x5t: value["x5t"],
2242
+ x5u: value["x5u"],
2243
+ "x5t#S256": value["x5tS256"]
2244
+ };
2245
+ }
2246
+ __name(JwkToJSONTyped, "JwkToJSONTyped");
2247
+
2248
+ // src/models/KeyInfo.ts
2249
+ function instanceOfKeyInfo(value) {
2250
+ return true;
2251
+ }
2252
+ __name(instanceOfKeyInfo, "instanceOfKeyInfo");
2253
+ function KeyInfoFromJSON(json) {
2254
+ return KeyInfoFromJSONTyped(json, false);
2255
+ }
2256
+ __name(KeyInfoFromJSON, "KeyInfoFromJSON");
2257
+ function KeyInfoFromJSONTyped(json, ignoreDiscriminator) {
2258
+ if (json == null) {
2259
+ return json;
2260
+ }
2261
+ return {
2262
+ kid: json["kid"] == null ? void 0 : json["kid"],
2263
+ key: json["key"] == null ? void 0 : JwkFromJSON(json["key"]),
2264
+ signatureAlgorithm: json["signatureAlgorithm"] == null ? void 0 : SignatureAlgorithmFromJSON(json["signatureAlgorithm"]),
2265
+ keyVisibility: json["keyVisibility"] == null ? void 0 : KeyVisibilityFromJSON(json["keyVisibility"]),
2266
+ x5c: json["x5c"] == null ? void 0 : json["x5c"],
2267
+ alias: json["alias"] == null ? void 0 : json["alias"],
2268
+ providerId: json["providerId"] == null ? void 0 : json["providerId"],
2269
+ keyType: json["keyType"] == null ? void 0 : KeyTypeFromJSON(json["keyType"]),
2270
+ keyEncoding: json["keyEncoding"] == null ? void 0 : KeyEncodingFromJSON(json["keyEncoding"]),
2271
+ opts: json["opts"] == null ? void 0 : json["opts"]
2272
+ };
2273
+ }
2274
+ __name(KeyInfoFromJSONTyped, "KeyInfoFromJSONTyped");
2275
+ function KeyInfoToJSON(json) {
2276
+ return KeyInfoToJSONTyped(json, false);
2277
+ }
2278
+ __name(KeyInfoToJSON, "KeyInfoToJSON");
2279
+ function KeyInfoToJSONTyped(value, ignoreDiscriminator = false) {
2280
+ if (value == null) {
2281
+ return value;
2282
+ }
2283
+ return {
2284
+ kid: value["kid"],
2285
+ key: JwkToJSON(value["key"]),
2286
+ signatureAlgorithm: SignatureAlgorithmToJSON(value["signatureAlgorithm"]),
2287
+ keyVisibility: KeyVisibilityToJSON(value["keyVisibility"]),
2288
+ x5c: value["x5c"],
2289
+ alias: value["alias"],
2290
+ providerId: value["providerId"],
2291
+ keyType: KeyTypeToJSON(value["keyType"]),
2292
+ keyEncoding: KeyEncodingToJSON(value["keyEncoding"]),
2293
+ opts: value["opts"]
2294
+ };
2295
+ }
2296
+ __name(KeyInfoToJSONTyped, "KeyInfoToJSONTyped");
2297
+
2298
+ // src/models/CreateRawSignature.ts
2299
+ function instanceOfCreateRawSignature(value) {
2300
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
2301
+ if (!("input" in value) || value["input"] === void 0) return false;
2302
+ return true;
2303
+ }
2304
+ __name(instanceOfCreateRawSignature, "instanceOfCreateRawSignature");
2305
+ function CreateRawSignatureFromJSON(json) {
2306
+ return CreateRawSignatureFromJSONTyped(json, false);
2307
+ }
2308
+ __name(CreateRawSignatureFromJSON, "CreateRawSignatureFromJSON");
2309
+ function CreateRawSignatureFromJSONTyped(json, ignoreDiscriminator) {
2310
+ if (json == null) {
2311
+ return json;
2312
+ }
2313
+ return {
2314
+ keyInfo: KeyInfoFromJSON(json["keyInfo"]),
2315
+ input: json["input"]
2316
+ };
2317
+ }
2318
+ __name(CreateRawSignatureFromJSONTyped, "CreateRawSignatureFromJSONTyped");
2319
+ function CreateRawSignatureToJSON(json) {
2320
+ return CreateRawSignatureToJSONTyped(json, false);
2321
+ }
2322
+ __name(CreateRawSignatureToJSON, "CreateRawSignatureToJSON");
2323
+ function CreateRawSignatureToJSONTyped(value, ignoreDiscriminator = false) {
2324
+ if (value == null) {
2325
+ return value;
2326
+ }
2327
+ return {
2328
+ keyInfo: KeyInfoToJSON(value["keyInfo"]),
2329
+ input: value["input"]
2330
+ };
2331
+ }
2332
+ __name(CreateRawSignatureToJSONTyped, "CreateRawSignatureToJSONTyped");
2333
+
2334
+ // src/models/CreateRawSignatureResponse.ts
2335
+ function instanceOfCreateRawSignatureResponse(value) {
2336
+ if (!("signature" in value) || value["signature"] === void 0) return false;
2337
+ return true;
2338
+ }
2339
+ __name(instanceOfCreateRawSignatureResponse, "instanceOfCreateRawSignatureResponse");
2340
+ function CreateRawSignatureResponseFromJSON(json) {
2341
+ return CreateRawSignatureResponseFromJSONTyped(json, false);
2342
+ }
2343
+ __name(CreateRawSignatureResponseFromJSON, "CreateRawSignatureResponseFromJSON");
2344
+ function CreateRawSignatureResponseFromJSONTyped(json, ignoreDiscriminator) {
2345
+ if (json == null) {
2346
+ return json;
2347
+ }
2348
+ return {
2349
+ signature: json["signature"]
2350
+ };
2351
+ }
2352
+ __name(CreateRawSignatureResponseFromJSONTyped, "CreateRawSignatureResponseFromJSONTyped");
2353
+ function CreateRawSignatureResponseToJSON(json) {
2354
+ return CreateRawSignatureResponseToJSONTyped(json, false);
2355
+ }
2356
+ __name(CreateRawSignatureResponseToJSON, "CreateRawSignatureResponseToJSON");
2357
+ function CreateRawSignatureResponseToJSONTyped(value, ignoreDiscriminator = false) {
2358
+ if (value == null) {
2359
+ return value;
2360
+ }
2361
+ return {
2362
+ signature: value["signature"]
2363
+ };
2364
+ }
2365
+ __name(CreateRawSignatureResponseToJSONTyped, "CreateRawSignatureResponseToJSONTyped");
2366
+
2367
+ // src/models/SignInput.ts
2368
+ var SignInputModeEnum = {
2369
+ Detached: "DETACHED",
2370
+ Attached: "ATTACHED"
2371
+ };
2372
+ function instanceOfSignInput(value) {
2373
+ if (!("data" in value) || value["data"] === void 0) return false;
2374
+ return true;
2375
+ }
2376
+ __name(instanceOfSignInput, "instanceOfSignInput");
2377
+ function SignInputFromJSON(json) {
2378
+ return SignInputFromJSONTyped(json, false);
2379
+ }
2380
+ __name(SignInputFromJSON, "SignInputFromJSON");
2381
+ function SignInputFromJSONTyped(json, ignoreDiscriminator) {
2382
+ if (json == null) {
2383
+ return json;
2384
+ }
2385
+ return {
2386
+ data: json["data"],
2387
+ mode: json["mode"] == null ? void 0 : json["mode"],
2388
+ metadata: json["metadata"] == null ? void 0 : json["metadata"]
2389
+ };
2390
+ }
2391
+ __name(SignInputFromJSONTyped, "SignInputFromJSONTyped");
2392
+ function SignInputToJSON(json) {
2393
+ return SignInputToJSONTyped(json, false);
2394
+ }
2395
+ __name(SignInputToJSON, "SignInputToJSON");
2396
+ function SignInputToJSONTyped(value, ignoreDiscriminator = false) {
2397
+ if (value == null) {
2398
+ return value;
2399
+ }
2400
+ return {
2401
+ data: value["data"],
2402
+ mode: value["mode"],
2403
+ metadata: value["metadata"]
2404
+ };
2405
+ }
2406
+ __name(SignInputToJSONTyped, "SignInputToJSONTyped");
2407
+
2408
+ // src/models/CreateSimpleSignature.ts
2409
+ function instanceOfCreateSimpleSignature(value) {
2410
+ if (!("signInput" in value) || value["signInput"] === void 0) return false;
2411
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
2412
+ return true;
2413
+ }
2414
+ __name(instanceOfCreateSimpleSignature, "instanceOfCreateSimpleSignature");
2415
+ function CreateSimpleSignatureFromJSON(json) {
2416
+ return CreateSimpleSignatureFromJSONTyped(json, false);
2417
+ }
2418
+ __name(CreateSimpleSignatureFromJSON, "CreateSimpleSignatureFromJSON");
2419
+ function CreateSimpleSignatureFromJSONTyped(json, ignoreDiscriminator) {
2420
+ if (json == null) {
2421
+ return json;
2422
+ }
2423
+ return {
2424
+ signInput: SignInputFromJSON(json["signInput"]),
2425
+ keyInfo: KeyInfoFromJSON(json["keyInfo"]),
2426
+ signatureAlgorithm: json["signatureAlgorithm"] == null ? void 0 : SignatureAlgorithmFromJSON(json["signatureAlgorithm"])
2427
+ };
2428
+ }
2429
+ __name(CreateSimpleSignatureFromJSONTyped, "CreateSimpleSignatureFromJSONTyped");
2430
+ function CreateSimpleSignatureToJSON(json) {
2431
+ return CreateSimpleSignatureToJSONTyped(json, false);
2432
+ }
2433
+ __name(CreateSimpleSignatureToJSON, "CreateSimpleSignatureToJSON");
2434
+ function CreateSimpleSignatureToJSONTyped(value, ignoreDiscriminator = false) {
2435
+ if (value == null) {
2436
+ return value;
2437
+ }
2438
+ return {
2439
+ signInput: SignInputToJSON(value["signInput"]),
2440
+ keyInfo: KeyInfoToJSON(value["keyInfo"]),
2441
+ signatureAlgorithm: SignatureAlgorithmToJSON(value["signatureAlgorithm"])
2442
+ };
2443
+ }
2444
+ __name(CreateSimpleSignatureToJSONTyped, "CreateSimpleSignatureToJSONTyped");
2445
+
2446
+ // src/models/CryptoAlg.ts
2447
+ var CryptoAlg = {
2448
+ Ed25519: "ED25519",
2449
+ Ecdsa: "ECDSA",
2450
+ Hmac: "HMAC",
2451
+ Rsa: "RSA"
2452
+ };
2453
+ function instanceOfCryptoAlg(value) {
2454
+ for (const key in CryptoAlg) {
2455
+ if (Object.prototype.hasOwnProperty.call(CryptoAlg, key)) {
2456
+ if (CryptoAlg[key] === value) {
2457
+ return true;
2458
+ }
2459
+ }
2460
+ }
2461
+ return false;
2462
+ }
2463
+ __name(instanceOfCryptoAlg, "instanceOfCryptoAlg");
2464
+ function CryptoAlgFromJSON(json) {
2465
+ return CryptoAlgFromJSONTyped(json, false);
2466
+ }
2467
+ __name(CryptoAlgFromJSON, "CryptoAlgFromJSON");
2468
+ function CryptoAlgFromJSONTyped(json, ignoreDiscriminator) {
2469
+ return json;
2470
+ }
2471
+ __name(CryptoAlgFromJSONTyped, "CryptoAlgFromJSONTyped");
2472
+ function CryptoAlgToJSON(value) {
2473
+ return value;
2474
+ }
2475
+ __name(CryptoAlgToJSON, "CryptoAlgToJSON");
2476
+ function CryptoAlgToJSONTyped(value, ignoreDiscriminator) {
2477
+ return value;
2478
+ }
2479
+ __name(CryptoAlgToJSONTyped, "CryptoAlgToJSONTyped");
2480
+
2481
+ // src/models/DigestAlg.ts
2482
+ var DigestAlg = {
2483
+ None: "NONE",
2484
+ Sha256: "SHA256",
2485
+ Sha384: "SHA384",
2486
+ Sha512: "SHA512",
2487
+ Sha3256: "SHA3_256",
2488
+ Sha3384: "SHA3_384",
2489
+ Sha3512: "SHA3_512"
2490
+ };
2491
+ function instanceOfDigestAlg(value) {
2492
+ for (const key in DigestAlg) {
2493
+ if (Object.prototype.hasOwnProperty.call(DigestAlg, key)) {
2494
+ if (DigestAlg[key] === value) {
2495
+ return true;
2496
+ }
2497
+ }
2498
+ }
2499
+ return false;
2500
+ }
2501
+ __name(instanceOfDigestAlg, "instanceOfDigestAlg");
2502
+ function DigestAlgFromJSON(json) {
2503
+ return DigestAlgFromJSONTyped(json, false);
2504
+ }
2505
+ __name(DigestAlgFromJSON, "DigestAlgFromJSON");
2506
+ function DigestAlgFromJSONTyped(json, ignoreDiscriminator) {
2507
+ return json;
2508
+ }
2509
+ __name(DigestAlgFromJSONTyped, "DigestAlgFromJSONTyped");
2510
+ function DigestAlgToJSON(value) {
2511
+ return value;
2512
+ }
2513
+ __name(DigestAlgToJSON, "DigestAlgToJSON");
2514
+ function DigestAlgToJSONTyped(value, ignoreDiscriminator) {
2515
+ return value;
2516
+ }
2517
+ __name(DigestAlgToJSONTyped, "DigestAlgToJSONTyped");
2518
+
2519
+ // src/models/ErrorResponse.ts
2520
+ function instanceOfErrorResponse(value) {
2521
+ if (!("code" in value) || value["code"] === void 0) return false;
2522
+ if (!("message" in value) || value["message"] === void 0) return false;
2523
+ return true;
2524
+ }
2525
+ __name(instanceOfErrorResponse, "instanceOfErrorResponse");
2526
+ function ErrorResponseFromJSON(json) {
2527
+ return ErrorResponseFromJSONTyped(json, false);
2528
+ }
2529
+ __name(ErrorResponseFromJSON, "ErrorResponseFromJSON");
2530
+ function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
2531
+ if (json == null) {
2532
+ return json;
2533
+ }
2534
+ return {
2535
+ code: json["code"],
2536
+ message: json["message"],
2537
+ details: json["details"] == null ? void 0 : json["details"]
2538
+ };
2539
+ }
2540
+ __name(ErrorResponseFromJSONTyped, "ErrorResponseFromJSONTyped");
2541
+ function ErrorResponseToJSON(json) {
2542
+ return ErrorResponseToJSONTyped(json, false);
2543
+ }
2544
+ __name(ErrorResponseToJSON, "ErrorResponseToJSON");
2545
+ function ErrorResponseToJSONTyped(value, ignoreDiscriminator = false) {
2546
+ if (value == null) {
2547
+ return value;
2548
+ }
2549
+ return {
2550
+ code: value["code"],
2551
+ message: value["message"],
2552
+ details: value["details"]
2553
+ };
2554
+ }
2555
+ __name(ErrorResponseToJSONTyped, "ErrorResponseToJSONTyped");
2556
+
2557
+ // src/models/GenerateKey.ts
2558
+ function instanceOfGenerateKey(value) {
2559
+ return true;
2560
+ }
2561
+ __name(instanceOfGenerateKey, "instanceOfGenerateKey");
2562
+ function GenerateKeyFromJSON(json) {
2563
+ return GenerateKeyFromJSONTyped(json, false);
2564
+ }
2565
+ __name(GenerateKeyFromJSON, "GenerateKeyFromJSON");
2566
+ function GenerateKeyFromJSONTyped(json, ignoreDiscriminator) {
2567
+ if (json == null) {
2568
+ return json;
2569
+ }
2570
+ return {
2571
+ alias: json["alias"] == null ? void 0 : json["alias"],
2572
+ use: json["use"] == null ? void 0 : JwkUseFromJSON(json["use"]),
2573
+ keyOperations: json["keyOperations"] == null ? void 0 : json["keyOperations"].map(KeyOperationsFromJSON),
2574
+ alg: json["alg"] == null ? void 0 : SignatureAlgorithmFromJSON(json["alg"])
2575
+ };
2576
+ }
2577
+ __name(GenerateKeyFromJSONTyped, "GenerateKeyFromJSONTyped");
2578
+ function GenerateKeyToJSON(json) {
2579
+ return GenerateKeyToJSONTyped(json, false);
2580
+ }
2581
+ __name(GenerateKeyToJSON, "GenerateKeyToJSON");
2582
+ function GenerateKeyToJSONTyped(value, ignoreDiscriminator = false) {
2583
+ if (value == null) {
2584
+ return value;
2585
+ }
2586
+ return {
2587
+ alias: value["alias"],
2588
+ use: JwkUseToJSON(value["use"]),
2589
+ keyOperations: value["keyOperations"] == null ? void 0 : value["keyOperations"].map(KeyOperationsToJSON),
2590
+ alg: SignatureAlgorithmToJSON(value["alg"])
2591
+ };
2592
+ }
2593
+ __name(GenerateKeyToJSONTyped, "GenerateKeyToJSONTyped");
2594
+
2595
+ // src/models/GenerateKeyGlobal.ts
2596
+ function instanceOfGenerateKeyGlobal(value) {
2597
+ return true;
2598
+ }
2599
+ __name(instanceOfGenerateKeyGlobal, "instanceOfGenerateKeyGlobal");
2600
+ function GenerateKeyGlobalFromJSON(json) {
2601
+ return GenerateKeyGlobalFromJSONTyped(json, false);
2602
+ }
2603
+ __name(GenerateKeyGlobalFromJSON, "GenerateKeyGlobalFromJSON");
2604
+ function GenerateKeyGlobalFromJSONTyped(json, ignoreDiscriminator) {
2605
+ if (json == null) {
2606
+ return json;
2607
+ }
2608
+ return {
2609
+ alias: json["alias"] == null ? void 0 : json["alias"],
2610
+ use: json["use"] == null ? void 0 : JwkUseFromJSON(json["use"]),
2611
+ keyOperations: json["keyOperations"] == null ? void 0 : json["keyOperations"].map(KeyOperationsFromJSON),
2612
+ alg: json["alg"] == null ? void 0 : SignatureAlgorithmFromJSON(json["alg"]),
2613
+ providerId: json["providerId"] == null ? void 0 : json["providerId"]
2614
+ };
2615
+ }
2616
+ __name(GenerateKeyGlobalFromJSONTyped, "GenerateKeyGlobalFromJSONTyped");
2617
+ function GenerateKeyGlobalToJSON(json) {
2618
+ return GenerateKeyGlobalToJSONTyped(json, false);
2619
+ }
2620
+ __name(GenerateKeyGlobalToJSON, "GenerateKeyGlobalToJSON");
2621
+ function GenerateKeyGlobalToJSONTyped(value, ignoreDiscriminator = false) {
2622
+ if (value == null) {
2623
+ return value;
2624
+ }
2625
+ return {
2626
+ alias: value["alias"],
2627
+ use: JwkUseToJSON(value["use"]),
2628
+ keyOperations: value["keyOperations"] == null ? void 0 : value["keyOperations"].map(KeyOperationsToJSON),
2629
+ alg: SignatureAlgorithmToJSON(value["alg"]),
2630
+ providerId: value["providerId"]
2631
+ };
2632
+ }
2633
+ __name(GenerateKeyGlobalToJSONTyped, "GenerateKeyGlobalToJSONTyped");
2634
+
2635
+ // src/models/JoseKeyPair.ts
2636
+ function instanceOfJoseKeyPair(value) {
2637
+ if (!("publicJwk" in value) || value["publicJwk"] === void 0) return false;
2638
+ return true;
2639
+ }
2640
+ __name(instanceOfJoseKeyPair, "instanceOfJoseKeyPair");
2641
+ function JoseKeyPairFromJSON(json) {
2642
+ return JoseKeyPairFromJSONTyped(json, false);
2643
+ }
2644
+ __name(JoseKeyPairFromJSON, "JoseKeyPairFromJSON");
2645
+ function JoseKeyPairFromJSONTyped(json, ignoreDiscriminator) {
2646
+ if (json == null) {
2647
+ return json;
2648
+ }
2649
+ return {
2650
+ privateJwk: json["privateJwk"] == null ? void 0 : JwkFromJSON(json["privateJwk"]),
2651
+ publicJwk: JwkFromJSON(json["publicJwk"])
2652
+ };
2653
+ }
2654
+ __name(JoseKeyPairFromJSONTyped, "JoseKeyPairFromJSONTyped");
2655
+ function JoseKeyPairToJSON(json) {
2656
+ return JoseKeyPairToJSONTyped(json, false);
2657
+ }
2658
+ __name(JoseKeyPairToJSON, "JoseKeyPairToJSON");
2659
+ function JoseKeyPairToJSONTyped(value, ignoreDiscriminator = false) {
2660
+ if (value == null) {
2661
+ return value;
2662
+ }
2663
+ return {
2664
+ privateJwk: JwkToJSON(value["privateJwk"]),
2665
+ publicJwk: JwkToJSON(value["publicJwk"])
2666
+ };
2667
+ }
2668
+ __name(JoseKeyPairToJSONTyped, "JoseKeyPairToJSONTyped");
2669
+
2670
+ // src/models/ManagedKeyPair.ts
2671
+ function instanceOfManagedKeyPair(value) {
2672
+ if (!("providerId" in value) || value["providerId"] === void 0) return false;
2673
+ if (!("alias" in value) || value["alias"] === void 0) return false;
2674
+ if (!("cose" in value) || value["cose"] === void 0) return false;
2675
+ if (!("jose" in value) || value["jose"] === void 0) return false;
2676
+ return true;
2677
+ }
2678
+ __name(instanceOfManagedKeyPair, "instanceOfManagedKeyPair");
2679
+ function ManagedKeyPairFromJSON(json) {
2680
+ return ManagedKeyPairFromJSONTyped(json, false);
2681
+ }
2682
+ __name(ManagedKeyPairFromJSON, "ManagedKeyPairFromJSON");
2683
+ function ManagedKeyPairFromJSONTyped(json, ignoreDiscriminator) {
2684
+ if (json == null) {
2685
+ return json;
2686
+ }
2687
+ return {
2688
+ kid: json["kid"] == null ? void 0 : json["kid"],
2689
+ providerId: json["providerId"],
2690
+ alias: json["alias"],
2691
+ cose: CoseKeyPairFromJSON(json["cose"]),
2692
+ jose: JoseKeyPairFromJSON(json["jose"])
2693
+ };
2694
+ }
2695
+ __name(ManagedKeyPairFromJSONTyped, "ManagedKeyPairFromJSONTyped");
2696
+ function ManagedKeyPairToJSON(json) {
2697
+ return ManagedKeyPairToJSONTyped(json, false);
2698
+ }
2699
+ __name(ManagedKeyPairToJSON, "ManagedKeyPairToJSON");
2700
+ function ManagedKeyPairToJSONTyped(value, ignoreDiscriminator = false) {
2701
+ if (value == null) {
2702
+ return value;
2703
+ }
2704
+ return {
2705
+ kid: value["kid"],
2706
+ providerId: value["providerId"],
2707
+ alias: value["alias"],
2708
+ cose: CoseKeyPairToJSON(value["cose"]),
2709
+ jose: JoseKeyPairToJSON(value["jose"])
2710
+ };
2711
+ }
2712
+ __name(ManagedKeyPairToJSONTyped, "ManagedKeyPairToJSONTyped");
2713
+
2714
+ // src/models/GenerateKeyResponse.ts
2715
+ function instanceOfGenerateKeyResponse(value) {
2716
+ if (!("keyPair" in value) || value["keyPair"] === void 0) return false;
2717
+ return true;
2718
+ }
2719
+ __name(instanceOfGenerateKeyResponse, "instanceOfGenerateKeyResponse");
2720
+ function GenerateKeyResponseFromJSON(json) {
2721
+ return GenerateKeyResponseFromJSONTyped(json, false);
2722
+ }
2723
+ __name(GenerateKeyResponseFromJSON, "GenerateKeyResponseFromJSON");
2724
+ function GenerateKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
2725
+ if (json == null) {
2726
+ return json;
2727
+ }
2728
+ return {
2729
+ keyPair: ManagedKeyPairFromJSON(json["keyPair"])
2730
+ };
2731
+ }
2732
+ __name(GenerateKeyResponseFromJSONTyped, "GenerateKeyResponseFromJSONTyped");
2733
+ function GenerateKeyResponseToJSON(json) {
2734
+ return GenerateKeyResponseToJSONTyped(json, false);
2735
+ }
2736
+ __name(GenerateKeyResponseToJSON, "GenerateKeyResponseToJSON");
2737
+ function GenerateKeyResponseToJSONTyped(value, ignoreDiscriminator = false) {
2738
+ if (value == null) {
2739
+ return value;
2740
+ }
2741
+ return {
2742
+ keyPair: ManagedKeyPairToJSON(value["keyPair"])
2743
+ };
2744
+ }
2745
+ __name(GenerateKeyResponseToJSONTyped, "GenerateKeyResponseToJSONTyped");
2746
+
2747
+ // src/models/ManagedKeyInfo.ts
2748
+ function instanceOfManagedKeyInfo(value) {
2749
+ if (!("key" in value) || value["key"] === void 0) return false;
2750
+ if (!("alias" in value) || value["alias"] === void 0) return false;
2751
+ if (!("providerId" in value) || value["providerId"] === void 0) return false;
2752
+ return true;
2753
+ }
2754
+ __name(instanceOfManagedKeyInfo, "instanceOfManagedKeyInfo");
2755
+ function ManagedKeyInfoFromJSON(json) {
2756
+ return ManagedKeyInfoFromJSONTyped(json, false);
2757
+ }
2758
+ __name(ManagedKeyInfoFromJSON, "ManagedKeyInfoFromJSON");
2759
+ function ManagedKeyInfoFromJSONTyped(json, ignoreDiscriminator) {
2760
+ if (json == null) {
2761
+ return json;
2762
+ }
2763
+ return {
2764
+ kid: json["kid"] == null ? void 0 : json["kid"],
2765
+ key: JwkFromJSON(json["key"]),
2766
+ signatureAlgorithm: json["signatureAlgorithm"] == null ? void 0 : SignatureAlgorithmFromJSON(json["signatureAlgorithm"]),
2767
+ keyVisibility: json["keyVisibility"] == null ? void 0 : KeyVisibilityFromJSON(json["keyVisibility"]),
2768
+ x5c: json["x5c"] == null ? void 0 : json["x5c"],
2769
+ alias: json["alias"],
2770
+ providerId: json["providerId"],
2771
+ keyType: json["keyType"] == null ? void 0 : KeyTypeFromJSON(json["keyType"]),
2772
+ keyEncoding: json["keyEncoding"] == null ? void 0 : KeyEncodingFromJSON(json["keyEncoding"]),
2773
+ opts: json["opts"] == null ? void 0 : json["opts"]
2774
+ };
2775
+ }
2776
+ __name(ManagedKeyInfoFromJSONTyped, "ManagedKeyInfoFromJSONTyped");
2777
+ function ManagedKeyInfoToJSON(json) {
2778
+ return ManagedKeyInfoToJSONTyped(json, false);
2779
+ }
2780
+ __name(ManagedKeyInfoToJSON, "ManagedKeyInfoToJSON");
2781
+ function ManagedKeyInfoToJSONTyped(value, ignoreDiscriminator = false) {
2782
+ if (value == null) {
2783
+ return value;
2784
+ }
2785
+ return {
2786
+ kid: value["kid"],
2787
+ key: JwkToJSON(value["key"]),
2788
+ signatureAlgorithm: SignatureAlgorithmToJSON(value["signatureAlgorithm"]),
2789
+ keyVisibility: KeyVisibilityToJSON(value["keyVisibility"]),
2790
+ x5c: value["x5c"],
2791
+ alias: value["alias"],
2792
+ providerId: value["providerId"],
2793
+ keyType: KeyTypeToJSON(value["keyType"]),
2794
+ keyEncoding: KeyEncodingToJSON(value["keyEncoding"]),
2795
+ opts: value["opts"]
2796
+ };
2797
+ }
2798
+ __name(ManagedKeyInfoToJSONTyped, "ManagedKeyInfoToJSONTyped");
2799
+
2800
+ // src/models/GetKeyResponse.ts
2801
+ function instanceOfGetKeyResponse(value) {
2802
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
2803
+ return true;
2804
+ }
2805
+ __name(instanceOfGetKeyResponse, "instanceOfGetKeyResponse");
2806
+ function GetKeyResponseFromJSON(json) {
2807
+ return GetKeyResponseFromJSONTyped(json, false);
2808
+ }
2809
+ __name(GetKeyResponseFromJSON, "GetKeyResponseFromJSON");
2810
+ function GetKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
2811
+ if (json == null) {
2812
+ return json;
2813
+ }
2814
+ return {
2815
+ keyInfo: ManagedKeyInfoFromJSON(json["keyInfo"])
2816
+ };
2817
+ }
2818
+ __name(GetKeyResponseFromJSONTyped, "GetKeyResponseFromJSONTyped");
2819
+ function GetKeyResponseToJSON(json) {
2820
+ return GetKeyResponseToJSONTyped(json, false);
2821
+ }
2822
+ __name(GetKeyResponseToJSON, "GetKeyResponseToJSON");
2823
+ function GetKeyResponseToJSONTyped(value, ignoreDiscriminator = false) {
2824
+ if (value == null) {
2825
+ return value;
2826
+ }
2827
+ return {
2828
+ keyInfo: ManagedKeyInfoToJSON(value["keyInfo"])
2829
+ };
2830
+ }
2831
+ __name(GetKeyResponseToJSONTyped, "GetKeyResponseToJSONTyped");
2832
+
2833
+ // src/models/IdentifierMethod.ts
2834
+ var IdentifierMethod = {
2835
+ Jwk: "JWK",
2836
+ Kid: "KID",
2837
+ CoseKey: "COSE_KEY",
2838
+ X5C: "X5C",
2839
+ Did: "DID"
2840
+ };
2841
+ function instanceOfIdentifierMethod(value) {
2842
+ for (const key in IdentifierMethod) {
2843
+ if (Object.prototype.hasOwnProperty.call(IdentifierMethod, key)) {
2844
+ if (IdentifierMethod[key] === value) {
2845
+ return true;
2846
+ }
2847
+ }
2848
+ }
2849
+ return false;
2850
+ }
2851
+ __name(instanceOfIdentifierMethod, "instanceOfIdentifierMethod");
2852
+ function IdentifierMethodFromJSON(json) {
2853
+ return IdentifierMethodFromJSONTyped(json, false);
2854
+ }
2855
+ __name(IdentifierMethodFromJSON, "IdentifierMethodFromJSON");
2856
+ function IdentifierMethodFromJSONTyped(json, ignoreDiscriminator) {
2857
+ return json;
2858
+ }
2859
+ __name(IdentifierMethodFromJSONTyped, "IdentifierMethodFromJSONTyped");
2860
+ function IdentifierMethodToJSON(value) {
2861
+ return value;
2862
+ }
2863
+ __name(IdentifierMethodToJSON, "IdentifierMethodToJSON");
2864
+ function IdentifierMethodToJSONTyped(value, ignoreDiscriminator) {
2865
+ return value;
2866
+ }
2867
+ __name(IdentifierMethodToJSONTyped, "IdentifierMethodToJSONTyped");
2868
+
2869
+ // src/models/KeyProvider.ts
2870
+ function instanceOfKeyProvider(value) {
2871
+ if (!("providerId" in value) || value["providerId"] === void 0) return false;
2872
+ if (!("type" in value) || value["type"] === void 0) return false;
2873
+ return true;
2874
+ }
2875
+ __name(instanceOfKeyProvider, "instanceOfKeyProvider");
2876
+ function KeyProviderFromJSON(json) {
2877
+ return KeyProviderFromJSONTyped(json, false);
2878
+ }
2879
+ __name(KeyProviderFromJSON, "KeyProviderFromJSON");
2880
+ function KeyProviderFromJSONTyped(json, ignoreDiscriminator) {
2881
+ if (json == null) {
2882
+ return json;
2883
+ }
2884
+ return {
2885
+ providerId: json["providerId"],
2886
+ type: KeyProviderTypeFromJSON(json["type"])
2887
+ };
2888
+ }
2889
+ __name(KeyProviderFromJSONTyped, "KeyProviderFromJSONTyped");
2890
+ function KeyProviderToJSON(json) {
2891
+ return KeyProviderToJSONTyped(json, false);
2892
+ }
2893
+ __name(KeyProviderToJSON, "KeyProviderToJSON");
2894
+ function KeyProviderToJSONTyped(value, ignoreDiscriminator = false) {
2895
+ if (value == null) {
2896
+ return value;
2897
+ }
2898
+ return {
2899
+ providerId: value["providerId"],
2900
+ type: KeyProviderTypeToJSON(value["type"])
2901
+ };
2902
+ }
2903
+ __name(KeyProviderToJSONTyped, "KeyProviderToJSONTyped");
2904
+
2905
+ // src/models/KeyProviderResponse.ts
2906
+ function instanceOfKeyProviderResponse(value) {
2907
+ if (!("providerId" in value) || value["providerId"] === void 0) return false;
2908
+ if (!("type" in value) || value["type"] === void 0) return false;
2909
+ return true;
2910
+ }
2911
+ __name(instanceOfKeyProviderResponse, "instanceOfKeyProviderResponse");
2912
+ function KeyProviderResponseFromJSON(json) {
2913
+ return KeyProviderResponseFromJSONTyped(json, false);
2914
+ }
2915
+ __name(KeyProviderResponseFromJSON, "KeyProviderResponseFromJSON");
2916
+ function KeyProviderResponseFromJSONTyped(json, ignoreDiscriminator) {
2917
+ if (json == null) {
2918
+ return json;
2919
+ }
2920
+ return {
2921
+ providerId: json["providerId"],
2922
+ type: KeyProviderTypeFromJSON(json["type"])
2923
+ };
2924
+ }
2925
+ __name(KeyProviderResponseFromJSONTyped, "KeyProviderResponseFromJSONTyped");
2926
+ function KeyProviderResponseToJSON(json) {
2927
+ return KeyProviderResponseToJSONTyped(json, false);
2928
+ }
2929
+ __name(KeyProviderResponseToJSON, "KeyProviderResponseToJSON");
2930
+ function KeyProviderResponseToJSONTyped(value, ignoreDiscriminator = false) {
2931
+ if (value == null) {
2932
+ return value;
2933
+ }
2934
+ return {
2935
+ providerId: value["providerId"],
2936
+ type: KeyProviderTypeToJSON(value["type"])
2937
+ };
2938
+ }
2939
+ __name(KeyProviderResponseToJSONTyped, "KeyProviderResponseToJSONTyped");
2940
+
2941
+ // src/models/KeyResolver.ts
2942
+ function instanceOfKeyResolver(value) {
2943
+ if (!("resolverId" in value) || value["resolverId"] === void 0) return false;
2944
+ return true;
2945
+ }
2946
+ __name(instanceOfKeyResolver, "instanceOfKeyResolver");
2947
+ function KeyResolverFromJSON(json) {
2948
+ return KeyResolverFromJSONTyped(json, false);
2949
+ }
2950
+ __name(KeyResolverFromJSON, "KeyResolverFromJSON");
2951
+ function KeyResolverFromJSONTyped(json, ignoreDiscriminator) {
2952
+ if (json == null) {
2953
+ return json;
2954
+ }
2955
+ return {
2956
+ resolverId: json["resolverId"],
2957
+ supportedIdentifierMethods: json["supportedIdentifierMethods"] == null ? void 0 : json["supportedIdentifierMethods"].map(IdentifierMethodFromJSON),
2958
+ supportedKeyTypes: json["supportedKeyTypes"] == null ? void 0 : json["supportedKeyTypes"].map(KeyTypeFromJSON)
2959
+ };
2960
+ }
2961
+ __name(KeyResolverFromJSONTyped, "KeyResolverFromJSONTyped");
2962
+ function KeyResolverToJSON(json) {
2963
+ return KeyResolverToJSONTyped(json, false);
2964
+ }
2965
+ __name(KeyResolverToJSON, "KeyResolverToJSON");
2966
+ function KeyResolverToJSONTyped(value, ignoreDiscriminator = false) {
2967
+ if (value == null) {
2968
+ return value;
2969
+ }
2970
+ return {
2971
+ resolverId: value["resolverId"],
2972
+ supportedIdentifierMethods: value["supportedIdentifierMethods"] == null ? void 0 : value["supportedIdentifierMethods"].map(IdentifierMethodToJSON),
2973
+ supportedKeyTypes: value["supportedKeyTypes"] == null ? void 0 : value["supportedKeyTypes"].map(KeyTypeToJSON)
2974
+ };
2975
+ }
2976
+ __name(KeyResolverToJSONTyped, "KeyResolverToJSONTyped");
2977
+
2978
+ // src/models/ListKeyProvidersResponse.ts
2979
+ function instanceOfListKeyProvidersResponse(value) {
2980
+ if (!("providers" in value) || value["providers"] === void 0) return false;
2981
+ return true;
2982
+ }
2983
+ __name(instanceOfListKeyProvidersResponse, "instanceOfListKeyProvidersResponse");
2984
+ function ListKeyProvidersResponseFromJSON(json) {
2985
+ return ListKeyProvidersResponseFromJSONTyped(json, false);
2986
+ }
2987
+ __name(ListKeyProvidersResponseFromJSON, "ListKeyProvidersResponseFromJSON");
2988
+ function ListKeyProvidersResponseFromJSONTyped(json, ignoreDiscriminator) {
2989
+ if (json == null) {
2990
+ return json;
2991
+ }
2992
+ return {
2993
+ providers: json["providers"].map(KeyProviderFromJSON)
2994
+ };
2995
+ }
2996
+ __name(ListKeyProvidersResponseFromJSONTyped, "ListKeyProvidersResponseFromJSONTyped");
2997
+ function ListKeyProvidersResponseToJSON(json) {
2998
+ return ListKeyProvidersResponseToJSONTyped(json, false);
2999
+ }
3000
+ __name(ListKeyProvidersResponseToJSON, "ListKeyProvidersResponseToJSON");
3001
+ function ListKeyProvidersResponseToJSONTyped(value, ignoreDiscriminator = false) {
3002
+ if (value == null) {
3003
+ return value;
3004
+ }
3005
+ return {
3006
+ providers: value["providers"].map(KeyProviderToJSON)
3007
+ };
3008
+ }
3009
+ __name(ListKeyProvidersResponseToJSONTyped, "ListKeyProvidersResponseToJSONTyped");
3010
+
3011
+ // src/models/ListKeysResponse.ts
3012
+ function instanceOfListKeysResponse(value) {
3013
+ if (!("keyInfos" in value) || value["keyInfos"] === void 0) return false;
3014
+ return true;
3015
+ }
3016
+ __name(instanceOfListKeysResponse, "instanceOfListKeysResponse");
3017
+ function ListKeysResponseFromJSON(json) {
3018
+ return ListKeysResponseFromJSONTyped(json, false);
3019
+ }
3020
+ __name(ListKeysResponseFromJSON, "ListKeysResponseFromJSON");
3021
+ function ListKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
3022
+ if (json == null) {
3023
+ return json;
3024
+ }
3025
+ return {
3026
+ keyInfos: json["keyInfos"].map(ManagedKeyInfoFromJSON)
3027
+ };
3028
+ }
3029
+ __name(ListKeysResponseFromJSONTyped, "ListKeysResponseFromJSONTyped");
3030
+ function ListKeysResponseToJSON(json) {
3031
+ return ListKeysResponseToJSONTyped(json, false);
3032
+ }
3033
+ __name(ListKeysResponseToJSON, "ListKeysResponseToJSON");
3034
+ function ListKeysResponseToJSONTyped(value, ignoreDiscriminator = false) {
3035
+ if (value == null) {
3036
+ return value;
3037
+ }
3038
+ return {
3039
+ keyInfos: value["keyInfos"].map(ManagedKeyInfoToJSON)
3040
+ };
3041
+ }
3042
+ __name(ListKeysResponseToJSONTyped, "ListKeysResponseToJSONTyped");
3043
+
3044
+ // src/models/Resolver.ts
3045
+ function instanceOfResolver(value) {
3046
+ if (!("resolverId" in value) || value["resolverId"] === void 0) return false;
3047
+ return true;
3048
+ }
3049
+ __name(instanceOfResolver, "instanceOfResolver");
3050
+ function ResolverFromJSON(json) {
3051
+ return ResolverFromJSONTyped(json, false);
3052
+ }
3053
+ __name(ResolverFromJSON, "ResolverFromJSON");
3054
+ function ResolverFromJSONTyped(json, ignoreDiscriminator) {
3055
+ if (json == null) {
3056
+ return json;
3057
+ }
3058
+ return {
3059
+ resolverId: json["resolverId"],
3060
+ supportedIdentifierMethods: json["supportedIdentifierMethods"] == null ? void 0 : json["supportedIdentifierMethods"].map(IdentifierMethodFromJSON),
3061
+ supportedKeyTypes: json["supportedKeyTypes"] == null ? void 0 : json["supportedKeyTypes"].map(KeyTypeFromJSON)
3062
+ };
3063
+ }
3064
+ __name(ResolverFromJSONTyped, "ResolverFromJSONTyped");
3065
+ function ResolverToJSON(json) {
3066
+ return ResolverToJSONTyped(json, false);
3067
+ }
3068
+ __name(ResolverToJSON, "ResolverToJSON");
3069
+ function ResolverToJSONTyped(value, ignoreDiscriminator = false) {
3070
+ if (value == null) {
3071
+ return value;
3072
+ }
3073
+ return {
3074
+ resolverId: value["resolverId"],
3075
+ supportedIdentifierMethods: value["supportedIdentifierMethods"] == null ? void 0 : value["supportedIdentifierMethods"].map(IdentifierMethodToJSON),
3076
+ supportedKeyTypes: value["supportedKeyTypes"] == null ? void 0 : value["supportedKeyTypes"].map(KeyTypeToJSON)
3077
+ };
3078
+ }
3079
+ __name(ResolverToJSONTyped, "ResolverToJSONTyped");
3080
+
3081
+ // src/models/ListResolversResponse.ts
3082
+ function instanceOfListResolversResponse(value) {
3083
+ if (!("resolvers" in value) || value["resolvers"] === void 0) return false;
3084
+ return true;
3085
+ }
3086
+ __name(instanceOfListResolversResponse, "instanceOfListResolversResponse");
3087
+ function ListResolversResponseFromJSON(json) {
3088
+ return ListResolversResponseFromJSONTyped(json, false);
3089
+ }
3090
+ __name(ListResolversResponseFromJSON, "ListResolversResponseFromJSON");
3091
+ function ListResolversResponseFromJSONTyped(json, ignoreDiscriminator) {
3092
+ if (json == null) {
3093
+ return json;
3094
+ }
3095
+ return {
3096
+ resolvers: json["resolvers"].map(ResolverFromJSON)
3097
+ };
3098
+ }
3099
+ __name(ListResolversResponseFromJSONTyped, "ListResolversResponseFromJSONTyped");
3100
+ function ListResolversResponseToJSON(json) {
3101
+ return ListResolversResponseToJSONTyped(json, false);
3102
+ }
3103
+ __name(ListResolversResponseToJSON, "ListResolversResponseToJSON");
3104
+ function ListResolversResponseToJSONTyped(value, ignoreDiscriminator = false) {
3105
+ if (value == null) {
3106
+ return value;
3107
+ }
3108
+ return {
3109
+ resolvers: value["resolvers"].map(ResolverToJSON)
3110
+ };
3111
+ }
3112
+ __name(ListResolversResponseToJSONTyped, "ListResolversResponseToJSONTyped");
3113
+
3114
+ // src/models/MaskGenFunction.ts
3115
+ var MaskGenFunction = {
3116
+ Mgf1: "MGF1"
3117
+ };
3118
+ function instanceOfMaskGenFunction(value) {
3119
+ for (const key in MaskGenFunction) {
3120
+ if (Object.prototype.hasOwnProperty.call(MaskGenFunction, key)) {
3121
+ if (MaskGenFunction[key] === value) {
3122
+ return true;
3123
+ }
3124
+ }
3125
+ }
3126
+ return false;
3127
+ }
3128
+ __name(instanceOfMaskGenFunction, "instanceOfMaskGenFunction");
3129
+ function MaskGenFunctionFromJSON(json) {
3130
+ return MaskGenFunctionFromJSONTyped(json, false);
3131
+ }
3132
+ __name(MaskGenFunctionFromJSON, "MaskGenFunctionFromJSON");
3133
+ function MaskGenFunctionFromJSONTyped(json, ignoreDiscriminator) {
3134
+ return json;
3135
+ }
3136
+ __name(MaskGenFunctionFromJSONTyped, "MaskGenFunctionFromJSONTyped");
3137
+ function MaskGenFunctionToJSON(value) {
3138
+ return value;
3139
+ }
3140
+ __name(MaskGenFunctionToJSON, "MaskGenFunctionToJSON");
3141
+ function MaskGenFunctionToJSONTyped(value, ignoreDiscriminator) {
3142
+ return value;
3143
+ }
3144
+ __name(MaskGenFunctionToJSONTyped, "MaskGenFunctionToJSONTyped");
3145
+
3146
+ // src/models/ProviderCapabilities.ts
3147
+ function instanceOfProviderCapabilities(value) {
3148
+ return true;
3149
+ }
3150
+ __name(instanceOfProviderCapabilities, "instanceOfProviderCapabilities");
3151
+ function ProviderCapabilitiesFromJSON(json) {
3152
+ return ProviderCapabilitiesFromJSONTyped(json, false);
3153
+ }
3154
+ __name(ProviderCapabilitiesFromJSON, "ProviderCapabilitiesFromJSON");
3155
+ function ProviderCapabilitiesFromJSONTyped(json, ignoreDiscriminator) {
3156
+ if (json == null) {
3157
+ return json;
3158
+ }
3159
+ return {
3160
+ keyTypes: json["keyTypes"] == null ? void 0 : json["keyTypes"].map(KeyTypeFromJSON),
3161
+ signatureAlgorithms: json["signatureAlgorithms"] == null ? void 0 : json["signatureAlgorithms"].map(SignatureAlgorithmFromJSON),
3162
+ digests: json["digests"] == null ? void 0 : json["digests"].map(DigestAlgFromJSON),
3163
+ curves: json["curves"] == null ? void 0 : json["curves"].map(CurveFromJSON),
3164
+ keyOperations: json["keyOperations"] == null ? void 0 : json["keyOperations"].map(KeyOperationsFromJSON)
3165
+ };
3166
+ }
3167
+ __name(ProviderCapabilitiesFromJSONTyped, "ProviderCapabilitiesFromJSONTyped");
3168
+ function ProviderCapabilitiesToJSON(json) {
3169
+ return ProviderCapabilitiesToJSONTyped(json, false);
3170
+ }
3171
+ __name(ProviderCapabilitiesToJSON, "ProviderCapabilitiesToJSON");
3172
+ function ProviderCapabilitiesToJSONTyped(value, ignoreDiscriminator = false) {
3173
+ if (value == null) {
3174
+ return value;
3175
+ }
3176
+ return {
3177
+ keyTypes: value["keyTypes"] == null ? void 0 : value["keyTypes"].map(KeyTypeToJSON),
3178
+ signatureAlgorithms: value["signatureAlgorithms"] == null ? void 0 : value["signatureAlgorithms"].map(SignatureAlgorithmToJSON),
3179
+ digests: value["digests"] == null ? void 0 : value["digests"].map(DigestAlgToJSON),
3180
+ curves: value["curves"] == null ? void 0 : value["curves"].map(CurveToJSON),
3181
+ keyOperations: value["keyOperations"] == null ? void 0 : value["keyOperations"].map(KeyOperationsToJSON)
3182
+ };
3183
+ }
3184
+ __name(ProviderCapabilitiesToJSONTyped, "ProviderCapabilitiesToJSONTyped");
3185
+
3186
+ // src/models/ResolvePublicKey.ts
3187
+ function instanceOfResolvePublicKey(value) {
3188
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
3189
+ return true;
3190
+ }
3191
+ __name(instanceOfResolvePublicKey, "instanceOfResolvePublicKey");
3192
+ function ResolvePublicKeyFromJSON(json) {
3193
+ return ResolvePublicKeyFromJSONTyped(json, false);
3194
+ }
3195
+ __name(ResolvePublicKeyFromJSON, "ResolvePublicKeyFromJSON");
3196
+ function ResolvePublicKeyFromJSONTyped(json, ignoreDiscriminator) {
3197
+ if (json == null) {
3198
+ return json;
3199
+ }
3200
+ return {
3201
+ keyInfo: KeyInfoFromJSON(json["keyInfo"]),
3202
+ identifierMethod: json["identifierMethod"] == null ? void 0 : IdentifierMethodFromJSON(json["identifierMethod"]),
3203
+ trustedCerts: json["trustedCerts"] == null ? void 0 : json["trustedCerts"],
3204
+ verifyX509CertificateChain: json["verifyX509CertificateChain"] == null ? void 0 : json["verifyX509CertificateChain"]
3205
+ };
3206
+ }
3207
+ __name(ResolvePublicKeyFromJSONTyped, "ResolvePublicKeyFromJSONTyped");
3208
+ function ResolvePublicKeyToJSON(json) {
3209
+ return ResolvePublicKeyToJSONTyped(json, false);
3210
+ }
3211
+ __name(ResolvePublicKeyToJSON, "ResolvePublicKeyToJSON");
3212
+ function ResolvePublicKeyToJSONTyped(value, ignoreDiscriminator = false) {
3213
+ if (value == null) {
3214
+ return value;
3215
+ }
3216
+ return {
3217
+ keyInfo: KeyInfoToJSON(value["keyInfo"]),
3218
+ identifierMethod: IdentifierMethodToJSON(value["identifierMethod"]),
3219
+ trustedCerts: value["trustedCerts"],
3220
+ verifyX509CertificateChain: value["verifyX509CertificateChain"]
3221
+ };
3222
+ }
3223
+ __name(ResolvePublicKeyToJSONTyped, "ResolvePublicKeyToJSONTyped");
3224
+
3225
+ // src/models/ResolvedKeyInfo.ts
3226
+ function instanceOfResolvedKeyInfo(value) {
3227
+ if (!("key" in value) || value["key"] === void 0) return false;
3228
+ return true;
3229
+ }
3230
+ __name(instanceOfResolvedKeyInfo, "instanceOfResolvedKeyInfo");
3231
+ function ResolvedKeyInfoFromJSON(json) {
3232
+ return ResolvedKeyInfoFromJSONTyped(json, false);
3233
+ }
3234
+ __name(ResolvedKeyInfoFromJSON, "ResolvedKeyInfoFromJSON");
3235
+ function ResolvedKeyInfoFromJSONTyped(json, ignoreDiscriminator) {
3236
+ if (json == null) {
3237
+ return json;
3238
+ }
3239
+ return {
3240
+ kid: json["kid"] == null ? void 0 : json["kid"],
3241
+ key: JwkFromJSON(json["key"]),
3242
+ signatureAlgorithm: json["signatureAlgorithm"] == null ? void 0 : SignatureAlgorithmFromJSON(json["signatureAlgorithm"]),
3243
+ keyVisibility: json["keyVisibility"] == null ? void 0 : KeyVisibilityFromJSON(json["keyVisibility"]),
3244
+ x5c: json["x5c"] == null ? void 0 : json["x5c"],
3245
+ alias: json["alias"] == null ? void 0 : json["alias"],
3246
+ providerId: json["providerId"] == null ? void 0 : json["providerId"],
3247
+ keyType: json["keyType"] == null ? void 0 : KeyTypeFromJSON(json["keyType"]),
3248
+ keyEncoding: json["keyEncoding"] == null ? void 0 : KeyEncodingFromJSON(json["keyEncoding"]),
3249
+ opts: json["opts"] == null ? void 0 : json["opts"]
3250
+ };
3251
+ }
3252
+ __name(ResolvedKeyInfoFromJSONTyped, "ResolvedKeyInfoFromJSONTyped");
3253
+ function ResolvedKeyInfoToJSON(json) {
3254
+ return ResolvedKeyInfoToJSONTyped(json, false);
3255
+ }
3256
+ __name(ResolvedKeyInfoToJSON, "ResolvedKeyInfoToJSON");
3257
+ function ResolvedKeyInfoToJSONTyped(value, ignoreDiscriminator = false) {
3258
+ if (value == null) {
3259
+ return value;
3260
+ }
3261
+ return {
3262
+ kid: value["kid"],
3263
+ key: JwkToJSON(value["key"]),
3264
+ signatureAlgorithm: SignatureAlgorithmToJSON(value["signatureAlgorithm"]),
3265
+ keyVisibility: KeyVisibilityToJSON(value["keyVisibility"]),
3266
+ x5c: value["x5c"],
3267
+ alias: value["alias"],
3268
+ providerId: value["providerId"],
3269
+ keyType: KeyTypeToJSON(value["keyType"]),
3270
+ keyEncoding: KeyEncodingToJSON(value["keyEncoding"]),
3271
+ opts: value["opts"]
3272
+ };
3273
+ }
3274
+ __name(ResolvedKeyInfoToJSONTyped, "ResolvedKeyInfoToJSONTyped");
3275
+
3276
+ // src/models/Signature.ts
3277
+ function instanceOfSignature(value) {
3278
+ if (!("value" in value) || value["value"] === void 0) return false;
3279
+ if (!("algorithm" in value) || value["algorithm"] === void 0) return false;
3280
+ return true;
3281
+ }
3282
+ __name(instanceOfSignature, "instanceOfSignature");
3283
+ function SignatureFromJSON(json) {
3284
+ return SignatureFromJSONTyped(json, false);
3285
+ }
3286
+ __name(SignatureFromJSON, "SignatureFromJSON");
3287
+ function SignatureFromJSONTyped(json, ignoreDiscriminator) {
3288
+ if (json == null) {
3289
+ return json;
3290
+ }
3291
+ return {
3292
+ value: json["value"],
3293
+ algorithm: SignatureAlgorithmFromJSON(json["algorithm"]),
3294
+ keyInfo: json["keyInfo"] == null ? void 0 : KeyInfoFromJSON(json["keyInfo"]),
3295
+ metadata: json["metadata"] == null ? void 0 : json["metadata"]
3296
+ };
3297
+ }
3298
+ __name(SignatureFromJSONTyped, "SignatureFromJSONTyped");
3299
+ function SignatureToJSON(json) {
3300
+ return SignatureToJSONTyped(json, false);
3301
+ }
3302
+ __name(SignatureToJSON, "SignatureToJSON");
3303
+ function SignatureToJSONTyped(value, ignoreDiscriminator = false) {
3304
+ if (value == null) {
3305
+ return value;
3306
+ }
3307
+ return {
3308
+ value: value["value"],
3309
+ algorithm: SignatureAlgorithmToJSON(value["algorithm"]),
3310
+ keyInfo: KeyInfoToJSON(value["keyInfo"]),
3311
+ metadata: value["metadata"]
3312
+ };
3313
+ }
3314
+ __name(SignatureToJSONTyped, "SignatureToJSONTyped");
3315
+
3316
+ // src/models/SignOutput.ts
3317
+ function instanceOfSignOutput(value) {
3318
+ if (!("signature" in value) || value["signature"] === void 0) return false;
3319
+ return true;
3320
+ }
3321
+ __name(instanceOfSignOutput, "instanceOfSignOutput");
3322
+ function SignOutputFromJSON(json) {
3323
+ return SignOutputFromJSONTyped(json, false);
3324
+ }
3325
+ __name(SignOutputFromJSON, "SignOutputFromJSON");
3326
+ function SignOutputFromJSONTyped(json, ignoreDiscriminator) {
3327
+ if (json == null) {
3328
+ return json;
3329
+ }
3330
+ return {
3331
+ signature: SignatureFromJSON(json["signature"]),
3332
+ metadata: json["metadata"] == null ? void 0 : json["metadata"]
3333
+ };
3334
+ }
3335
+ __name(SignOutputFromJSONTyped, "SignOutputFromJSONTyped");
3336
+ function SignOutputToJSON(json) {
3337
+ return SignOutputToJSONTyped(json, false);
3338
+ }
3339
+ __name(SignOutputToJSON, "SignOutputToJSON");
3340
+ function SignOutputToJSONTyped(value, ignoreDiscriminator = false) {
3341
+ if (value == null) {
3342
+ return value;
3343
+ }
3344
+ return {
3345
+ signature: SignatureToJSON(value["signature"]),
3346
+ metadata: value["metadata"]
3347
+ };
3348
+ }
3349
+ __name(SignOutputToJSONTyped, "SignOutputToJSONTyped");
3350
+
3351
+ // src/models/StoreKey.ts
3352
+ function instanceOfStoreKey(value) {
3353
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
3354
+ return true;
3355
+ }
3356
+ __name(instanceOfStoreKey, "instanceOfStoreKey");
3357
+ function StoreKeyFromJSON(json) {
3358
+ return StoreKeyFromJSONTyped(json, false);
3359
+ }
3360
+ __name(StoreKeyFromJSON, "StoreKeyFromJSON");
3361
+ function StoreKeyFromJSONTyped(json, ignoreDiscriminator) {
3362
+ if (json == null) {
3363
+ return json;
3364
+ }
3365
+ return {
3366
+ keyInfo: ResolvedKeyInfoFromJSON(json["keyInfo"]),
3367
+ certChain: json["certChain"] == null ? void 0 : json["certChain"]
3368
+ };
3369
+ }
3370
+ __name(StoreKeyFromJSONTyped, "StoreKeyFromJSONTyped");
3371
+ function StoreKeyToJSON(json) {
3372
+ return StoreKeyToJSONTyped(json, false);
3373
+ }
3374
+ __name(StoreKeyToJSON, "StoreKeyToJSON");
3375
+ function StoreKeyToJSONTyped(value, ignoreDiscriminator = false) {
3376
+ if (value == null) {
3377
+ return value;
3378
+ }
3379
+ return {
3380
+ keyInfo: ResolvedKeyInfoToJSON(value["keyInfo"]),
3381
+ certChain: value["certChain"]
3382
+ };
3383
+ }
3384
+ __name(StoreKeyToJSONTyped, "StoreKeyToJSONTyped");
3385
+
3386
+ // src/models/StoreKeyResponse.ts
3387
+ function instanceOfStoreKeyResponse(value) {
3388
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
3389
+ return true;
3390
+ }
3391
+ __name(instanceOfStoreKeyResponse, "instanceOfStoreKeyResponse");
3392
+ function StoreKeyResponseFromJSON(json) {
3393
+ return StoreKeyResponseFromJSONTyped(json, false);
3394
+ }
3395
+ __name(StoreKeyResponseFromJSON, "StoreKeyResponseFromJSON");
3396
+ function StoreKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
3397
+ if (json == null) {
3398
+ return json;
3399
+ }
3400
+ return {
3401
+ keyInfo: ManagedKeyInfoFromJSON(json["keyInfo"])
3402
+ };
3403
+ }
3404
+ __name(StoreKeyResponseFromJSONTyped, "StoreKeyResponseFromJSONTyped");
3405
+ function StoreKeyResponseToJSON(json) {
3406
+ return StoreKeyResponseToJSONTyped(json, false);
3407
+ }
3408
+ __name(StoreKeyResponseToJSON, "StoreKeyResponseToJSON");
3409
+ function StoreKeyResponseToJSONTyped(value, ignoreDiscriminator = false) {
3410
+ if (value == null) {
3411
+ return value;
3412
+ }
3413
+ return {
3414
+ keyInfo: ManagedKeyInfoToJSON(value["keyInfo"])
3415
+ };
3416
+ }
3417
+ __name(StoreKeyResponseToJSONTyped, "StoreKeyResponseToJSONTyped");
3418
+
3419
+ // src/models/UpdateKeyProvider.ts
3420
+ function instanceOfUpdateKeyProvider(value) {
3421
+ return true;
3422
+ }
3423
+ __name(instanceOfUpdateKeyProvider, "instanceOfUpdateKeyProvider");
3424
+ function UpdateKeyProviderFromJSON(json) {
3425
+ return UpdateKeyProviderFromJSONTyped(json, false);
3426
+ }
3427
+ __name(UpdateKeyProviderFromJSON, "UpdateKeyProviderFromJSON");
3428
+ function UpdateKeyProviderFromJSONTyped(json, ignoreDiscriminator) {
3429
+ if (json == null) {
3430
+ return json;
3431
+ }
3432
+ return {
3433
+ azureKeyvaultSettings: json["azureKeyvaultSettings"] == null ? void 0 : AzureKeyVaultSettingFromJSON(json["azureKeyvaultSettings"]),
3434
+ awsKmsSettings: json["awsKmsSettings"] == null ? void 0 : AwsKmsSettingFromJSON(json["awsKmsSettings"]),
3435
+ cacheEnabled: json["cacheEnabled"] == null ? void 0 : json["cacheEnabled"],
3436
+ cacheTTLInSeconds: json["cacheTTLInSeconds"] == null ? void 0 : json["cacheTTLInSeconds"]
3437
+ };
3438
+ }
3439
+ __name(UpdateKeyProviderFromJSONTyped, "UpdateKeyProviderFromJSONTyped");
3440
+ function UpdateKeyProviderToJSON(json) {
3441
+ return UpdateKeyProviderToJSONTyped(json, false);
3442
+ }
3443
+ __name(UpdateKeyProviderToJSON, "UpdateKeyProviderToJSON");
3444
+ function UpdateKeyProviderToJSONTyped(value, ignoreDiscriminator = false) {
3445
+ if (value == null) {
3446
+ return value;
3447
+ }
3448
+ return {
3449
+ azureKeyvaultSettings: AzureKeyVaultSettingToJSON(value["azureKeyvaultSettings"]),
3450
+ awsKmsSettings: AwsKmsSettingToJSON(value["awsKmsSettings"]),
3451
+ cacheEnabled: value["cacheEnabled"],
3452
+ cacheTTLInSeconds: value["cacheTTLInSeconds"]
3453
+ };
3454
+ }
3455
+ __name(UpdateKeyProviderToJSONTyped, "UpdateKeyProviderToJSONTyped");
3456
+
3457
+ // src/models/VerifyRawSignature.ts
3458
+ function instanceOfVerifyRawSignature(value) {
3459
+ if (!("keyInfo" in value) || value["keyInfo"] === void 0) return false;
3460
+ if (!("input" in value) || value["input"] === void 0) return false;
3461
+ if (!("signature" in value) || value["signature"] === void 0) return false;
3462
+ return true;
3463
+ }
3464
+ __name(instanceOfVerifyRawSignature, "instanceOfVerifyRawSignature");
3465
+ function VerifyRawSignatureFromJSON(json) {
3466
+ return VerifyRawSignatureFromJSONTyped(json, false);
3467
+ }
3468
+ __name(VerifyRawSignatureFromJSON, "VerifyRawSignatureFromJSON");
3469
+ function VerifyRawSignatureFromJSONTyped(json, ignoreDiscriminator) {
3470
+ if (json == null) {
3471
+ return json;
3472
+ }
3473
+ return {
3474
+ keyInfo: KeyInfoFromJSON(json["keyInfo"]),
3475
+ input: json["input"],
3476
+ signature: json["signature"]
3477
+ };
3478
+ }
3479
+ __name(VerifyRawSignatureFromJSONTyped, "VerifyRawSignatureFromJSONTyped");
3480
+ function VerifyRawSignatureToJSON(json) {
3481
+ return VerifyRawSignatureToJSONTyped(json, false);
3482
+ }
3483
+ __name(VerifyRawSignatureToJSON, "VerifyRawSignatureToJSON");
3484
+ function VerifyRawSignatureToJSONTyped(value, ignoreDiscriminator = false) {
3485
+ if (value == null) {
3486
+ return value;
3487
+ }
3488
+ return {
3489
+ keyInfo: KeyInfoToJSON(value["keyInfo"]),
3490
+ input: value["input"],
3491
+ signature: value["signature"]
3492
+ };
3493
+ }
3494
+ __name(VerifyRawSignatureToJSONTyped, "VerifyRawSignatureToJSONTyped");
3495
+
3496
+ // src/models/VerifyRawSignatureResponse.ts
3497
+ function instanceOfVerifyRawSignatureResponse(value) {
3498
+ if (!("isValid" in value) || value["isValid"] === void 0) return false;
3499
+ return true;
3500
+ }
3501
+ __name(instanceOfVerifyRawSignatureResponse, "instanceOfVerifyRawSignatureResponse");
3502
+ function VerifyRawSignatureResponseFromJSON(json) {
3503
+ return VerifyRawSignatureResponseFromJSONTyped(json, false);
3504
+ }
3505
+ __name(VerifyRawSignatureResponseFromJSON, "VerifyRawSignatureResponseFromJSON");
3506
+ function VerifyRawSignatureResponseFromJSONTyped(json, ignoreDiscriminator) {
3507
+ if (json == null) {
3508
+ return json;
3509
+ }
3510
+ return {
3511
+ isValid: json["isValid"]
3512
+ };
3513
+ }
3514
+ __name(VerifyRawSignatureResponseFromJSONTyped, "VerifyRawSignatureResponseFromJSONTyped");
3515
+ function VerifyRawSignatureResponseToJSON(json) {
3516
+ return VerifyRawSignatureResponseToJSONTyped(json, false);
3517
+ }
3518
+ __name(VerifyRawSignatureResponseToJSON, "VerifyRawSignatureResponseToJSON");
3519
+ function VerifyRawSignatureResponseToJSONTyped(value, ignoreDiscriminator = false) {
3520
+ if (value == null) {
3521
+ return value;
3522
+ }
3523
+ return {
3524
+ isValid: value["isValid"]
3525
+ };
3526
+ }
3527
+ __name(VerifyRawSignatureResponseToJSONTyped, "VerifyRawSignatureResponseToJSONTyped");
3528
+
3529
+ // src/models/VerifySimpleSignature.ts
3530
+ function instanceOfVerifySimpleSignature(value) {
3531
+ if (!("signInput" in value) || value["signInput"] === void 0) return false;
3532
+ if (!("signature" in value) || value["signature"] === void 0) return false;
3533
+ return true;
3534
+ }
3535
+ __name(instanceOfVerifySimpleSignature, "instanceOfVerifySimpleSignature");
3536
+ function VerifySimpleSignatureFromJSON(json) {
3537
+ return VerifySimpleSignatureFromJSONTyped(json, false);
3538
+ }
3539
+ __name(VerifySimpleSignatureFromJSON, "VerifySimpleSignatureFromJSON");
3540
+ function VerifySimpleSignatureFromJSONTyped(json, ignoreDiscriminator) {
3541
+ if (json == null) {
3542
+ return json;
3543
+ }
3544
+ return {
3545
+ signInput: SignInputFromJSON(json["signInput"]),
3546
+ signature: SignatureFromJSON(json["signature"])
3547
+ };
3548
+ }
3549
+ __name(VerifySimpleSignatureFromJSONTyped, "VerifySimpleSignatureFromJSONTyped");
3550
+ function VerifySimpleSignatureToJSON(json) {
3551
+ return VerifySimpleSignatureToJSONTyped(json, false);
3552
+ }
3553
+ __name(VerifySimpleSignatureToJSON, "VerifySimpleSignatureToJSON");
3554
+ function VerifySimpleSignatureToJSONTyped(value, ignoreDiscriminator = false) {
3555
+ if (value == null) {
3556
+ return value;
3557
+ }
3558
+ return {
3559
+ signInput: SignInputToJSON(value["signInput"]),
3560
+ signature: SignatureToJSON(value["signature"])
3561
+ };
3562
+ }
3563
+ __name(VerifySimpleSignatureToJSONTyped, "VerifySimpleSignatureToJSONTyped");
3564
+
3565
+ // src/agent/KmsRestClient.ts
3566
+ var logger = import_ssi_types.Loggers.DEFAULT.get("sphereon:ssi-sdk:kms:rest-client");
3567
+ var KmsRestClient = class _KmsRestClient {
3568
+ static {
3569
+ __name(this, "KmsRestClient");
3570
+ }
3571
+ methods = {
3572
+ kmsClientGetKey: this.kmsClientGetKey.bind(this),
3573
+ kmsClientListKeys: this.kmsClientListKeys.bind(this),
3574
+ kmsClientStoreKey: this.kmsClientStoreKey.bind(this),
3575
+ kmsClientGenerateKey: this.kmsClientGenerateKey.bind(this),
3576
+ kmsClientDeleteKey: this.kmsClientDeleteKey.bind(this),
3577
+ kmsClientGetKeyProvider: this.kmsClientGetKeyProvider.bind(this),
3578
+ kmsClientListKeyProviders: this.kmsClientListKeyProviders.bind(this),
3579
+ kmsClientProviderListKeys: this.kmsClientProviderListKeys.bind(this),
3580
+ kmsClientProviderStoreKey: this.kmsClientProviderStoreKey.bind(this),
3581
+ kmsClientProviderGenerateKey: this.kmsClientProviderGenerateKey.bind(this),
3582
+ kmsClientProviderGetKey: this.kmsClientProviderGetKey.bind(this),
3583
+ kmsClientProviderDeleteKey: this.kmsClientProviderDeleteKey.bind(this),
3584
+ kmsClientGetResolver: this.kmsClientGetResolver.bind(this),
3585
+ kmsClientListResolvers: this.kmsClientListResolvers.bind(this),
3586
+ kmsClientResolveKey: this.kmsClientResolveKey.bind(this),
3587
+ kmsClientCreateRawSignature: this.kmsClientCreateRawSignature.bind(this),
3588
+ kmsClientIsValidRawSignature: this.kmsClientIsValidRawSignature.bind(this)
3589
+ };
3590
+ agentBaseUrl;
3591
+ authOpts;
3592
+ constructor(args) {
3593
+ if (args?.baseUrl) {
3594
+ this.agentBaseUrl = args.baseUrl;
3595
+ }
3596
+ this.authOpts = args?.authentication;
3597
+ }
3598
+ static urlWithBase(path, baseUrl) {
3599
+ return `${baseUrl}${path.startsWith("/") ? path : `/${path}`}`;
3600
+ }
3601
+ /** {@inheritDoc IKmsRestClient.kmsGetResolver} */
3602
+ async kmsClientGetResolver(args) {
3603
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3604
+ const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
3605
+ const response = await (0, import_cross_fetch.fetch)(url, {
3606
+ method: "GET"
3607
+ });
3608
+ logger.debug(`get resolver response: ${response}`);
3609
+ try {
3610
+ return ResolverFromJSONTyped(await response.json(), false);
3611
+ } catch (error) {
3612
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3613
+ }
3614
+ }
3615
+ /** {@inheritDoc IKmsRestClient.kmsListResolvers} */
3616
+ async kmsClientListResolvers(args) {
3617
+ const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
3618
+ const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
3619
+ const response = await (0, import_cross_fetch.fetch)(url, {
3620
+ method: "GET"
3621
+ });
3622
+ logger.debug(`list resolvers response: ${response}`);
3623
+ try {
3624
+ return ListResolversResponseFromJSONTyped(await response.json(), false);
3625
+ } catch (error) {
3626
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3627
+ }
3628
+ }
3629
+ /** {@inheritDoc IKmsRestClient.kmsResolveKey} */
3630
+ async kmsClientResolveKey(args) {
3631
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3632
+ const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}/resolve`, baseUrl);
3633
+ const body = {
3634
+ keyInfo: args.keyInfo,
3635
+ identifierMethod: args.identifierMethod,
3636
+ trustedCerts: args.trustedCerts,
3637
+ verifyX509CertificateChain: args.verifyX509CertificateChain
3638
+ };
3639
+ const response = await (0, import_cross_fetch.fetch)(url, {
3640
+ method: "POST",
3641
+ headers: await this.createHeaders({
3642
+ "Content-Type": "application/json"
3643
+ }),
3644
+ body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
3645
+ });
3646
+ logger.debug(`resolve key response: ${response}`);
3647
+ try {
3648
+ return ResolvedKeyInfoFromJSONTyped(await response.json(), false);
3649
+ } catch (error) {
3650
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3651
+ }
3652
+ }
3653
+ /** {@inheritDoc IKmsRestClient.kmsCreateRawSignature} */
3654
+ async kmsClientCreateRawSignature(args) {
3655
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3656
+ const url = _KmsRestClient.urlWithBase(`/signatures/raw`, baseUrl);
3657
+ const body = {
3658
+ keyInfo: args.keyInfo,
3659
+ input: args.input
3660
+ };
3661
+ const response = await (0, import_cross_fetch.fetch)(url, {
3662
+ method: "POST",
3663
+ headers: await this.createHeaders({
3664
+ "Content-Type": "application/json"
3665
+ }),
3666
+ body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
3667
+ });
3668
+ logger.debug(`create raw signature response: ${response}`);
3669
+ try {
3670
+ return CreateRawSignatureResponseFromJSONTyped(await response.json(), false);
3671
+ } catch (error) {
3672
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3673
+ }
3674
+ }
3675
+ /** {@inheritDoc IKmsRestClient.kmsIsValidRawSignature} */
3676
+ async kmsClientIsValidRawSignature(args) {
3677
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3678
+ const url = _KmsRestClient.urlWithBase(`/signatures/raw/verify`, baseUrl);
3679
+ const body = {
3680
+ keyInfo: args.keyInfo,
3681
+ signature: args.signature,
3682
+ input: args.input
3683
+ };
3684
+ const response = await (0, import_cross_fetch.fetch)(url, {
3685
+ method: "POST",
3686
+ headers: await this.createHeaders({
3687
+ "Content-Type": "application/json"
3688
+ }),
3689
+ body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
3690
+ });
3691
+ logger.debug(`verify raw signature response: ${response}`);
3692
+ try {
3693
+ return VerifyRawSignatureResponseFromJSONTyped(await response.json(), false);
3694
+ } catch (error) {
3695
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3696
+ }
3697
+ }
3698
+ /** {@inheritDoc IKmsRestClient.kmsGetKey} */
3699
+ async kmsClientGetKey(args) {
3700
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3701
+ const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
3702
+ const response = await (0, import_cross_fetch.fetch)(url, {
3703
+ method: "GET"
3704
+ });
3705
+ logger.debug(`get key response: ${response}`);
3706
+ try {
3707
+ return GetKeyResponseFromJSONTyped(await response.json(), false);
3708
+ } catch (error) {
3709
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3710
+ }
3711
+ }
3712
+ /** {@inheritDoc IKmsRestClient.kmsListKeys} */
3713
+ async kmsClientListKeys(args) {
3714
+ const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
3715
+ const url = this.addSearchParams(_KmsRestClient.urlWithBase("/keys", baseUrl), {
3716
+ ...args?.providerId && {
3717
+ providerId: args.providerId
3718
+ }
3719
+ });
3720
+ const response = await (0, import_cross_fetch.fetch)(url, {
3721
+ method: "GET"
3722
+ });
3723
+ logger.debug(`list keys response: ${response}`);
3724
+ try {
3725
+ return ListKeysResponseFromJSONTyped(await response.json(), false);
3726
+ } catch (error) {
3727
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3728
+ }
3729
+ }
3730
+ /** {@inheritDoc IKmsRestClient.kmsStoreKey} */
3731
+ async kmsClientStoreKey(args) {
3732
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3733
+ const url = _KmsRestClient.urlWithBase(`/keys`, baseUrl);
3734
+ const body = {
3735
+ keyInfo: args.keyInfo,
3736
+ certChain: args.certChain
3737
+ };
3738
+ const response = await (0, import_cross_fetch.fetch)(url, {
3739
+ method: "POST",
3740
+ headers: await this.createHeaders({
3741
+ "Content-Type": "application/json"
3742
+ }),
3743
+ body: JSON.stringify(StoreKeyToJSONTyped(body))
3744
+ });
3745
+ logger.debug(`store key response: ${response}`);
3746
+ try {
3747
+ return StoreKeyResponseFromJSONTyped(await response.json(), false);
3748
+ } catch (error) {
3749
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3750
+ }
3751
+ }
3752
+ /** {@inheritDoc IKmsRestClient.kmsGenerateKey} */
3753
+ async kmsClientGenerateKey(args) {
3754
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3755
+ const url = _KmsRestClient.urlWithBase(`/keys/generate`, baseUrl);
3756
+ const body = {
3757
+ alg: args.alg,
3758
+ keyOperations: args.keyOperations,
3759
+ providerId: args.providerId,
3760
+ use: args.use
3761
+ };
3762
+ const response = await (0, import_cross_fetch.fetch)(url, {
3763
+ method: "POST",
3764
+ headers: await this.createHeaders({
3765
+ "Content-Type": "application/json"
3766
+ }),
3767
+ body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
3768
+ });
3769
+ logger.debug(`generate key response: ${response}`);
3770
+ try {
3771
+ return GenerateKeyResponseFromJSONTyped(await response.json(), false);
3772
+ } catch (error) {
3773
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3774
+ }
3775
+ }
3776
+ /** {@inheritDoc IKmsRestClient.kmsDeleteKey} */
3777
+ async kmsClientDeleteKey(args) {
3778
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3779
+ const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
3780
+ await (0, import_cross_fetch.fetch)(url, {
3781
+ method: "DELETE"
3782
+ });
3783
+ return true;
3784
+ }
3785
+ /** {@inheritDoc IKmsRestClient.kmsGetKeyProvider} */
3786
+ async kmsClientGetKeyProvider(args) {
3787
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3788
+ const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
3789
+ const response = await (0, import_cross_fetch.fetch)(url, {
3790
+ method: "GET"
3791
+ });
3792
+ logger.debug(`get provider response: ${response}`);
3793
+ try {
3794
+ return KeyProviderResponseFromJSONTyped(await response.json(), false);
3795
+ } catch (error) {
3796
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3797
+ }
3798
+ }
3799
+ /** {@inheritDoc IKmsRestClient.kmsListKeyProviders} */
3800
+ async kmsClientListKeyProviders(args) {
3801
+ const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
3802
+ const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
3803
+ const response = await (0, import_cross_fetch.fetch)(url, {
3804
+ method: "GET"
3805
+ });
3806
+ logger.debug(`list providers response: ${response}`);
3807
+ try {
3808
+ return ListKeyProvidersResponseFromJSONTyped(await response.json(), false);
3809
+ } catch (error) {
3810
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3811
+ }
3812
+ }
3813
+ /** {@inheritDoc IKmsRestClient.kmsProviderListKeys} */
3814
+ async kmsClientProviderListKeys(args) {
3815
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3816
+ const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
3817
+ const response = await (0, import_cross_fetch.fetch)(url, {
3818
+ method: "GET"
3819
+ });
3820
+ logger.debug(`list provider keys response: ${response}`);
3821
+ try {
3822
+ return ListKeysResponseFromJSONTyped(await response.json(), false);
3823
+ } catch (error) {
3824
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3825
+ }
3826
+ }
3827
+ /** {@inheritDoc IKmsRestClient.kmsProviderStoreKey} */
3828
+ async kmsClientProviderStoreKey(args) {
3829
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3830
+ const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
3831
+ const body = {
3832
+ keyInfo: args.keyInfo,
3833
+ certChain: args.certChain
3834
+ };
3835
+ const response = await (0, import_cross_fetch.fetch)(url, {
3836
+ method: "POST",
3837
+ headers: await this.createHeaders({
3838
+ "Content-Type": "application/json"
3839
+ }),
3840
+ body: JSON.stringify(StoreKeyToJSONTyped(body))
3841
+ });
3842
+ logger.debug(`provider store key response: ${response}`);
3843
+ try {
3844
+ return StoreKeyResponseFromJSONTyped(await response.json(), false);
3845
+ } catch (error) {
3846
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3847
+ }
3848
+ }
3849
+ /** {@inheritDoc IKmsRestClient.kmsProviderGenerateKey} */
3850
+ async kmsClientProviderGenerateKey(args) {
3851
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3852
+ const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/generate`, baseUrl);
3853
+ const body = {
3854
+ alg: args.alg,
3855
+ keyOperations: args.keyOperations,
3856
+ use: args.use
3857
+ };
3858
+ const response = await (0, import_cross_fetch.fetch)(url, {
3859
+ method: "POST",
3860
+ headers: await this.createHeaders({
3861
+ "Content-Type": "application/json"
3862
+ }),
3863
+ body: JSON.stringify(GenerateKeyToJSONTyped(body))
3864
+ });
3865
+ logger.debug(`provider generate key response: ${response}`);
3866
+ try {
3867
+ return GenerateKeyResponseFromJSONTyped(await response.json(), false);
3868
+ } catch (error) {
3869
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3870
+ }
3871
+ }
3872
+ /** {@inheritDoc IKmsRestClient.kmsProviderGetKey} */
3873
+ async kmsClientProviderGetKey(args) {
3874
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3875
+ const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
3876
+ const response = await (0, import_cross_fetch.fetch)(url, {
3877
+ method: "GET"
3878
+ });
3879
+ logger.debug(`get provider key response: ${response}`);
3880
+ try {
3881
+ return GetKeyResponseFromJSONTyped(await response.json(), false);
3882
+ } catch (error) {
3883
+ return Promise.reject(Error(`request to ${url} returned ${error}`));
3884
+ }
3885
+ }
3886
+ /** {@inheritDoc IKmsRestClient.kmsProviderDeleteKey} */
3887
+ async kmsClientProviderDeleteKey(args) {
3888
+ const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3889
+ const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
3890
+ await (0, import_cross_fetch.fetch)(url, {
3891
+ method: "DELETE"
3892
+ });
3893
+ return true;
3894
+ }
3895
+ assertedAgentBaseUrl(baseUrl) {
3896
+ if (baseUrl) {
3897
+ return baseUrl;
3898
+ } else if (this.agentBaseUrl) {
3899
+ return this.agentBaseUrl;
3900
+ }
3901
+ throw new Error("No base url has been provided");
3902
+ }
3903
+ async createHeaders(existing) {
3904
+ const headers = {
3905
+ ...existing,
3906
+ Accept: "application/json"
3907
+ };
3908
+ if (this.authOpts?.enabled === true) {
3909
+ if (!this.authOpts.bearerToken) {
3910
+ throw Error(`Cannot have authentication enabled, whilst not enabling static bearer tokens at this point`);
3911
+ }
3912
+ headers.Authorization = `Bearer ${typeof this.authOpts.bearerToken === "string" ? this.authOpts.bearerToken : await this.authOpts.bearerToken()}`;
3913
+ }
3914
+ return headers;
3915
+ }
3916
+ addSearchParams(baseUrl, params) {
3917
+ const url = new URL(baseUrl);
3918
+ for (const [key, value] of Object.entries(params)) {
3919
+ url.searchParams.set(key, String(value));
3920
+ }
3921
+ return url;
3922
+ }
3923
+ };
3924
+ //# sourceMappingURL=index.cjs.map