Get raw blocks
See original GitHub issueHi,
Reading through the issues this is not the only request but here it is anyway.
I’m currently putting up a Bitcoin backend plugin for C-lightning [1] which would hit an esplora instance’s API. C-lightning needs sendrawtransaction
, gettxout
, getblock
, estimatesmartfee
and some fields of getblockchainfo
.
Almost everything was provided by esplora, but not raw blocks (verbosity 0 in getblock
). It would be great to be able to get them, say, the same way we access the raw transactions (“GET /tx/:txid/hex” ==> “GET /block/:blockhash/hex”).
Anyway, thanks for open sourcing such a great API for working with Bitcoin !
[1] To potentially replace bitcoind
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How get raw block data? - Bitcoin Stack Exchange
I can use getblock json rpc method to get parsed block, but I need raw data. Is there any way to get raw...
Read more >Block of Raw Iron - Minecraft Wiki - Fandom
A block of raw iron is a raw metal block equivalent to nine raw iron. Blocks of raw iron can be mined only...
Read more >How to Get Blocks of Raw Iron, Gold, and Copper in ...
Each Block of Raw Ore can be crafted by taking nine Raw Ore of their respective resources, and placing them in each slot....
Read more >Raw Block T-Shirt - Get Raw Nutrition
raw apparel. Premium apparel for a supperior performance. Limited edition designs printed at our in-house facility. Fit & Wash Instructions. Our shirts feaure ......
Read more >How to make a Block of Raw Gold in Minecraft
Where to find a Block of Raw Gold in Creative Mode. Java; PE; Xbox; PS; Nintendo; Win10; Edu. Minecraft Java Edition (PC/Mac).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, actually, after giving this some more thought… the alternative outlined at the end of (1) - treating them as byte blobs and manually stitching them together - isn’t really that complicated or error prone, its just
<raw header><varint tx count><raw txs>
.I went ahead and implemented this in https://github.com/Blockstream/electrs/commit/de1ffb9cd7f434e7b17de0b8858cc82b48a294b3, will become available with the next deployment.
@lvaccaro Given some error messages from the Esplora API I assumed it relied on the bitcoind API for some of its calls so a
getblock <blockhash> 1
seems possible