Skip to content

Commit 8a0101e

Browse files
authored
Consolidate dependencies (#40)
1 parent b7f3b49 commit 8a0101e

File tree

7 files changed

+5
-13
lines changed

7 files changed

+5
-13
lines changed

Cargo-minimal.lock

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ version = "0.0.7"
3636
dependencies = [
3737
"base64",
3838
"bitcoin",
39-
"bitcoin-io",
40-
"bitcoin_hashes",
4139
"hex",
4240
"miniscript",
4341
"pretty_assertions",

Cargo-recent.lock

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ version = "0.0.7"
3636
dependencies = [
3737
"base64",
3838
"bitcoin",
39-
"bitcoin-io",
40-
"bitcoin_hashes",
4139
"hex",
4240
"miniscript",
4341
"pretty_assertions",

Cargo.lock

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ default = []
1414
[dependencies]
1515
base64 = "0.22.1"
1616
bitcoin = "0.32.3"
17-
bitcoin-io = "0.1.2"
18-
bitcoin_hashes = "0.14.0"
1917
hex = "0.4.3"
2018
miniscript = "12.2.0"
2119
snafu = { version = "0.8.5", default-features = false, features = ["rust_1_61", "std"] }

src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum Error {
1818
signature: String,
1919
},
2020
#[snafu(display("Transaction encode error"))]
21-
TransactionEncode { source: bitcoin_io::Error },
21+
TransactionEncode { source: bitcoin::io::Error },
2222
#[snafu(display("Transaction extract error"))]
2323
TransactionExtract {
2424
source: bitcoin::psbt::ExtractTxError,
@@ -44,7 +44,7 @@ pub enum Error {
4444
#[snafu(display("Witness empty"))]
4545
WitnessEmpty,
4646
#[snafu(display("Encode witness error"))]
47-
WitnessEncoding { source: bitcoin_io::Error },
47+
WitnessEncoding { source: bitcoin::io::Error },
4848
#[snafu(display("Signature of wrong length `{length}`"))]
4949
SignatureLength {
5050
length: usize,

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use {
22
base64::{engine::general_purpose, Engine},
3+
bitcoin::hashes::{sha256, Hash},
34
bitcoin::{
45
absolute::LockTime,
56
address::AddressData,
@@ -16,7 +17,6 @@ use {
1617
Address, Amount, EcdsaSighashType, OutPoint, PrivateKey, PublicKey, ScriptBuf, Sequence,
1718
Transaction, TxIn, TxOut, Witness,
1819
},
19-
bitcoin_hashes::{sha256, Hash},
2020
error::Error,
2121
snafu::{ResultExt, Snafu},
2222
std::str::FromStr,

src/verify.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub fn verify_simple_encoded(address: &str, message: &str, signature: &str) -> R
66
.context(error::AddressParse { address })?
77
.assume_checked();
88

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

27-
let mut cursor = bitcoin_io::Cursor::new(general_purpose::STANDARD.decode(to_sign).context(
27+
let mut cursor = bitcoin::io::Cursor::new(general_purpose::STANDARD.decode(to_sign).context(
2828
error::TransactionBase64Decode {
2929
transaction: to_sign,
3030
},

0 commit comments

Comments
 (0)