Optionalopts: { forcePolling?: boolean; pollingInterval?: number }OptionalforcePolling?: booleanForce polling even when websocket transport is available.
OptionalpollingInterval?: numberPolling interval in milliseconds.
Fetch the current chain tip.
Current chain height, block time, and block hash
Fetch spendable onchain outputs for an address.
Bitcoin address to query
Spendable onchain outputs for the address
Fetch transactions associated with an address.
Bitcoin address to query
Transactions involving the address
Fetch outspend information for every output in a transaction.
Transaction id to inspect
Per-output spend status information. txid (the spender) may be
absent even when spent is true: some Esplora deployments
(e.g. mempool.arkade.sh) omit it from /outspends.
Watch a set of addresses and invoke the callback when transactions are observed.
Addresses to monitor
Stop function that cancels the watch
Implementation of the onchain provider interface for esplora REST API.
See
https://mempool.space/docs/api/rest
Example