Skip to content

Commit c52a9a0

Browse files
feat(api): expose bitcoin types for the API
In some cases, you need to use the bitcoin primitive to convert a type into another format or build a type from a hex string. This commit will reexport the primitive used in the client without forcing the caller to add the bitcoin crate as direct dependency. The motivation to have this is when you are interacting with a system that is not rust, and you do not need the rust-bitcoin. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
1 parent 3496410 commit c52a9a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/api.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
//!
33
//! see: <https://github.com/Blockstream/esplora/blob/master/API.md>
44
5-
use bitcoin::hashes::hex::FromHex;
6-
use bitcoin::{BlockHash, OutPoint, Script, Transaction, TxIn, TxOut, Txid, Witness};
5+
pub use bitcoin::consensus::{deserialize, serialize};
6+
pub use bitcoin::hashes::hex::FromHex;
7+
pub use bitcoin::{BlockHash, OutPoint, Script, Transaction, TxIn, TxOut, Txid, Witness};
78

89
use serde::Deserialize;
910

0 commit comments

Comments
 (0)