Skip to content

Instantly share code, notes, and snippets.

View dangdennis's full-sized avatar

Dennis Dang dangdennis

View GitHub Profile
@dangdennis
dangdennis / KmsSigner.ts
Last active January 11, 2023 15:26 — forked from miguelmota/KmsSigner.js
Typescripts ethers Signer using AWS KMS
// Code taken from https://gist.github.com/miguelmota/092da99bc8a8416ed7756c472dc253c4
import {
GetPublicKeyCommand,
KMSClient,
SignCommand,
} from "@aws-sdk/client-kms";
import { BigNumber, ethers, Signer, UnsignedTransaction } from "ethers";
import * as asn1 from "asn1.js";
import { AlchemyProvider } from "@ethersproject/providers";