Skip to content

Commit a52763d

Browse files
Upgrade to secp256k1 0.21
Release 0.21 includes a module restructure which we can now make use of. This simplifies some imports.
1 parent d35340d commit a52763d

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use-serde = ["serde", "secp256k1/serde"]
3030
use-rand = ["rand", "secp256k1/rand"]
3131

3232
[dependencies]
33-
secp256k1 = "0.20.0"
33+
secp256k1 = "0.21.0"
3434
secp256k1-zkp-sys = { version = "0.4.0", default-features = false, path = "./secp256k1-zkp-sys" }
3535
rand = { version = "0.6", default-features = false, optional = true }
3636
serde = { version = "1.0", default-features = false, optional = true }

src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ use core::{fmt, str};
6565

6666
pub use secp256k1::*;
6767

68-
pub use key::{PublicKey, SecretKey};
69-
7068
#[cfg(feature = "serde")]
7169
mod serde_util;
7270
mod zkp;

src/zkp/ecdsa_adaptor.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ use ffi::{self, CPtr, ECDSA_ADAPTOR_SIGNATURE_LENGTH};
1313
use rand::thread_rng;
1414
#[cfg(any(test, feature = "rand"))]
1515
use rand::{CryptoRng, Rng};
16-
use {constants, PublicKey, Secp256k1, SecretKey};
16+
use secp256k1::ecdsa::Signature;
17+
use secp256k1::{PublicKey, SecretKey};
18+
use {constants, Secp256k1};
1719
use {from_hex, Error};
1820
use {Message, Signing};
19-
use {Signature, Verification};
21+
use Verification;
2022

2123
/// Represents an adaptor signature and dleq proof.
2224
#[derive(Debug, PartialEq, Clone, Copy, Eq)]

src/zkp/rangeproof.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ use ffi::RANGEPROOF_MAX_LENGTH;
22
use from_hex;
33
use std::ops::Range;
44
use std::str;
5+
use secp256k1::SecretKey;
56
use Error;
67
use Generator;
78
use PedersenCommitment;
89
use Verification;
9-
use {ffi, Secp256k1, SecretKey, Signing, Tweak};
10+
use {ffi, Secp256k1, Signing, Tweak};
1011

1112
/// Represents a range proof.
1213
///

src/zkp/whitelist.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ use std::{fmt, str};
88
use core::ptr;
99

1010
use ffi::CPtr;
11+
use secp256k1::{PublicKey, SecretKey};
1112
#[cfg(feature = "std")]
1213
use from_hex;
13-
use {ffi, secp256k1, Error, PublicKey, Secp256k1, SecretKey, Signing, Verification};
14+
use {ffi, secp256k1, Error, Secp256k1, Signing, Verification};
1415

1516
/// A whitelist ring signature.
1617
#[derive(Clone, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)