@five-vm/cli
Version:
High-performance CLI for Five VM development with WebAssembly integration
80 lines • 2.34 kB
TypeScript
/**
* Five CLI Configuration Types
*
* Defines the configuration structure and types for the Five CLI.
* Supports multiple network targets and configurable deployment settings.
*/
/**
* Supported Five network targets
*/
export type ConfigTarget = 'wasm' | 'local' | 'devnet' | 'testnet' | 'mainnet';
/**
* Network endpoint configuration mapping
*/
export interface NetworkEndpoint {
rpcUrl: string;
wsUrl?: string;
}
/**
* Complete Five CLI configuration interface
*/
export interface FiveConfig {
/** Current deployment target */
target: ConfigTarget;
/** Network endpoint configurations */
networks: Record<ConfigTarget, NetworkEndpoint>;
/** Path to keypair file for transactions */
keypair?: string;
/** Whether to show config details in command output */
showConfig: boolean;
/** Optional WASM loader configuration */
wasm?: {
/** Loader preference: auto (default), node, bundler */
loader?: 'auto' | 'node' | 'bundler';
/** Explicit module candidate paths (JS modules), absolute or relative */
modulePaths?: string[];
};
/** Optional logging configuration */
logging?: {
/** Audit log directory for on-chain operations */
auditLogDir?: string;
};
}
/**
* Default network endpoint configurations
*/
export declare const DEFAULT_NETWORKS: Record<ConfigTarget, NetworkEndpoint>;
/**
* Default Five CLI configuration
* Uses devnet as the default target for safety
*/
export declare const DEFAULT_CONFIG: FiveConfig;
/**
* Configuration override options for CLI commands
*/
export interface ConfigOverrides {
/** Override target network */
target?: ConfigTarget;
/** Override network RPC URL */
network?: string;
/** Override keypair file path */
keypair?: string;
}
/**
* Configuration validation utilities
*/
export declare const CONFIG_VALIDATORS: {
/**
* Validates if a target is supported
*/
isValidTarget(target: string): target is ConfigTarget;
/**
* Validates if a network endpoint configuration is valid
*/
isValidNetworkEndpoint(endpoint: any): endpoint is NetworkEndpoint;
/**
* Validates if a complete config object is valid
*/
isValidConfig(config: any): config is FiveConfig;
};
//# sourceMappingURL=types.d.ts.map