[blockchain] add the Esplora backend

This commit is contained in:
Alekos Filini
2020-05-07 15:14:05 +02:00
parent de4a6a47e6
commit 95b2cd4c32
8 changed files with 670 additions and 270 deletions

View File

@@ -44,9 +44,11 @@ pub enum Error {
Hex(bitcoin::hashes::hex::Error),
PSBT(bitcoin::util::psbt::Error),
#[cfg(any(feature = "electrum", feature = "default"))]
#[cfg(feature = "electrum")]
Electrum(electrum_client::Error),
#[cfg(any(feature = "key-value-db", feature = "default"))]
#[cfg(feature = "esplora")]
Esplora(crate::blockchain::esplora::EsploraError),
#[cfg(feature = "key-value-db")]
Sled(sled::Error),
}
@@ -73,7 +75,9 @@ impl_error!(serde_json::Error, JSON);
impl_error!(bitcoin::hashes::hex::Error, Hex);
impl_error!(bitcoin::util::psbt::Error, PSBT);
#[cfg(any(feature = "electrum", feature = "default"))]
#[cfg(feature = "electrum")]
impl_error!(electrum_client::Error, Electrum);
#[cfg(any(feature = "key-value-db", feature = "default"))]
#[cfg(feature = "esplora")]
impl_error!(crate::blockchain::esplora::EsploraError, Esplora);
#[cfg(feature = "key-value-db")]
impl_error!(sled::Error, Sled);