electrs icon indicating copy to clipboard operation
electrs copied to clipboard

Feature: HTTP RPC API

Open cryptoquick opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. We're currently using Blockstream's Esplora with BDK, but it's quite heavy and out of date with current electrs.

Describe the solution you'd like I've considered making a crate called electrs-http-proxy that's just a reimplementation of the Esplora REST API that proxies to wrap electrs. Would this make sense to do as a separate crate?

Describe alternatives you've considered An HTTP server will likely be opinionated and might complicate maintenance of electrs itself, and I'd be open to other implementations behind feature gating, but if I was doing it, I'd probably default to updating the interface to use axum, while referencing the hyper handler interface used by Blockstream.

Additional context For context, a link to the Blockstream fork for Esplora: https://github.com/Blockstream/electrs

Their REST request handler, using hyper: https://github.com/Blockstream/electrs/blob/a808b51d0d9301fa82390b985c57551966001f9b/src/rest.rs#L615

I'm open to opinions, advice, especially of anything I might seem to be unaware of.

cryptoquick avatar Dec 31 '22 20:12 cryptoquick

Good idea, a new proxy crate would be a great contribution!

romanz avatar Jan 01 '23 12:01 romanz