@nomicfoundation/hardhat-keystore
Version:
A module for managing keystore files that store a map from IDs to encrypted string values.
29 lines (18 loc) • 1.05 kB
Markdown
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],
});
```
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.