@holographxyz/cli
Version:
Holograph operator CLI
35 lines (34 loc) • 1.28 kB
TypeScript
import { Wallet } from '@ethersproject/wallet';
import { Environment } from '@holographxyz/environment';
import { NetworkKeys } from '@holographxyz/networks';
import { SelectOption } from './validation';
export declare const CONFIG_FILE_NAME = "config.json";
export interface ConfigNetwork {
providerUrl: string;
}
export interface ConfigNetworks {
[k: NetworkKeys]: ConfigNetwork;
}
export interface ConfigCredentials {
iv: string;
privateKey: string;
address: string;
}
export interface ConfigUser {
credentials: ConfigCredentials;
}
export interface ConfigFile {
version: string;
networks: ConfigNetworks;
user: ConfigUser;
}
export declare function generateSupportedNetworksOptions(configNetworks?: ConfigNetworks): SelectOption[];
export declare function ensureConfigFileIsValid(configDir: string, unsafePassword: string | undefined, unlockWallet?: boolean): Promise<{
environment: Environment;
userWallet: Wallet;
configFile: ConfigFile;
supportedNetworksOptions: SelectOption[];
}>;
export declare function validateBeta3Schema(config: Record<string, unknown>): Promise<void>;
export declare function checkFileExists(configPath: string): Promise<boolean>;
export declare function readConfig(configPath: string): Promise<any>;