POST
/
788f110831fe13808302bd79796d55e8
curl --request POST \
  --url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "1.0",
  "method": "getblockfilter",
  "params": [
    "000000000000000000100c3c4b0b07a64612385408f6c7d97c422a5a0c1d859d",
    "basic"
  ],
  "id": 1
}'
{
  "result": {},
  "error": {},
  "id": 123
}

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.

Body

application/json
jsonrpc
string
default:1.0
method
string
default:getblockfilter
params
string[]

The block hash

id
integer
default:1

Response

200 - application/json
The BIP 157 content filter for the block
result
object

An object containing the block filter

error
object
id
integer