项目作者: tacoinfra

项目描述 :
Utilize keys stored in AWS KMS for operations with ConseilJS
高级语言: JavaScript
项目地址: git://github.com/tacoinfra/conseil-kms.git
创建时间: 2020-09-14T07:42:36Z
项目社区:https://github.com/tacoinfra/conseil-kms

开源协议:MIT License

下载


Conseil KMS

About

kms-conseil is a library which provides ConseilJS Signer and KeyStore interfaces for working with keys stored in AWS KMS. This library acts as a binding between ConseilJS and AWS KMS for working with operations in Tezos.

For more information on ConseilJS, see the ConseilJS Documentation.

Configuration

In order to use keys you will need to configure a key in AWS KMS. Steps 1-12 of the Harbinger Setup Guide provide a brief overview of how to achieve this.

Usage

  1. import { KmsKeyStore, KmsKeyStore } from '@tacoinfra/conseil-kms'
  2. import { TezosNodeWriter } from 'conseiljs';
  3. const awsKeyId = "x" // Place your key here.
  4. const awsRegion = "eu-west-1"
  5. const signer = new KmsSigner(awsKeyId, awsRegion)
  6. const keystore = KmsKeyStore.from(awsKeyId, awsRegion)
  7. const result = await TezosNodeWriter.sendTransactionOperation(
  8. "https://rpctest.tzbeta.net",
  9. signer,
  10. keystore,
  11. 'tz1RVcUP9nUurgEJMDou8eW3bVDs6qmP5Lnc', // Recipient
  12. 500_000, // Amount, in mutez
  13. 1500 // Fee, in mutez
  14. )

Building the Library

  1. $ npm i
  2. $ npm run build

Credits

This library is written and maintained by Luke Youngblood and Keefer Taylor.