mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 17:24:58 +02:00
Merge bitcoin/bitcoin#17631: Expose block filters over REST
2b64fa3251Update REST docs with new accessors (Matt Corallo)ef7c8228fdExpose block filters over REST. (Matt Corallo) Pull request description: This adds a new rest endpoint: /rest/blockfilter/filtertype/requesttype/blockhash (eg /rest/blockfilter/basic/header/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.hex) which exposes either the filter "header" or the filter data itself. Most of the code is cribbed from the equivalent RPC. You can test it at000000005b.hex ACKs for top commit: dergoegge: ACK2b64fa3251- Adding blockfilters to the REST interface is analogous to serving other public data such as transactions or blocks. Tree-SHA512: d487bc694266375c94d6fcf2e9d788a8a42a3b94e8d3290e46335a64cbcde55084ce5ea6119b79a4065888d94d7c3ae25a59a901fa46e3711f0eb296add12696
This commit is contained in:
@@ -52,6 +52,20 @@ With the /notxdetails/ option JSON response will only contain the transaction ha
|
||||
Given a block hash: returns <COUNT> amount of blockheaders in upward direction.
|
||||
Returns empty if the block doesn't exist or it isn't in the active chain.
|
||||
|
||||
#### Blockfilter Headers
|
||||
`GET /rest/blockfilterheaders/<FILTERTYPE>/<COUNT>/<BLOCK-HASH>.<bin|hex|json>`
|
||||
|
||||
Given a block hash: returns <COUNT> amount of blockfilter headers in upward
|
||||
direction for the filter type <FILTERTYPE>.
|
||||
Returns empty if the block doesn't exist or it isn't in the active chain.
|
||||
|
||||
#### Blockfilters
|
||||
`GET /rest/blockfilter/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>`
|
||||
|
||||
Given a block hash: returns the block filter of the given block of type
|
||||
<FILTERTYPE>.
|
||||
Responds with 404 if the block doesn't exist.
|
||||
|
||||
#### Blockhash by height
|
||||
`GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user