@bsv/wallet-toolbox-mobile
Version:
Client only Wallet Storage
51 lines • 1.86 kB
TypeScript
import { BlockHeader, Chain } from '../../../../sdk';
import { LiveIngestorBase, LiveIngestorBaseOptions } from './LiveIngestorBase';
import { WhatsOnChainServices, WhatsOnChainServicesOptions } from './WhatsOnChainServices';
export interface LiveIngestorWhatsOnChainOptions extends LiveIngestorBaseOptions, WhatsOnChainServicesOptions {
/**
* Maximum msces of "normal" time with no ping received from connected WoC service.
*/
idleWait: number | undefined;
/**
* Which chain is being tracked: main, test, or stn.
*/
chain: Chain;
/**
* WhatsOnChain.com API Key
* https://docs.taal.com/introduction/get-an-api-key
* If unknown or empty, maximum request rate is limited.
* https://developers.whatsonchain.com/#rate-limits
*/
apiKey?: string;
/**
* Request timeout for GETs to https://api.whatsonchain.com/v1/bsv
*/
timeout: number;
/**
* User-Agent header value for requests to https://api.whatsonchain.com/v1/bsv
*/
userAgent: string;
/**
* Enable WhatsOnChain client cache option.
*/
enableCache: boolean;
/**
* How long chainInfo is considered still valid before updating (msecs).
*/
chainInfoMsecs: number;
}
/**
* Reports new headers by polling periodically.
*/
export declare class LiveIngestorWhatsOnChainPoll extends LiveIngestorBase {
static createLiveIngestorWhatsOnChainOptions(chain: Chain): LiveIngestorWhatsOnChainOptions;
idleWait: number;
woc: WhatsOnChainServices;
done: boolean;
constructor(options: LiveIngestorWhatsOnChainOptions);
getHeaderByHash(hash: string): Promise<BlockHeader | undefined>;
startListening(liveHeaders: BlockHeader[]): Promise<void>;
stopListening(): void;
shutdown(): Promise<void>;
}
//# sourceMappingURL=LiveIngestorWhatsOnChainPoll.d.ts.map