npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kms-viem-account-mini

v1.0.8

Published

Minimal AWS KMS-backed viem account for EVM signing in Deno and npm environments.

Readme

Why

  • Dependency footprint is just viem and @aws-sdk/client-kms.
  • TypeScript-native implementation built with Deno.
  • Uses Deno hardening like frozen lockfiles, minimumDependencyAge, and nodeModulesDir: "none".
  • Includes a small in-house DER parser for the exact ASN.1 KMS returns, so there is no extra ASN.1 dependency.
  • Your private key stays in AWS KMS, but you still get a normal viem account.

Usage

import { createKmsAccount } from "kms-viem-account-mini";
import { createWalletClient, http } from "viem";
import { sepolia } from "viem/chains";

const account = await createKmsAccount({
  keyId: process.env.AWS_KMS_KEY_ID!,
  region: "ap-northeast-1",
});

const walletClient = createWalletClient({
  account,
  chain: sepolia,
  transport: http("https://ethereum-sepolia-rpc.publicnode.com"),
});

const message = "hello from AWS KMS";
const signature = await walletClient.signMessage({
  account,
  message,
});

console.log({
  address: account.address,
  message,
  signature,
});

Quick Start

1. Login to AWS

aws sso login

Your principal needs kms:GetPublicKey and kms:Sign on the target key.

2. Create a secp256k1 KMS key

aws kms create-key \
  --region ap-northeast-1 \
  --key-spec ECC_SECG_P256K1 \
  --key-usage SIGN_VERIFY

Copy KeyMetadata.KeyId.

3. Export the key id

export AWS_KMS_KEY_ID=your-key-id

4. Clone this repo

git clone https://github.com/posaune0423/kms-viem-account-mini.git

5. Go to the Bun example

cd kms-viem-account-mini/examples/minimum-bun

6. Install dependencies and run it

bun install
bun run index.ts

Example output:

{
  address: "0xC4902B92CC048194D3cD59047a99347B506FFaeE",
  message: "hello from AWS KMS",
  signature: "0x5b6b4c305b3f207f0a8c54ad462ee462fcc5ade246e7f4d03fc83f1e995c4eb0298e304ebbcc505e223534036ee33648a2d5fd241dd267846e792ef87556920f1b",
}

If it works, you have:

  • created a KMS-backed Ethereum account
  • connected it to viem
  • produced your first testnet-context signature

The runnable sample is in:

API

createKmsAccount() returns a viem-compatible account with:

  • sign({ hash })
  • signMessage({ message })
  • signTypedData(...)
  • signTransaction(...)