@tacoinfra/conseil-kms
Version:
Utilize AWS KMS Keys to work with ConseilJS.
47 lines (30 loc) • 1.57 kB
Markdown
`kms-conseil` is a library which provides [ConseilJS](https://github.com/cryptonomic/conseiljs) `Signer` and `KeyStore` interfaces for working with keys stored in [AWS KMS](https://aws.amazon.com/kms/). This library acts as a binding between ConseilJS and AWS KMS for working with operations in [Tezos](https://tezos.com/).
For more information on ConseilJS, see the [ConseilJS Documentation](https://cryptonomic.github.io/ConseilJS/#/).
In order to use keys you will need to configure a key in AWS KMS. Steps 1-12 of the [Harbinger Setup Guide](https://github.com/tacoinfra/harbinger-signer#setup-instructions) provide a brief overview of how to achieve this.
```js
import { KmsKeyStore, KmsKeyStore } from '@tacoinfra/conseil-kms'
import { TezosNodeWriter } from 'conseiljs';
const awsKeyId = "x" // Place your key here.
const awsRegion = "eu-west-1"
const signer = new KmsSigner(awsKeyId, awsRegion)
const keystore = KmsKeyStore.from(awsKeyId, awsRegion)
const result = await TezosNodeWriter.sendTransactionOperation(
"https://rpctest.tzbeta.net",
signer,
keystore,
'tz1RVcUP9nUurgEJMDou8eW3bVDs6qmP5Lnc', // Recipient
500_000, // Amount, in mutez
1500 // Fee, in mutez
)
```
```shell
$ npm i
$ npm run build
```
This library is written and maintained by [Luke Youngblood](https://github.com/lyoungblood) and [Keefer Taylor](https://github.com/keefertaylor).