Code Monkey home page Code Monkey logo

eth-signer-kms's Introduction

@rumblefishdev/eth-signer-kms

Web3 provider that derives address and signs transactions using AWS KMS.

Install

$ npm i @rumblefishdev/eth-signer-kms

Requirements

aws-sdk

In order to work properly AWS KMS managed key must be:

  • asymmetric
  • able to sign and verify
  • ECC_SECG_P256K1 specified

Usage

* Before use, make sure that AWS SDK is properly configured! Find out how to do it here.

KMSProvider can be used as a standalone Web3 provider and within Truffle config. It's based on @truffle/hdwallet-provider so wallet non-related params (providerOrUrl, shareNonce and poolingInterval and chainId) remain the same. In addition, it uses @ethereumjs/tx under the hood which offers EIP-2718 support.

keyId can be obtained via KMS package of aws-sdk or directly via AWS console. https://github.com/ethereumjs/ethereumjs-monorepo

Parameters:

Parameter Type Default Required Description
keyId string null [x] Key ID of AWS KMS managed private key
providerOrUrl string/object null [x] Official doc
chainSettings Common {} [ ] Common object used to configure tx options. If chainId is not passed, it will be obtained automatically via eth_chainId. For details instructions please refer to Common and Tx official docs
shareNonce boolean true [ ] Official doc
pollingInterval number 4000 [ ] Official doc

Examples

Truffle usage example

Nodejs + ethersjs usage example

Credits:

@lucashenning @truffle team

eth-signer-kms's People

Contributors

danielcybulka avatar denciu avatar kacper-rf avatar kowalski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.