@nomicfoundation/hardhat-keystore
Version:
A module for managing keystore files that store a map from IDs to encrypted string values.
24 lines • 1.2 kB
JavaScript
import { createDebug } from "@nomicfoundation/hardhat-utils/debug";
import { getDevKeystoreFilePath, getDevKeystorePasswordFilePath, getKeystoreFilePath, } from "../utils/get-keystore-file-path.js";
const log = createDebug("hardhat:keystore:hook-handlers:config");
export default async () => {
const handlers = {
resolveUserConfig: async (userConfig, resolveConfigurationVariable, next) => {
const resolvedConfig = await next(userConfig, resolveConfigurationVariable);
const defaultKeystoreFilePath = await getKeystoreFilePath();
const defaultDevKeystoreFilePath = await getDevKeystoreFilePath();
const defaultDevKeystorePasswordFilePath = await getDevKeystorePasswordFilePath();
log(`path to keystore file: ${defaultKeystoreFilePath}`);
return {
...resolvedConfig,
keystore: {
filePath: defaultKeystoreFilePath,
devFilePath: defaultDevKeystoreFilePath,
devPasswordFilePath: defaultDevKeystorePasswordFilePath,
},
};
},
};
return handlers;
};
//# sourceMappingURL=config.js.map