Esplora Commands

The esplora namespace provides block explorer functionality for querying blocks, transactions, addresses, and fee estimates via the Electrs/Esplora API.

Block Queries

CommandDescription
blocks-tip-hashGet the hash of the latest block
blocks-tip-heightGet the height of the latest block
blocksGet latest blocks
block-heightGet block hash at a height
blockGet block details
block-statusGet block status
block-txidsGet transaction IDs in a block
block-headerGet block header
block-rawGet raw block data
block-txsGet transactions in a block

Address Queries

CommandDescription
addressGet address information
address-txsGet address transactions
address-txs-chainGet confirmed address transactions
address-txs-mempoolGet mempool transactions for address
address-utxoGet UTXOs for an address
address-prefixSearch addresses by prefix

Transaction Queries

CommandDescription
txGet transaction details
tx-hexGet transaction as hex
tx-rawGet raw transaction data
tx-statusGet transaction status
tx-merkle-proofGet merkle proof
tx-outspendGet outpoint spending info
tx-outspendsGet all output spending info

Other Commands

CommandDescription
broadcastBroadcast a transaction
mempoolGet mempool info
mempool-txidsGet mempool transaction IDs
mempool-recentGet recent mempool transactions
fee-estimatesGet fee rate estimates

esplora blocks-tip-height

Get the current blockchain tip height.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora blocks-tip-height

# Output:
# Tip Height: 850123

esplora block

Get details for a specific block.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora block 840000

# Arguments:
# <BLOCK_HASH_OR_HEIGHT>  Block hash or height

esplora address

Get information about a Bitcoin address.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora address bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h

# Arguments:
# <ADDRESS>  Bitcoin address

esplora address-utxo

Get unspent transaction outputs (UTXOs) for an address.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora address-utxo bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h

# Arguments:
# <ADDRESS>  Bitcoin address

# Example Response:
# [
#   {
#     "txid": "abc123...",
#     "vout": 0,
#     "value": 10000,
#     "status": {
#       "confirmed": true,
#       "block_height": 840000
#     }
#   }
# ]

esplora tx

Get transaction details.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora tx <TXID>

# Arguments:
# <TXID>  Transaction ID

esplora fee-estimates

Get current fee rate estimates for different confirmation targets.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora fee-estimates

# Example Response:
# {
#   "1": 25.5,    // 1 block target: 25.5 sat/vB
#   "3": 20.0,    // 3 block target: 20.0 sat/vB
#   "6": 15.2,    // 6 block target: 15.2 sat/vB
#   "25": 10.0,   // 25 block target: 10.0 sat/vB
#   "144": 5.0,   // 144 block target: 5.0 sat/vB
#   "504": 3.0    // 504 block target: 3.0 sat/vB
# }

esplora broadcast

Broadcast a signed transaction to the network.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora broadcast <TX_HEX>

# Arguments:
# <TX_HEX>  Signed transaction as hexadecimal

esplora mempool

Get mempool statistics.

alkanes-cli -p mainnet \
  --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \
  esplora mempool

# Get mempool transaction IDs
alkanes-cli esplora mempool-txids

# Get recent mempool transactions
alkanes-cli esplora mempool-recent

JSON-RPC Equivalent

These CLI commands correspond to JSON-RPC methods with the esplora_ prefix:

# CLI → JSON-RPC mapping:
# esplora address-utxo → esplora_address::utxo
# esplora fee-estimates → esplora_fee-estimates
# esplora blocks-tip-height → esplora_blocks:tip:height

# Example JSON-RPC:
{
  "jsonrpc": "2.0",
  "method": "esplora_address::utxo",
  "params": ["bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h"],
  "id": 1
}