import colors from "colors/safe"; import pkg from "../package.json"; import { SSVKeysCommand } from "./commands/SSVKeysCommand"; const BannerMessage = async () => { const banner = ` ███████╗███████╗██╗ ██╗ ██╗ ██╗███████╗██╗ ██╗███████╗ ██╔════╝██╔════╝██║ ██║ ██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝ ███████╗███████╗██║ ██║ █████╔╝ █████╗ ╚████╔╝ ███████╗ ╚════██║╚════██║╚██╗ ██╔╝ ██╔═██╗ ██╔══╝ ╚██╔╝ ╚════██║ ███████║███████║ ╚████╔╝ ██║ ██╗███████╗ ██║ ███████║ ╚══════╝╚══════╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝ 🗝️ SSV Keys v${pkg.version} `; return banner; }; export default async function main(interactive: boolean): Promise { const message = await BannerMessage(); console.log( " ----------------------------------------------------------------------" ); console.log(message); for (const str of String(pkg.description).match(/.{1,67}/g) || []) { console.log(` ${str}`); } console.log( " ----------------------------------------------------------------------\n" ); const command = new SSVKeysCommand(interactive); try { const outputFile = await command.execute(); console.debug( "\nKey distribution successful! Find your key shares file at:" ); console.debug(`${colors.bgYellow(colors.black(outputFile))}`); } catch (error: any) { console.trace(`${colors.red("Error:")} ${colors.bold(error.message)}`); } }