Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-kms-provider

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-kms-provider

[![npm version](https://badge.fury.io/js/aws-kms-provider.svg)](https://www.npmjs.com/package/aws-kms-provider) [![GitHub Actions](https://github.com/odanado/aws-kms-provider/workflows/Node%20CI/badge.svg)](https://github.com/odanado/aws-kms-provider) [![

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

aws-kms-provider

npm version GitHub Actions Coverage Status

AWS KMS Web3 provider. The provider can sign the transaction using Asymmetric Keys of AWS Key Management Service without managing a private key.

Install

$ npm install aws-kms-provider

Examples

See send-eth.ts.

import Web3 from "web3";

import { KmsProvider } from "../src/provider";

const region = "us-east-1";
const keyId = "xxxxx-xxxx-xxxx-xxxx-xxxxxxxx";
const endpoint =
  "https://ropsten.infura.io/v3/xxxxxxxxxxxx";
const to = "0xabcdef";

async function main() {
  const provider = new KmsProvider(
    endpoint,
    { region, keyIds: [keyId] },
    "ropsten"
  );

  const web3 = new Web3(provider as any);

  const accounts = await web3.eth.getAccounts();
  console.log("accounts", accounts);

  const receipt = await web3.eth.sendTransaction({
    from: accounts[0],
    to,
    value: web3.utils.toWei("0.00001", "ether")
  });

  console.log(receipt);
}

main().catch(e => console.error(e));

FAQs

Package last updated on 19 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc