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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/LICENSE +201 -0
  2. package/dist/index.cjs +2083 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1468 -0
  5. package/dist/index.d.ts +1468 -0
  6. package/dist/index.js +2063 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +60 -0
  9. package/plugin.schema.json +1123 -0
  10. package/src/agent/KmsRestClient.ts +468 -0
  11. package/src/index.ts +7 -0
  12. package/src/models/AwsAssumeRoleCredentials.ts +98 -0
  13. package/src/models/AwsClientConfiguration.ts +72 -0
  14. package/src/models/AwsKmsSetting.ts +126 -0
  15. package/src/models/AwsStaticCredentials.ts +98 -0
  16. package/src/models/AwsWebIdentityTokenCredentials.ts +99 -0
  17. package/src/models/AzureClientSecretCredentialOpts.ts +90 -0
  18. package/src/models/AzureCredentialOpts.ts +70 -0
  19. package/src/models/AzureKeyVaultSetting.ts +112 -0
  20. package/src/models/CoseKey.ts +145 -0
  21. package/src/models/CoseKeyPair.ts +79 -0
  22. package/src/models/CoseKeyType.ts +55 -0
  23. package/src/models/CreateKeyProvider.ts +115 -0
  24. package/src/models/CreateRawSignature.ts +80 -0
  25. package/src/models/CreateRawSignatureResponse.ts +65 -0
  26. package/src/models/CreateSimpleSignature.ts +100 -0
  27. package/src/models/CryptoAlg.ts +55 -0
  28. package/src/models/Curve.ts +59 -0
  29. package/src/models/DigestAlg.ts +58 -0
  30. package/src/models/ErrorResponse.ts +82 -0
  31. package/src/models/GenerateKey.ts +106 -0
  32. package/src/models/GenerateKeyGlobal.ts +114 -0
  33. package/src/models/GenerateKeyResponse.ts +71 -0
  34. package/src/models/GetKeyResponse.ts +71 -0
  35. package/src/models/IdentifierMethod.ts +56 -0
  36. package/src/models/JoseKeyPair.ts +79 -0
  37. package/src/models/Jwk.ts +248 -0
  38. package/src/models/JwkKeyType.ts +55 -0
  39. package/src/models/JwkUse.ts +53 -0
  40. package/src/models/KeyEncoding.ts +53 -0
  41. package/src/models/KeyInfo.ts +164 -0
  42. package/src/models/KeyOperations.ts +59 -0
  43. package/src/models/KeyProvider.ts +82 -0
  44. package/src/models/KeyProviderResponse.ts +82 -0
  45. package/src/models/KeyProviderType.ts +54 -0
  46. package/src/models/KeyResolver.ts +92 -0
  47. package/src/models/KeyType.ts +54 -0
  48. package/src/models/KeyVisibility.ts +53 -0
  49. package/src/models/ListKeyProvidersResponse.ts +71 -0
  50. package/src/models/ListKeysResponse.ts +71 -0
  51. package/src/models/ListResolversResponse.ts +71 -0
  52. package/src/models/LookupMode.ts +54 -0
  53. package/src/models/ManagedKeyInfo.ts +167 -0
  54. package/src/models/ManagedKeyPair.ts +111 -0
  55. package/src/models/MaskGenFunction.ts +52 -0
  56. package/src/models/ProviderCapabilities.ts +122 -0
  57. package/src/models/ResolvePublicKey.ts +102 -0
  58. package/src/models/ResolvedKeyInfo.ts +165 -0
  59. package/src/models/Resolver.ts +92 -0
  60. package/src/models/SignInput.ts +92 -0
  61. package/src/models/SignOutput.ts +79 -0
  62. package/src/models/Signature.ts +103 -0
  63. package/src/models/SignatureAlgorithm.ts +63 -0
  64. package/src/models/StoreKey.ts +79 -0
  65. package/src/models/StoreKeyResponse.ts +71 -0
  66. package/src/models/UpdateKeyProvider.ts +99 -0
  67. package/src/models/VerifyRawSignature.ts +89 -0
  68. package/src/models/VerifyRawSignatureResponse.ts +65 -0
  69. package/src/models/VerifySimpleSignature.ts +85 -0
  70. package/src/models/index.ts +60 -0
  71. package/src/types/IKmsRestClient.ts +133 -0
