chia-agent
Version:
chia rpc/websocket client library
34 lines (33 loc) • 1.87 kB
TypeScript
import { str } from "../../chia/types/_python_types_";
import { uint64 } from "../../chia_rs/wheel/python/sized_ints";
import type { RPCAgent } from "../../../rpc";
import { ErrorResponse, GetFarmerResponse, GetPoolInfoResponse, PostFarmerRequest, PostFarmerResponse, PostPartialRequest, PostPartialResponse, PutFarmerRequest, PutFarmerResponse } from "../../chia/protocols/pool_protocol";
import { FarmerRecord } from "../../pool-reference/pool/record";
export type TPoolInfoResponse = GetPoolInfoResponse;
export declare function pool_info(agent: RPCAgent): Promise<GetPoolInfoResponse>;
export type TGetFarmerRequest = {
launcher_id: str;
authentication_token: str;
signature: str;
};
export type TGetFarmerResponse = GetFarmerResponse;
export declare function get_farmer(agent: RPCAgent, data: TGetFarmerRequest): Promise<GetFarmerResponse>;
export type TPostFarmerRequest = PostFarmerRequest;
export type TPostFarmerResponse = PostFarmerResponse | ErrorResponse;
export declare function post_farmer(agent: RPCAgent, data: TPostFarmerRequest): Promise<TPostFarmerResponse>;
export type TPutFarmerRequest = PutFarmerRequest;
export type TPutFarmerResponse = PutFarmerResponse | ErrorResponse;
export declare function put_farmer(agent: RPCAgent, data: TPutFarmerRequest): Promise<TPutFarmerResponse>;
export type TPartialRequest = PostPartialRequest;
export type TPartialResponse = PostPartialResponse | ErrorResponse;
export declare function partial(agent: RPCAgent, data: TPartialRequest): Promise<TPartialResponse>;
export type TLoginRequest = {
launcher_id: str;
authentication_token: uint64;
signature: str;
};
export type TLoginResponse = {
farmer_record: FarmerRecord;
recent_partials: Array<[uint64, uint64]>;
} | Record<string, never>;
export declare function login(agent: RPCAgent, data: TLoginRequest): Promise<TLoginResponse>;