UNPKG

@nomicfoundation/hardhat-keystore

Version:

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

10 lines (7 loc) 186 B
export async function validateKey(key: string): Promise<boolean> { const KEY_REGEX = /^[a-zA-Z_]+[a-zA-Z0-9_]*$/; if (KEY_REGEX.test(key)) { return true; } return false; }