UNPKG

@azpool/chia-client

Version:

TypeScript client for Chia node peer RPC interface

21 lines (20 loc) 608 B
declare type Protocol = "https" | "http"; interface ChiaOptions { protocol: Protocol; hostname: string; port: number; caCertPath: string | boolean; certPath: string; keyPath: string; rejectUnauthorized?: boolean; } declare class RpcClient { private readonly protocol; private readonly hostname; private readonly port; private readonly agent; constructor(options: ChiaOptions); private baseUri; protected request<T>(route: string, body: Record<string, string | number | boolean | string[] | undefined>): Promise<T>; } export { ChiaOptions, RpcClient };