Skip to content

hardhat-kmsSign with a cloud key

A Hardhat 3 plugin that signs transactions, messages and typed data with keys in AWS KMS, Google Cloud KMS or Azure Key Vault. The private key never leaves the KMS.

hardhat-kms docs ​

hardhat-kms is a Hardhat 3 plugin that signs transactions, messages and typed data with secp256k1 keys held in AWS KMS, Google Cloud KMS and Azure Key Vault. The private key never leaves the KMS.

Each page except the generated API reference opens with an Audience: line that names who it is for and what it assumes. Release channels and versioning says which release to install and what a version promises.

Start here ​

Tutorials ​

PageKind
Deploy a Hardhat contract to Sepolia with AWS KMSTutorial
Deploy a Hardhat contract to Sepolia with Google Cloud KMSTutorial
Deploy a Hardhat contract to Sepolia with Azure Key VaultTutorial

Using the plugin ​

PageKind
ConfigurationReference
CredentialsReference
RPC methodsReference
Hardhat KMS tasks referenceReference
ErrorsReference
Library accountsReference
Supported Node.js versionsReference
API referenceReference
Install hardhat-kmsHow-to
Set up an AWS KMS keyHow-to
Set up an Azure Key Vault keyHow-to
Set up a Google Cloud KMS keyHow-to
Prevent and recover from losing a keyHow-to
Rotate a key and pin its addressHow-to
Use several keys across networksHow-to
Sign from GitHub Actions with OIDCHow-to
Debug outputHow-to
Deploy with Hardhat IgnitionHow-to
Recover from an uncertain transaction sendHow-to
Return the funds from a KMS addressHow-to
Find who signed with a keyHow-to
Move KMS signing from Foundry to HardhatHow-to
Use a KMS key with Alchemy Wallet APIsHow-to
Verify a releaseHow-to
Comparison with FoundryExplanation
Compared with other KMS signersExplanation
A KMS key or a private key in .envExplanation
A KMS key or a LedgerExplanation
How hardhat-kms worksExplanation
Cloud credentials for KMS signingExplanation
Security modelExplanation
Release channels and versioningExplanation

Runnable projects for viem, ethers and Ignition are in examples/. Pages not written yet are listed under Planned pages.

Contributing ​

PageWhat it covers
CONTRIBUTING.mdSetup, commands, workflow, issue-first rule
ArchitectureModule map, code map, request flows, cloud access
Signing pipeline and securitySignature checks, key pinning, threat model
Security reviewThe checklist for signing, sending and release changes
Provider contractThe adapter interface for KMS and HSM providers
TransactionsFilling, nonces, the send lock, chain-id checks
TestingTest layers and conventions
Live proofTransactions of the latest live run on Sepolia
ToolingQuality gates, hooks, CI
ReleasingWho releases, the signed tag, staging and promotion
DocumentationHow the docs are organised and the rules for them
Decision recordsWhy the main decisions were made
Signing prior artHow other signers compare, and why each check exists
RoadmapWhat ships in 1.0 and what comes after
1.0.0 launch noteThe 1.0.0 announcement text, and the template for the next major
Adoption metricsThe monthly check of downloads, search and referrers
SECURITY.mdReporting vulnerabilities
CODE_OF_CONDUCT.mdContributor Covenant 2.1 and how to report a breach

MIT licensed. A community plugin, not affiliated with or endorsed by Nomic Foundation, Amazon Web Services, Google or Microsoft.