A module for managing keystore files that store a map from IDs to encrypted string values.
npm install @nomicfoundation/hardhat-keystoreThis plugin adds an encrypted keystore to Hardhat, to handle secret values (e.g. API keys and private keys) in your config securely.
> This plugin is part of Viem Hardhat Toolbox and Ethers+Mocha Hardhat Toolbox. 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 to learn how to use the keystore in your Hardhat configuration.