UNPKG

chia-agent

Version:
85 lines (84 loc) 5.86 kB
import { bool, int, str, True, uint32 } from "../../chia/types/_python_types_"; import { TRPCAgent } from "../../../rpc"; import { Plot } from "../../chia/harvester/harvester"; import { GetMessageType, ResType } from "../../types"; import { TDaemon } from "../../../daemon/index"; export declare const chia_harvester_service = "chia_harvester"; export type chia_harvester_service = typeof chia_harvester_service; export declare const get_plots_command = "get_plots"; export type get_plots_command = typeof get_plots_command; export type TGetPlotsResponse = { plots: Plot[]; failed_to_open_filenames: str[]; not_found_filenames: str[]; }; export type WsGetPlotsMessage = GetMessageType<chia_harvester_service, get_plots_command, TGetPlotsResponse>; export declare function get_plots<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetPlotsResponse, WsGetPlotsMessage>>; export declare const refresh_plots_command = "refresh_plots"; export type refresh_plots_command = typeof refresh_plots_command; export type TRefreshPlotsResponse = Record<string, never>; export type WsRefreshPlotsMessage = GetMessageType<chia_harvester_service, refresh_plots_command, TRefreshPlotsResponse>; export declare function refresh_plots<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TRefreshPlotsResponse, WsRefreshPlotsMessage>>; export declare const delete_plot_command = "delete_plot"; export type delete_plot_command = typeof delete_plot_command; export type TDeletePlotRequest = { filename: str; }; export type TDeletePlotResponse = Record<string, never>; export type WsDeletePlotMessage = GetMessageType<chia_harvester_service, delete_plot_command, TDeletePlotResponse>; export declare function delete_plot<T extends TRPCAgent | TDaemon>(agent: T, data: TDeletePlotRequest): Promise<ResType<T, TDeletePlotResponse, WsDeletePlotMessage>>; export declare const add_plot_directory_command = "add_plot_directory"; export type add_plot_directory_command = typeof add_plot_directory_command; export type TAddPlotDirectoryRequest = { dirname: str; }; export type TAddPlotDirectoryResponse = Record<string, never>; export type WsAddPlotDirectoryMessage = GetMessageType<chia_harvester_service, add_plot_directory_command, TAddPlotDirectoryResponse>; export declare function add_plot_directory<T extends TRPCAgent | TDaemon>(agent: T, data: TAddPlotDirectoryRequest): Promise<ResType<T, TAddPlotDirectoryResponse, WsAddPlotDirectoryMessage>>; export declare const get_plot_directories_command = "get_plot_directories"; export type get_plot_directories_command = typeof get_plot_directories_command; export type TGetPlotDirectoriesResponse = { directories: str[]; }; export type WsGetPlotDirectoriesMessage = GetMessageType<chia_harvester_service, get_plot_directories_command, TGetPlotDirectoriesResponse>; export declare function get_plot_directories<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetPlotDirectoriesResponse, WsGetPlotDirectoriesMessage>>; export declare const remove_plot_directory_command = "remove_plot_directory"; export type remove_plot_directory_command = typeof remove_plot_directory_command; export type TRemovePlotDirectoryRequest = { dirname: str; }; export type TRemovePlotDirectoryResponse = Record<string, never>; export type WsRemovePlotDirectoryMessage = GetMessageType<chia_harvester_service, remove_plot_directory_command, TRemovePlotDirectoryResponse>; export declare function remove_plot_directory<T extends TRPCAgent | TDaemon>(agent: T, data: TRemovePlotDirectoryRequest): Promise<ResType<T, TRemovePlotDirectoryResponse, WsRemovePlotDirectoryMessage>>; export declare const get_harvester_config_command = "get_harvester_config"; export type get_harvester_config_command = typeof get_harvester_config_command; export type TGetHarvesterConfigResponse = { success: True; use_gpu_harvesting: bool; gpu_index: int; enforce_gpu_index: bool; disable_cpu_affinity: bool; parallel_decompressor_count: int; decompressor_thread_count: int; recursive_plot_scan: bool; refresh_parameter_interval_seconds: int; }; export type WsGetHarvesterConfigMessage = GetMessageType<chia_harvester_service, get_harvester_config_command, TGetHarvesterConfigResponse>; export declare function get_harvester_config<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetHarvesterConfigResponse, WsGetHarvesterConfigMessage>>; export declare const update_harvester_config_command = "update_harvester_config"; export type update_harvester_config_command = typeof update_harvester_config_command; export type TUpdateHarvesterConfigRequest = { use_gpu_harvesting?: bool; gpu_index?: int; enforce_gpu_index?: bool; disable_cpu_affinity?: bool; parallel_decompressor_count?: int; decompressor_thread_count?: int; recursive_plot_scan?: bool; refresh_parameter_interval_seconds?: uint32; }; export type TUpdateHarvesterConfigResponse = Record<string, never>; export type WsUpdateHarvesterConfigMessage = GetMessageType<chia_harvester_service, update_harvester_config_command, TUpdateHarvesterConfigResponse>; export declare function update_harvester_config<T extends TRPCAgent | TDaemon>(agent: T, data: TUpdateHarvesterConfigRequest): Promise<ResType<T, TUpdateHarvesterConfigResponse, WsUpdateHarvesterConfigMessage>>; export type RpcHarvesterMessage = TAddPlotDirectoryResponse | TDeletePlotResponse | TGetPlotDirectoriesResponse | TGetPlotsResponse | TRefreshPlotsResponse | TRemovePlotDirectoryResponse | TGetHarvesterConfigResponse | TUpdateHarvesterConfigResponse; export type RpcHarvesterMessageOnWs = WsAddPlotDirectoryMessage | WsDeletePlotMessage | WsGetPlotDirectoriesMessage | WsGetPlotsMessage | WsRefreshPlotsMessage | WsRemovePlotDirectoryMessage | WsGetHarvesterConfigMessage | WsUpdateHarvesterConfigMessage;