Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ethers-aws-kms-signer

rjchow8.9kMIT1.3.2TypeScript support: included

An Ethers.js compatible signer that connects to AWS KMS

generator-nod

readme

ethers-aws-kms-signer

This is a wallet or signer that can be used together with Ethers.js applications.

Getting Started

npm i ethers-aws-kms-signer

You can provide the AWS Credentials using the various ways listed here depending on how you are using this library. You can also explicitly specify them when invoking the AwsKmsSigner constructor as shown below.

import { AwsKmsSigner } from "ethers-aws-kms-signer";

const kmsCredentials = {
  accessKeyId: "AKIAxxxxxxxxxxxxxxxx", // credentials for your IAM user with KMS access
  secretAccessKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // credentials for your IAM user with KMS access
  region: "ap-southeast-1",
  keyId: "arn:aws:kms:ap-southeast-1:123456789012:key/123a1234-1234-4111-a1ab-a1abc1a12b12",
};

const provider = ethers.providers.getDefaultProvider("ropsten");
let signer = new AwsKmsSigner(kmsCredentials);
signer = signer.connect(provider);

const tx = await signer.sendTransaction({ to: "0xE94E130546485b928C9C9b9A5e69EB787172952e", value: 1 });
console.log(tx);

Developers

Install

git clone this repo

$ git clone https://github.com/rjchow/nod my-module
$ cd my-module
$ rm -rf .git
$ npm install # or yarn

Just make sure to edit package.json, README.md and LICENSE files accordingly with your module's info.

Commands

$ npm test # run tests with Jest
$ npm run coverage # run tests with coverage and open it on browser
$ npm run lint # lint code
$ npm run build # generate docs and transpile code

Logging

Turn on debugging by using the DEBUG environment variable for Node.js and using localStorage.debug in the browser.

E.g:

DEBUG="PLACEHOLDER_PROJECT_NAME:*" npm run dev

Commit message format

This boiler plate uses the semantic-release package to manage versioning. Once it has been set up, version numbers and Github release changelogs will be automatically managed. semantic-release uses the commit messages to determine the type of changes in the codebase. Following formalized conventions for commit messages, semantic-release automatically determines the next semantic version number, generates a changelog and publishes the release.

Use npm run commit instead of git commit in order to invoke Commitizen commit helper that helps with writing properly formatted commit messages.

License

MIT © RJ Chow

Credits

Utmost credit goes to Lucas Henning for doing the legwork on parsing the AWS KMS signature and public key asn formats: https://luhenning.medium.com/the-dark-side-of-the-elliptic-curve-signing-ethereum-transactions-with-aws-kms-in-javascript-83610d9a6f81

A significant portion of code was inspired by the work he published at https://github.com/lucashenning/aws-kms-ethereum-signing

changelog

1.3.2 (2021-07-14)

Bug Fixes

Miscellaneous

  • EthersJS 5.4.0 releases support for EIP1559 new transaction format (3975790)

1.3.1 (2021-07-12)

Bug Fixes

  • fixing ethers version to 5.3.1 because it breaks this library with 5.4.1 (71ce09b)
  • fixing ethers version to 5.3.1 because it breaks this library with 5.4.1 (bef444c)

1.3.0 (2021-06-07)

Features

  • use carat for dependencies (a5618da)
  • use carat for dependencies (54a143a)

1.2.0 (2021-06-04)

Features

  • allow aws credentials to be provided in other ways (a08ed1f)
  • allow aws credentials to be provided in other ways (40ef566)

1.1.0 (2021-03-03)

Features

  • fixed exported ts declaration path (69d29b6)
  • force release (01b44a4)

1.0.0 (2021-02-03)

Features

Miscellaneous

1.9.3 (2021-01-25)

Chores

1.9.2 (2021-01-06)

Chores

1.9.1 (2020-12-29)

Chores

1.9.0 (2020-12-24)

Features

  • 🎸 removed default export (733bee7)

1.8.3 (2020-12-22)

Chores

  • fix update deps commit message (412421a)

1.8.2 (2020-12-15)

Bug Fixes

  • changed updtr command to allow usage in ci (4a92313)

Miscellaneous

  • Rename update-deps to update-deps.yml (2d80e61)
  • Create update-deps (a7fdec3)

1.8.1 (2020-10-18)

Chores

1.8.0 (2020-05-18)

Features

1.7.0 (2020-05-18)

Features

1.6.3 (2020-01-06)

Bug Fixes

  • 🐛 corrected exported types path in package.json (#134) (829d7b3)

1.6.2 (2019-12-31)

Chores

1.6.1 (2019-12-05)

Chores

  • deps-dev: bump prettier from 1.18.2 to 1.19.1 (#121) (f9a51a9)

1.6.0 (2019-12-05)

Chores

  • deps: [security] bump eslint-utils from 1.3.1 to 1.4.3 (#102) (e8982ed)
  • deps: [security] bump mixin-deep from 1.3.1 to 1.3.2 (#79) (1da45f7)
  • deps: [security] bump tar from 2.2.1 to 2.2.2 (#68) (f5b1123)
  • deps-dev: bump @babel/core from 7.4.5 to 7.7.2 (#112) (f0e8e28)
  • deps-dev: bump @babel/preset-env from 7.4.5 to 7.7.1 (#110) (4ef4bbe)
  • deps-dev: bump @types/jest from 24.0.15 to 24.0.23 (#115) (686f2f2)
  • deps-dev: bump eslint from 6.0.0 to 6.6.0 (39be3df)
  • deps-dev: bump eslint from 6.0.0 to 6.6.0 (f379f3f)
  • deps-dev: bump eslint-plugin-import from 2.17.3 to 2.18.2 (#58) (cf990fa)
  • deps-dev: bump husky from 2.4.1 to 3.1.0 (#118) (4d8abce)
  • deps-dev: bump lint-staged from 9.2.0 to 9.4.3 (a35c989)
  • deps-dev: bump lint-staged from 9.2.0 to 9.4.3 (fc12f18)
  • deps-dev: bump semantic-release from 15.13.18 to 15.13.31 (2b55c94)
  • deps-dev: bump semantic-release from 15.13.18 to 15.13.31 (264472e)
  • dev-deps: npm audit (a5a7dfc)

Features

  • 🎸 Added semantic release configuration for npm release (#131) (cee2d64)