@@ -0,0 +1,167 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { KeyType } from './KeyType';
16
+ import {
17
+ KeyTypeFromJSON,
18
+ KeyTypeToJSON,
19
+ } from './KeyType';
20
+ import type { KeyVisibility } from './KeyVisibility';
21
+ import {
22
+ KeyVisibilityFromJSON,
23
+ KeyVisibilityToJSON,
24
+ } from './KeyVisibility';
25
+ import type { SignatureAlgorithm } from './SignatureAlgorithm';
26
+ import {
27
+ SignatureAlgorithmFromJSON,
28
+ SignatureAlgorithmToJSON,
29
+ } from './SignatureAlgorithm';
30
+ import type { KeyEncoding } from './KeyEncoding';
31
+ import {
32
+ KeyEncodingFromJSON,
33
+ KeyEncodingToJSON,
34
+ } from './KeyEncoding';
35
+ import type { Jwk } from './Jwk';
36
+ import {
37
+ JwkFromJSON,
38
+ JwkToJSON,
39
+ } from './Jwk';
40
+
41
+ /**
42
+ * Represents a managed cryptographic key information that is guaranteed to be present and resolved, part of a KMS providing concrete access to the key.
43
+ * @export
44
+ * @interface ManagedKeyInfo
45
+ */
46
+ export interface ManagedKeyInfo {
47
+ /**
48
+ * Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
49
+ * @type {string}
50
+ * @memberof ManagedKeyInfo
51
+ */
52
+ kid?: string;
53
+ /**
54
+ *
55
+ * @type {Jwk}
56
+ * @memberof ManagedKeyInfo
57
+ */
58
+ key: Jwk;
59
+ /**
60
+ *
61
+ * @type {SignatureAlgorithm}
62
+ * @memberof ManagedKeyInfo
63
+ */
64
+ signatureAlgorithm?: SignatureAlgorithm;
65
+ /**
66
+ *
67
+ * @type {KeyVisibility}
68
+ * @memberof ManagedKeyInfo
69
+ */
70
+ keyVisibility?: KeyVisibility;
71
+ /**
72
+ * X.509 certificate chain associated with the key.
73
+ * @type {Array<string>}
74
+ * @memberof ManagedKeyInfo
75
+ */
76
+ x5c?: Array<string>;
77
+ /**
78
+ * A reference or alias to the key in the Key Management Service (KMS).
79
+ * @type {string}
80
+ * @memberof ManagedKeyInfo
81
+ */
82
+ alias: string;
83
+ /**
84
+ * The Key Management System (KMS) identifier associated with the key.
85
+ * @type {string}
86
+ * @memberof ManagedKeyInfo
87
+ */
88
+ providerId: string;
89
+ /**
90
+ *
91
+ * @type {KeyType}
92
+ * @memberof ManagedKeyInfo
93
+ */
94
+ keyType?: KeyType;
95
+ /**
96
+ *
97
+ * @type {KeyEncoding}
98
+ * @memberof ManagedKeyInfo
99
+ */
100
+ keyEncoding?: KeyEncoding;
101
+ /**
102
+ * Additional configuration options as key-value pairs.
103
+ * @type {{ [key: string]: string; }}
104
+ * @memberof ManagedKeyInfo
105
+ */
106
+ opts?: { [key: string]: string; };
107
+ }
108
+
109
+
110
+
111
+ /**
112
+ * Check if a given object implements the ManagedKeyInfo interface.
113
+ */
114
+ export function instanceOfManagedKeyInfo(value: object): value is ManagedKeyInfo {
115
+ if (!('key' in value) || value['key'] === undefined) return false;
116
+ if (!('alias' in value) || value['alias'] === undefined) return false;
117
+ if (!('providerId' in value) || value['providerId'] === undefined) return false;
118
+ return true;
119
+ }
120
+
121
+ export function ManagedKeyInfoFromJSON(json: any): ManagedKeyInfo {
122
+ return ManagedKeyInfoFromJSONTyped(json, false);
123
+ }
124
+
125
+ export function ManagedKeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedKeyInfo {
126
+ if (json == null) {
127
+ return json;
128
+ }
129
+ return {
130
+
131
+ 'kid': json['kid'] == null ? undefined : json['kid'],
132
+ 'key': JwkFromJSON(json['key']),
133
+ 'signatureAlgorithm': json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
134
+ 'keyVisibility': json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
135
+ 'x5c': json['x5c'] == null ? undefined : json['x5c'],
136
+ 'alias': json['alias'],
137
+ 'providerId': json['providerId'],
138
+ 'keyType': json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
139
+ 'keyEncoding': json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
140
+ 'opts': json['opts'] == null ? undefined : json['opts'],
141
+ };
142
+ }
143
+
144
+ export function ManagedKeyInfoToJSON(json: any): ManagedKeyInfo {
145
+ return ManagedKeyInfoToJSONTyped(json, false);
146
+ }
147
+
148
+ export function ManagedKeyInfoToJSONTyped(value?: ManagedKeyInfo | null, ignoreDiscriminator: boolean = false): any {
149
+ if (value == null) {
150
+ return value;
151
+ }
152
+
153
+ return {
154
+
155
+ 'kid': value['kid'],
156
+ 'key': JwkToJSON(value['key']),
157
+ 'signatureAlgorithm': SignatureAlgorithmToJSON(value['signatureAlgorithm']),
158
+ 'keyVisibility': KeyVisibilityToJSON(value['keyVisibility']),
159
+ 'x5c': value['x5c'],
160
+ 'alias': value['alias'],
161
+ 'providerId': value['providerId'],
162
+ 'keyType': KeyTypeToJSON(value['keyType']),
163
+ 'keyEncoding': KeyEncodingToJSON(value['keyEncoding']),
164
+ 'opts': value['opts'],
165
+ };
166
+ }
167
+
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { JoseKeyPair } from './JoseKeyPair';
16
+ import {
17
+ JoseKeyPairFromJSON,
18
+ JoseKeyPairToJSON,
19
+ } from './JoseKeyPair';
20
+ import type { CoseKeyPair } from './CoseKeyPair';
21
+ import {
22
+ CoseKeyPairFromJSON,
23
+ CoseKeyPairToJSON,
24
+ } from './CoseKeyPair';
25
+
26
+ /**
27
+ * Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs.
28
+ * @export
29
+ * @interface ManagedKeyPair
30
+ */
31
+ export interface ManagedKeyPair {
32
+ /**
33
+ * Key identifier, may be null.
34
+ * @type {string}
35
+ * @memberof ManagedKeyPair
36
+ */
37
+ kid?: string;
38
+ /**
39
+ * Key Management System identifier.
40
+ * @type {string}
41
+ * @memberof ManagedKeyPair
42
+ */
43
+ providerId: string;
44
+ /**
45
+ * Reference to the key in the KMS.
46
+ * @type {string}
47
+ * @memberof ManagedKeyPair
48
+ */
49
+ alias: string;
50
+ /**
51
+ *
52
+ * @type {CoseKeyPair}
53
+ * @memberof ManagedKeyPair
54
+ */
55
+ cose: CoseKeyPair;
56
+ /**
57
+ *
58
+ * @type {JoseKeyPair}
59
+ * @memberof ManagedKeyPair
60
+ */
61
+ jose: JoseKeyPair;
62
+ }
63
+
64
+ /**
65
+ * Check if a given object implements the ManagedKeyPair interface.
66
+ */
67
+ export function instanceOfManagedKeyPair(value: object): value is ManagedKeyPair {
68
+ if (!('providerId' in value) || value['providerId'] === undefined) return false;
69
+ if (!('alias' in value) || value['alias'] === undefined) return false;
70
+ if (!('cose' in value) || value['cose'] === undefined) return false;
71
+ if (!('jose' in value) || value['jose'] === undefined) return false;
72
+ return true;
73
+ }
74
+
75
+ export function ManagedKeyPairFromJSON(json: any): ManagedKeyPair {
76
+ return ManagedKeyPairFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function ManagedKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedKeyPair {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'kid': json['kid'] == null ? undefined : json['kid'],
86
+ 'providerId': json['providerId'],
87
+ 'alias': json['alias'],
88
+ 'cose': CoseKeyPairFromJSON(json['cose']),
89
+ 'jose': JoseKeyPairFromJSON(json['jose']),
90
+ };
91
+ }
92
+
93
+ export function ManagedKeyPairToJSON(json: any): ManagedKeyPair {
94
+ return ManagedKeyPairToJSONTyped(json, false);
95
+ }
96
+
97
+ export function ManagedKeyPairToJSONTyped(value?: ManagedKeyPair | null, ignoreDiscriminator: boolean = false): any {
98
+ if (value == null) {
99
+ return value;
100
+ }
101
+
102
+ return {
103
+
104
+ 'kid': value['kid'],
105
+ 'providerId': value['providerId'],
106
+ 'alias': value['alias'],
107
+ 'cose': CoseKeyPairToJSON(value['cose']),
108
+ 'jose': JoseKeyPairToJSON(value['jose']),
109
+ };
110
+ }
111
+
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Mask generation function algorithm.
18
+ * @export
19
+ */
20
+ export const MaskGenFunction = {
21
+ Mgf1: 'MGF1'
22
+ } as const;
23
+ export type MaskGenFunction = typeof MaskGenFunction[keyof typeof MaskGenFunction];
24
+
25
+
26
+ export function instanceOfMaskGenFunction(value: any): boolean {
27
+ for (const key in MaskGenFunction) {
28
+ if (Object.prototype.hasOwnProperty.call(MaskGenFunction, key)) {
29
+ if (MaskGenFunction[key as keyof typeof MaskGenFunction] === value) {
30
+ return true;
31
+ }
32
+ }
33
+ }
34
+ return false;
35
+ }
36
+
37
+ export function MaskGenFunctionFromJSON(json: any): MaskGenFunction {
38
+ return MaskGenFunctionFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function MaskGenFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): MaskGenFunction {
42
+ return json as MaskGenFunction;
43
+ }
44
+
45
+ export function MaskGenFunctionToJSON(value?: MaskGenFunction | null): any {
46
+ return value as any;
47
+ }
48
+
49
+ export function MaskGenFunctionToJSONTyped(value: any, ignoreDiscriminator: boolean): MaskGenFunction {
50
+ return value as MaskGenFunction;
51
+ }
52
+
@@ -0,0 +1,122 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { KeyType } from './KeyType';
16
+ import {
17
+ KeyTypeFromJSON,
18
+ KeyTypeToJSON,
19
+ } from './KeyType';
20
+ import type { DigestAlg } from './DigestAlg';
21
+ import {
22
+ DigestAlgFromJSON,
23
+ DigestAlgToJSON,
24
+ } from './DigestAlg';
25
+ import type { Curve } from './Curve';
26
+ import {
27
+ CurveFromJSON,
28
+ CurveToJSON,
29
+ } from './Curve';
30
+ import type { KeyOperations } from './KeyOperations';
31
+ import {
32
+ KeyOperationsFromJSON,
33
+ KeyOperationsToJSON,
34
+ } from './KeyOperations';
35
+ import type { SignatureAlgorithm } from './SignatureAlgorithm';
36
+ import {
37
+ SignatureAlgorithmFromJSON,
38
+ SignatureAlgorithmToJSON,
39
+ } from './SignatureAlgorithm';
40
+
41
+ /**
42
+ * Comprehensive information about a provider's cryptographic capabilities.
43
+ * @export
44
+ * @interface ProviderCapabilities
45
+ */
46
+ export interface ProviderCapabilities {
47
+ /**
48
+ * List of key types supported by this provider.
49
+ * @type {Array<KeyType>}
50
+ * @memberof ProviderCapabilities
51
+ */
52
+ keyTypes?: Array<KeyType>;
53
+ /**
54
+ * List of signature algorithms supported by this provider.
55
+ * @type {Array<SignatureAlgorithm>}
56
+ * @memberof ProviderCapabilities
57
+ */
58
+ signatureAlgorithms?: Array<SignatureAlgorithm>;
59
+ /**
60
+ * List of digest algorithms supported by this provider.
61
+ * @type {Array<DigestAlg>}
62
+ * @memberof ProviderCapabilities
63
+ */
64
+ digests?: Array<DigestAlg>;
65
+ /**
66
+ * List of elliptic curves supported by this provider.
67
+ * @type {Array<Curve>}
68
+ * @memberof ProviderCapabilities
69
+ */
70
+ curves?: Array<Curve>;
71
+ /**
72
+ * List of key operations supported by this provider.
73
+ * @type {Array<KeyOperations>}
74
+ * @memberof ProviderCapabilities
75
+ */
76
+ keyOperations?: Array<KeyOperations>;
77
+ }
78
+
79
+ /**
80
+ * Check if a given object implements the ProviderCapabilities interface.
81
+ */
82
+ export function instanceOfProviderCapabilities(value: object): value is ProviderCapabilities {
83
+ return true;
84
+ }
85
+
86
+ export function ProviderCapabilitiesFromJSON(json: any): ProviderCapabilities {
87
+ return ProviderCapabilitiesFromJSONTyped(json, false);
88
+ }
89
+
90
+ export function ProviderCapabilitiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProviderCapabilities {
91
+ if (json == null) {
92
+ return json;
93
+ }
94
+ return {
95
+
96
+ 'keyTypes': json['keyTypes'] == null ? undefined : ((json['keyTypes'] as Array<any>).map(KeyTypeFromJSON)),
97
+ 'signatureAlgorithms': json['signatureAlgorithms'] == null ? undefined : ((json['signatureAlgorithms'] as Array<any>).map(SignatureAlgorithmFromJSON)),
98
+ 'digests': json['digests'] == null ? undefined : ((json['digests'] as Array<any>).map(DigestAlgFromJSON)),
99
+ 'curves': json['curves'] == null ? undefined : ((json['curves'] as Array<any>).map(CurveFromJSON)),
100
+ 'keyOperations': json['keyOperations'] == null ? undefined : ((json['keyOperations'] as Array<any>).map(KeyOperationsFromJSON)),
101
+ };
102
+ }
103
+
104
+ export function ProviderCapabilitiesToJSON(json: any): ProviderCapabilities {
105
+ return ProviderCapabilitiesToJSONTyped(json, false);
106
+ }
107
+
108
+ export function ProviderCapabilitiesToJSONTyped(value?: ProviderCapabilities | null, ignoreDiscriminator: boolean = false): any {
109
+ if (value == null) {
110
+ return value;
111
+ }
112
+
113
+ return {
114
+
115
+ 'keyTypes': value['keyTypes'] == null ? undefined : ((value['keyTypes'] as Array<any>).map(KeyTypeToJSON)),
116
+ 'signatureAlgorithms': value['signatureAlgorithms'] == null ? undefined : ((value['signatureAlgorithms'] as Array<any>).map(SignatureAlgorithmToJSON)),
117
+ 'digests': value['digests'] == null ? undefined : ((value['digests'] as Array<any>).map(DigestAlgToJSON)),
118
+ 'curves': value['curves'] == null ? undefined : ((value['curves'] as Array<any>).map(CurveToJSON)),
119
+ 'keyOperations': value['keyOperations'] == null ? undefined : ((value['keyOperations'] as Array<any>).map(KeyOperationsToJSON)),
120
+ };
121
+ }
122
+
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { KeyInfo } from './KeyInfo';
16
+ import {
17
+ KeyInfoFromJSON,
18
+ KeyInfoToJSON,
19
+ } from './KeyInfo';
20
+ import type { IdentifierMethod } from './IdentifierMethod';
21
+ import {
22
+ IdentifierMethodFromJSON,
23
+ IdentifierMethodToJSON,
24
+ } from './IdentifierMethod';
25
+
26
+ /**
27
+ * Request body for resolving a public key.
28
+ * @export
29
+ * @interface ResolvePublicKey
30
+ */
31
+ export interface ResolvePublicKey {
32
+ /**
33
+ *
34
+ * @type {KeyInfo}
35
+ * @memberof ResolvePublicKey
36
+ */
37
+ keyInfo: KeyInfo;
38
+ /**
39
+ *
40
+ * @type {IdentifierMethod}
41
+ * @memberof ResolvePublicKey
42
+ */
43
+ identifierMethod?: IdentifierMethod;
44
+ /**
45
+ * Optional array of trusted certificates (base64-encoded) that may be used in the resolution process.
46
+ * @type {Array<string>}
47
+ * @memberof ResolvePublicKey
48
+ */
49
+ trustedCerts?: Array<string>;
50
+ /**
51
+ * Optional boolean indicating whether the X.509 certificate chain should be verified.
52
+ * @type {boolean}
53
+ * @memberof ResolvePublicKey
54
+ */
55
+ verifyX509CertificateChain?: boolean;
56
+ }
57
+
58
+
59
+
60
+ /**
61
+ * Check if a given object implements the ResolvePublicKey interface.
62
+ */
63
+ export function instanceOfResolvePublicKey(value: object): value is ResolvePublicKey {
64
+ if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
65
+ return true;
66
+ }
67
+
68
+ export function ResolvePublicKeyFromJSON(json: any): ResolvePublicKey {
69
+ return ResolvePublicKeyFromJSONTyped(json, false);
70
+ }
71
+
72
+ export function ResolvePublicKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResolvePublicKey {
73
+ if (json == null) {
74
+ return json;
75
+ }
76
+ return {
77
+
78
+ 'keyInfo': KeyInfoFromJSON(json['keyInfo']),
79
+ 'identifierMethod': json['identifierMethod'] == null ? undefined : IdentifierMethodFromJSON(json['identifierMethod']),
80
+ 'trustedCerts': json['trustedCerts'] == null ? undefined : json['trustedCerts'],
81
+ 'verifyX509CertificateChain': json['verifyX509CertificateChain'] == null ? undefined : json['verifyX509CertificateChain'],
82
+ };
83
+ }
84
+
85
+ export function ResolvePublicKeyToJSON(json: any): ResolvePublicKey {
86
+ return ResolvePublicKeyToJSONTyped(json, false);
87
+ }
88
+
89
+ export function ResolvePublicKeyToJSONTyped(value?: ResolvePublicKey | null, ignoreDiscriminator: boolean = false): any {
90
+ if (value == null) {
91
+ return value;
92
+ }
93
+
94
+ return {
95
+
96
+ 'keyInfo': KeyInfoToJSON(value['keyInfo']),
97
+ 'identifierMethod': IdentifierMethodToJSON(value['identifierMethod']),
98
+ 'trustedCerts': value['trustedCerts'],
99
+ 'verifyX509CertificateChain': value['verifyX509CertificateChain'],
100
+ };
101
+ }
102
+