mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-19 14:24:47 -07:00
mempool: fixes
This commit is contained in:
@@ -10839,6 +10839,20 @@ class BrkClient extends BrkClientBase {
|
||||
return this.getJson(path, { signal, onValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Mempool content hash
|
||||
*
|
||||
* Returns an opaque `u64` that changes whenever the projected next block changes. Same value as the mempool ETag. Useful as a freshness/liveness signal: if it stays constant for tens of seconds on a live network, the mempool sync loop has stalled.
|
||||
*
|
||||
* Endpoint: `GET /api/mempool/hash`
|
||||
* @param {{ signal?: AbortSignal, onValue?: (value: number) => void }} [options]
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
async getMempoolHash({ signal, onValue } = {}) {
|
||||
const path = `/api/mempool/hash`;
|
||||
return this.getJson(path, { signal, onValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Live BTC/USD price
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user