From c52a9a08bc440300a74e311dde7c5f9ce0ea9d0f Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sun, 2 Apr 2023 20:43:29 +0200 Subject: [PATCH] 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 --- src/api.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api.rs b/src/api.rs index 54da3091..5c2fce86 100644 --- a/src/api.rs +++ b/src/api.rs @@ -2,8 +2,9 @@ //! //! see: -use bitcoin::hashes::hex::FromHex; -use bitcoin::{BlockHash, OutPoint, Script, Transaction, TxIn, TxOut, Txid, Witness}; +pub use bitcoin::consensus::{deserialize, serialize}; +pub use bitcoin::hashes::hex::FromHex; +pub use bitcoin::{BlockHash, OutPoint, Script, Transaction, TxIn, TxOut, Txid, Witness}; use serde::Deserialize;