Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.19 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.19 KB

viem-kms-signer

This is a wallet or signer that can be used together with Viem applications backed by an AWS KMS private key.

Getting Started

Install the package

npm i viem-kms-signer

Usage

import { KmsSigner } from 'viem-kms-signer';

const kmsCredentials = {
  accessKeyId: 'AKIAxxxxxxxxxxxxxxxx', // credentials for your IAM user with KMS access
  secretAccessKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // credentials for your IAM user with KMS access
  region: 'us-east-1',
  keyId:
    'arn:aws:kms:us-east-1:123456789012:key/123a1234-1234-4111-a1ab-a1abc1a12b12',
};
const signer = new KmsSigner(kmsCredentials);

// Returns a custom viem account instance
const account = await signer.getAccount();

License

MIT © Jack Chuma

Credits