UNPKG

@ton3/liteclient

Version:
37 lines (36 loc) 968 B
/// <reference types="node" /> import EventEmitter from 'events'; import { ADNLClientTCP } from 'adnl'; import { BlockchainClient } from './blockchain'; interface LiteClientStats { roundTimeTrip: number; outOfSync: number; head: number; } declare class LiteClient { private readonly _url; private readonly _publicKey; private _isReady; adnl: ADNLClientTCP; api: BlockchainClient; roundTimeTrips: number[]; outOfSyncs: number[]; utime: number; seqno: number; readonly events: EventEmitter; private constructor(); private onReady; private onError; static create(url: string, publicKey: string | Uint8Array): LiteClient; private ping; private sync; private delay; private loop; get url(): string; get publicKey(): string | Uint8Array; get stats(): LiteClientStats; get isReady(): boolean; get isSynced(): boolean; get isAlive(): boolean; } export { LiteClient };