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 October 21, 2024 20:19 — 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";