getblockfilter | Bitcoin

The getblockfilter method retrieves a BIP 157 content filter for a particular block.

📘

Customization required

This method requires node node customization and will not work out of the box. Talk to us & we'll implement it.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • blockhash (required) — the hash of the block
  • filtertype (required) — the type of filter to retrieve, currently only basic is supported

Response

  • result — an object containing the block filter with the following fields:
    • filter — the hex-encoded filter data
    • header — the hex-encoded filter header
  • error — an object containing an error message if an error occurred, otherwise null
  • id — an integer representing the ID of the request, used to match requests with responses

Use case

Block filters are used to efficiently determine if a block may contain transactions relevant to a particular wallet or light client without downloading the entire block. The getblockfilter method allows retrieving these filters for a specific block.

For example, a light wallet might use getblockfilter to check if it needs to download a particular block to search for wallet transactions, reducing bandwidth and processing requirements compared to downloading every block.

Try the getblockfilter RPC method yourself

Language
Click Try It! to start a request and see the response here!