# @nomicfoundation/hardhat-keystore

> A module for managing keystore files that store a map from IDs to encrypted string values.

Latest version **3.1.2** (published 2026-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nomicfoundation/hardhat-keystore
pnpm add @nomicfoundation/hardhat-keystore
yarn add @nomicfoundation/hardhat-keystore
bun add @nomicfoundation/hardhat-keystore
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.1.2 |
| Published | 2026-10-15 |
| First published | 2025-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 6 |
| Unpacked size | 203.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 8521 |
| Author | Nomic Foundation |
| Keywords | keystore, storage, hardhat |

## Links

- npm: https://www.npmjs.com/package/@nomicfoundation/hardhat-keystore
- Repository: https://github.com/NomicFoundation/hardhat
- Homepage: https://github.com/NomicFoundation/hardhat/tree/main/packages/hardhat-keystore
- Issues: https://github.com/NomicFoundation/hardhat/issues
- npm.io page: https://npm.io/package/@nomicfoundation/hardhat-keystore

## Dependencies (6)

- [zod](https://npm.io/package/zod.md) ^3.23.8
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) 2.4.0
- [@noble/ciphers](https://npm.io/package/@noble/ciphers.md) 2.4.0
- [@nomicfoundation/hardhat-utils](https://npm.io/package/@nomicfoundation/hardhat-utils.md) ^5.0.0
- [@nomicfoundation/hardhat-errors](https://npm.io/package/@nomicfoundation/hardhat-errors.md) ^3.0.15
- [@nomicfoundation/hardhat-zod-utils](https://npm.io/package/@nomicfoundation/hardhat-zod-utils.md) ^3.0.5

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 3.1.2 (latest) — 2026-10-15
- 3.1.1 — 2026-10-01
- 3.1.0 — 2026-09-17
- 3.0.13 — 2026-08-12
- 3.0.12 — 2026-06-04
- 3.0.11 — 2026-05-26
- 3.0.10 — 2026-05-20
- 3.0.9 — 2026-05-07
- 3.0.8 — 2026-04-30
- 3.0.7 — 2026-04-22
- 3.0.6 — 2026-04-16
- 3.0.5 — 2026-02-25
- 3.0.4 — 2026-02-02
- 3.0.3 — 2025-11-04
- 3.0.2 — 2025-10-22
- … 35 more at https://npm.io/package/@nomicfoundation/hardhat-keystore/versions

## README

# hardhat-keystore

This plugin adds an encrypted keystore to Hardhat, to handle secret values (e.g. API keys and private keys) in your config securely.

## Installation

> This plugin is part of [Viem Hardhat Toolbox](https://hardhat.org/plugins/nomicfoundation-hardhat-toolbox-viem) and [Ethers+Mocha Hardhat Toolbox](https://hardhat.org/plugins/nomicfoundation-hardhat-toolbox-mocha-ethers). If you are using any of those toolboxes, there's nothing else you need to do.

To install this plugin, run the following command:

```bash
npm install --save-dev @nomicfoundation/hardhat-keystore
```

In your `hardhat.config.ts` file, import the plugin and add it to the `plugins` array:

```ts
import { defineConfig } from "hardhat/config";
import hardhatKeystore from "@nomicfoundation/hardhat-keystore";

export default defineConfig({
  plugins: [hardhatKeystore],
});
```

## Usage

Check [our guide to configuration variables](https://hardhat.org/docs/learn-more/configuration-variables) to learn how to use the keystore in your Hardhat configuration.

---
_Source: https://npm.io/package/@nomicfoundation/hardhat-keystore · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
