Skip to content

blockchain.scripthash.get_mempool

blockchain.scripthash.get_mempool

Return the unconfirmed transactions of a script hash <script hashes>.

Signature

Function: blockchain.scripthash.get_mempool(scripthash, { "include_tokens": true, ...})

Version added: 1.1

  • scripthash

The script hash as a hexadecimal string.

  • filter

    Filter dict for what transactions/utxos are included in the result. Valid filters are:

    • include_tokens - Include all, including those with tokens (default: true).
    • tokens_only - Include only those that contain tokens (default: false).
    • exclude_tokens - Include only those without tokens (default: false).
    • offset - Skip the first n elements (default: 0)
    • limit - Return at most n elements. Use '0' for no limit (default: 0)

    For backward compatibility, include_tokens, tokens_only, and exclude_tokens can be passed as string instead of dict.

Result

A list of mempool transactions in arbitrary order. Each mempool transaction is a dictionary with the following keys:

  • height

    0 if all inputs are confirmed, and -1 otherwise.

  • tx_hash

    The transaction hash in hexadecimal.

  • fee

    The transaction fee in minimum coin units (satoshis).

Result Example

[
  {
    "tx_hash": "45381031132c57b2ff1cbe8d8d3920cf9ed25efd9a0beb764bdb2f24c7d1c7e3",
    "height": 0,
    "fee": 24310
  }
]