Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 656 Bytes

File metadata and controls

27 lines (19 loc) · 656 Bytes

aws-kms-ethers-signer

npm version

Install

$ npm install aws-kms-ethers-signer

Examples

import * as ethers from "ethers";
import { KmsEthersSigner } from "aws-kms-ethers-signer";

async function main() {
  const rpcUrl = "http://localhost:8501";
  const keyId = "xxxxx-xxxx-xxxx-xxxx-xxxxxxxx";
  const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
  const signer = new KmsEthersSigner({ keyId }).connect(provider);

  console.log(await signer.getAddress());
}

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