Make bdk_esplora wasm compatible again

There's a huge todo!() for the AsyncClient
This commit is contained in:
Daniela Brozzoni
2023-03-03 12:07:04 +01:00
parent a38f63359d
commit 0ba41c5751
4 changed files with 34 additions and 3 deletions

View File

@@ -77,6 +77,7 @@ pub trait EsploraExt {
}
}
#[cfg(feature = "blocking")]
impl EsploraExt for esplora_client::BlockingClient {
fn scan<K: Ord + Clone>(
&self,
@@ -302,3 +303,18 @@ fn map_confirmation_time(tx_status: &TxStatus, height_at_start: u32) -> Confirma
_ => ConfirmationTime::Unconfirmed,
}
}
#[cfg(feature = "async")]
impl EsploraExt for esplora_client::AsyncClient {
fn scan<K: Ord + Clone>(
&self,
_local_chain: &BTreeMap<u32, BlockHash>,
_keychain_spks: BTreeMap<K, impl IntoIterator<Item = (u32, Script)>>,
_txids: impl IntoIterator<Item = Txid>,
_outpoints: impl IntoIterator<Item = OutPoint>,
_stop_gap: usize,
_parallel_requests: usize,
) -> Result<KeychainScan<K, ConfirmationTime>, Error> {
todo!()
}
}