oc · docs
docs / documentation

@orangecheck/vote-core


@orangecheck/vote-core / mempoolBlockTimeSource

Function: mempoolBlockTimeSource()

function mempoolBlockTimeSource(opts?: {
  base?: string;
  fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}): BlockTimeSource;

Defined in: vote-core/src/snapshot.ts:142

BlockTimeSource over a mempool.space-compatible REST API (esplora plus /v1/mining/blocks/timestamp). The explorer is a named trust anchor: pass base to use your own instance.

Parameters

ParameterType
opts&#123; base?: string; fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise&lt;Response>; &#125;
opts.base?string
opts.fetch?(input: RequestInfo | URL, init?: RequestInit) => Promise&lt;Response>

Returns

BlockTimeSource