14
14
*/
15
15
16
16
import {
17
- KmsKeyring ,
17
+ KmsKeyringClass ,
18
+ KeyRingConstructible , // eslint-disable-line no-unused-vars
18
19
KmsKeyringInput , // eslint-disable-line no-unused-vars
19
20
KMSConstructible , // eslint-disable-line no-unused-vars
20
21
KmsClientSupplier , // eslint-disable-line no-unused-vars
@@ -25,7 +26,7 @@ import {
25
26
} from '@aws-crypto/kms-keyring'
26
27
import {
27
28
NodeAlgorithmSuite , // eslint-disable-line no-unused-vars
28
- immutableClass , NodeKeyring
29
+ immutableClass , KeyringNode
29
30
} from '@aws-crypto/material-management-node'
30
31
import { KMS , KMSConfiguration } from '@aws-sdk/client-kms-node' // eslint-disable-line no-unused-vars
31
32
const getKmsClient = getClient ( KMS )
@@ -35,19 +36,14 @@ export type KmsKeyringNodeInput = Partial<KmsKeyringInput<KMS>>
35
36
export type KMSNodeConstructible = KMSConstructible < KMS , KMSConfiguration >
36
37
export type KmsNodeClientSupplier = KmsClientSupplier < KMS >
37
38
38
- export class KmsKeyringNode extends KmsKeyring < NodeAlgorithmSuite , KMS > {
39
+ export class KmsKeyringNode extends KmsKeyringClass ( KeyringNode as KeyRingConstructible < NodeAlgorithmSuite > ) {
39
40
constructor ( {
40
41
clientProvider = cacheKmsClients ,
41
- kmsKeys ,
42
- generatorKmsKey ,
42
+ keyIds ,
43
+ generatorKeyId ,
43
44
grantTokens
44
45
} : KmsKeyringNodeInput = { } ) {
45
- super ( { clientProvider, kmsKeys, generatorKmsKey, grantTokens } )
46
- }
47
-
48
- [ Symbol . hasInstance ] ( obj : any ) {
49
- return obj instanceof NodeKeyring ||
50
- Function . prototype [ Symbol . hasInstance ] . call ( this , obj )
46
+ super ( { clientProvider, keyIds, generatorKeyId, grantTokens } )
51
47
}
52
48
}
53
49
immutableClass ( KmsKeyringNode )
0 commit comments