@azpool/chia-client
Version:
TypeScript client for Chia node peer RPC interface
24 lines (23 loc) • 1.7 kB
TypeScript
import { AdditionsAndRemovalsResponse, BlockchainStateResponse, BlockRecordResponse, BlockRecordsResponse, BlockResponse, BlocksResponse, CoinRecordResponse, CoinResponse, NetspaceResponse, UnfinishedBlockHeadersResponse } from "./types/FullNode/RpcResponse";
import { ChiaOptions, RpcClient } from "./RpcClient";
import { Block } from "./types/FullNode/Block";
import { BlockRecord } from "./types/FullNode/BlockRecord";
import { CertPath } from "./types/CertPath";
declare class FullNode extends RpcClient {
constructor(options?: Partial<ChiaOptions> & CertPath);
getBlockchainState(): Promise<BlockchainStateResponse>;
getNetworkSpace(newerBlockHeaderHash: string, olderBlockHeaderHash: string): Promise<NetspaceResponse>;
getBlocks<B extends boolean>(start: number, end: number, excludeHeaderHash?: B): Promise<BlocksResponse<Block>>;
getBlock(headerHash: string): Promise<BlockResponse>;
getBlockRecordByHeight(height: number): Promise<BlockRecordResponse>;
getBlockRecord(hash: string): Promise<BlockRecordResponse>;
getBlockRecords(start: number, end: number): Promise<BlockRecordsResponse<BlockRecord>>;
getUnfinishedBlockHeaders(height: number): Promise<UnfinishedBlockHeadersResponse>;
getUnspentCoins(puzzleHash: string, startHeight?: number, endHeight?: number): Promise<CoinResponse>;
getCoinRecordByName(name: string): Promise<CoinRecordResponse>;
getAdditionsAndRemovals(hash: string): Promise<AdditionsAndRemovalsResponse>;
addressToPuzzleHash(address: string): string;
puzzleHashToAddress(puzzleHash: string): string;
getCoinInfo(parentCoinInfo: string, puzzleHash: string, amount: number): string;
}
export { FullNode };