Get the balance of an address and find out whether the address ever received some coins.
A Bitcoin address
An object with 'balance' & confirmedTxCount properties.
Get the balance of a scriptHash and find out whether the scriptHash ever received some coins.
A Bitcoin scriptHash
An object with 'balance' & txCount properties.
Fetches the transaction history for a given address or script hash.
The parameters for the method.
Optional
address?: stringThe address to fetch transaction history for.
Optional
scriptThe script hash to fetch transaction history for.
A promise that resolves to an array containing
transaction history, each item is an object containing txId, blockHeight and irreversible.
txId
is the transaction ID, blockHeight
is the height of the block that includes the transaction,
and irreversible
is a boolean indicating whether the transaction has reached the irreversible confirmation threshold (set to IRREV_CONF_THRESH confirmations).
They are returned in blockchain order. However, esplora might not respect
order when txs belong to the same block. See https://github.com/Blockstream/esplora/issues/165
If both address and scriptHash are provided or if neither are provided.
Get an object where the key is the confirmation target (in number of blocks) and the value is the estimated feerate (in sat/vB).
The available confirmation targets are 1-25, 144, 504
and 1008
blocks.
An object where the key is the confirmation target (in number of blocks).
Get's the BlockStatus: { blockHeight: number; blockHash: string; blockTime: number; }
)
of a certain blockHeight
.
Returns undefined
if this block height has not been mined yet.
BlockStatus | undefined
;
Push a raw Bitcoin transaction to the network.
A raw Bitcoin transaction in hexadecimal string format.
The transaction ID (txId
) if the transaction was broadcasted successfully.
If the transaction is invalid or fails to be broadcasted.
Connect to the server.