Skip to content

Commit

Permalink
Consolidate dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph committed Oct 20, 2024
1 parent b7f3b49 commit 1470bb0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ default = []
[dependencies]
base64 = "0.22.1"
bitcoin = "0.32.3"
bitcoin-io = "0.1.2"
bitcoin_hashes = "0.14.0"
hex = "0.4.3"
miniscript = "12.2.0"
snafu = { version = "0.8.5", default-features = false, features = ["rust_1_61", "std"] }
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum Error {
signature: String,
},
#[snafu(display("Transaction encode error"))]
TransactionEncode { source: bitcoin_io::Error },
TransactionEncode { source: bitcoin::io::Error },
#[snafu(display("Transaction extract error"))]
TransactionExtract {
source: bitcoin::psbt::ExtractTxError,
Expand All @@ -44,7 +44,7 @@ pub enum Error {
#[snafu(display("Witness empty"))]
WitnessEmpty,
#[snafu(display("Encode witness error"))]
WitnessEncoding { source: bitcoin_io::Error },
WitnessEncoding { source: bitcoin::io::Error },
#[snafu(display("Signature of wrong length `{length}`"))]
SignatureLength {
length: usize,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use {
base64::{engine::general_purpose, Engine},
bitcoin::hashes::{sha256, Hash},
bitcoin::{
absolute::LockTime,
address::AddressData,
Expand All @@ -16,7 +17,6 @@ use {
Address, Amount, EcdsaSighashType, OutPoint, PrivateKey, PublicKey, ScriptBuf, Sequence,
Transaction, TxIn, TxOut, Witness,
},
bitcoin_hashes::{sha256, Hash},
error::Error,
snafu::{ResultExt, Snafu},
std::str::FromStr,
Expand Down
4 changes: 2 additions & 2 deletions src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn verify_simple_encoded(address: &str, message: &str, signature: &str) -> R
.context(error::AddressParse { address })?
.assume_checked();

let mut cursor = bitcoin_io::Cursor::new(
let mut cursor = bitcoin::io::Cursor::new(
general_purpose::STANDARD
.decode(signature)
.context(error::SignatureDecode { signature })?,
Expand All @@ -24,7 +24,7 @@ pub fn verify_full_encoded(address: &str, message: &str, to_sign: &str) -> Resul
.context(error::AddressParse { address })?
.assume_checked();

let mut cursor = bitcoin_io::Cursor::new(general_purpose::STANDARD.decode(to_sign).context(
let mut cursor = bitcoin::io::Cursor::new(general_purpose::STANDARD.decode(to_sign).context(
error::TransactionBase64Decode {
transaction: to_sign,
},
Expand Down

0 comments on commit 1470bb0

Please sign in to comment.