Skip to content

Commit d66f02f

Browse files
committed
remove secp256k1 and bitcoin hashes dependencies
1 parent c038d5d commit d66f02f

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ readme = "README.md"
1212

1313
[dependencies]
1414
bitcoin = { version= "0.23", features=["use-serde"]}
15-
bitcoin_hashes={version="0.7", features=["serde"]}
16-
secp256k1 = "0.17"
1715
rand="0.7"
1816
rust-crypto = "0.2"
1917
serde = "1"

src/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//!
1919
//! Accounts compatible with BIP32, BIP39, BIP44, BIP49, BIP84
2020
//!
21+
use bitcoin::hashes::{hash160, Hash};
2122
use bitcoin::util::bip32::ExtendedPubKey;
2223
use bitcoin::{
2324
blockdata::script::Builder,
@@ -30,7 +31,6 @@ use bitcoin::{
3031
util::bip32::{ChildNumber, ExtendedPrivKey},
3132
Address, OutPoint, PrivateKey, PublicKey, Script, Transaction,
3233
};
33-
use bitcoin_hashes::{hash160, Hash};
3434
use crypto::{
3535
aes, blockmodes, buffer,
3636
buffer::{BufferResult, ReadBuffer, WriteBuffer},

src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
//!
1717
//! # Key derivation
1818
//!
19+
use bitcoin::secp256k1::{All, Message, Secp256k1, Signature};
1920
use bitcoin::{
2021
network::constants::Network,
2122
util::bip32::{ChildNumber, ExtendedPrivKey, ExtendedPubKey},
2223
PrivateKey, PublicKey,
2324
};
24-
use secp256k1::{All, Message, Secp256k1, Signature};
2525

2626
use account::Seed;
2727
use error::Error;

src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub enum Error {
3939
/// key derivation error
4040
KeyDerivation(bip32::Error),
4141
/// sekp256k1 error
42-
SecpError(secp256k1::Error),
42+
SecpError(bitcoin::secp256k1::Error),
4343
/// cipher error
4444
SymmetricCipherError(symmetriccipher::SymmetricCipherError),
4545
}
@@ -135,8 +135,8 @@ impl convert::From<symmetriccipher::SymmetricCipherError> for Error {
135135
}
136136
}
137137

138-
impl convert::From<secp256k1::Error> for Error {
139-
fn from(err: secp256k1::Error) -> Error {
138+
impl convert::From<bitcoin::secp256k1::Error> for Error {
139+
fn from(err: bitcoin::secp256k1::Error) -> Error {
140140
Error::SecpError(err)
141141
}
142142
}

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
#![forbid(unsafe_code)]
2323

2424
extern crate bitcoin;
25-
extern crate bitcoin_hashes;
2625
extern crate crypto;
2726
#[cfg(test)]
2827
extern crate hex;
2928
extern crate rand;
30-
extern crate secp256k1;
3129
extern crate serde;
3230
#[macro_use]
3331
extern crate serde_derive;

src/proved.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
//!
1919
//!
2020
21+
use bitcoin::hashes::{sha256d, Hash, HashEngine};
2122
use bitcoin::{BitcoinHash, Block, Transaction};
22-
use bitcoin_hashes::{sha256d, Hash, HashEngine};
2323

2424
/// A confirmed transaction with its SPV proof
2525
#[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq)]

0 commit comments

Comments
 (0)