Skip to content

Commit b1a3048

Browse files
committed
Update rust upstream
1 parent 3db533c commit b1a3048

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
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.22.1"
3434
secp256k1-zkp-sys = { version = "0.5.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 }

secp256k1-zkp-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ features = [ "recovery", "lowmemory" ]
2323
cc = "1.0.28"
2424

2525
[dependencies]
26-
secp256k1-sys = "0.4"
26+
secp256k1-sys = "0.5"
2727

2828
[features]
2929
default = ["std"]

src/lib.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub use secp256k1_zkp_sys as ffi;
4444
extern crate secp256k1;
4545

4646
#[cfg(feature = "bitcoin_hashes")]
47-
pub use secp256k1::bitcoin_hashes as hashes;
47+
pub use secp256k1::hashes;
4848
#[cfg(any(test, feature = "std"))]
4949
extern crate core;
5050
#[cfg(any(test, feature = "rand"))]
@@ -65,12 +65,10 @@ use core::{fmt, str};
6565

6666
pub use secp256k1::constants;
6767
pub use secp256k1::ecdh;
68-
pub use secp256k1::key;
69-
#[cfg(feature = "recovery")]
70-
pub use secp256k1::recovery;
71-
pub use secp256k1::schnorrsig;
68+
pub use secp256k1::ecdsa;
69+
pub use secp256k1::schnorr;
7270

73-
pub use key::{PublicKey, SecretKey};
71+
pub use {PublicKey, SecretKey};
7472

7573
pub use secp256k1::*;
7674

src/zkp/ecdsa_adaptor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rand::{CryptoRng, Rng};
1616
use {constants, PublicKey, Secp256k1, SecretKey};
1717
use {from_hex, Error};
1818
use {Message, Signing};
19-
use {Signature, Verification};
19+
use {ecdsa::Signature, Verification};
2020

2121
/// Represents an adaptor signature and dleq proof.
2222
#[derive(Debug, PartialEq, Clone, Copy, Eq)]
@@ -309,7 +309,7 @@ mod tests {
309309
.decrypt(&adaptor_secret)
310310
.expect("to be able to decrypt using the correct secret");
311311
SECP256K1
312-
.verify(&msg, &sig, &pubkey)
312+
.verify_ecdsa(&msg, &sig, &pubkey)
313313
.expect("signature to be valid");
314314
let recovered = adaptor_sig
315315
.recover(&SECP256K1, &sig, &adaptor)

src/zkp/rangeproof.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl RangeProof {
203203
#[cfg(feature = "bitcoin_hashes")]
204204
impl ::core::fmt::Display for RangeProof {
205205
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
206-
use bitcoin_hashes::hex::format_hex;
206+
use hashes::hex::format_hex;
207207

208208
format_hex(self.serialize().as_slice(), f)
209209
}

src/zkp/surjection_proof.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl SurjectionProof {
183183
#[cfg(feature = "bitcoin_hashes")]
184184
impl ::core::fmt::Display for SurjectionProof {
185185
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
186-
use bitcoin_hashes::hex::format_hex;
186+
use hashes::hex::format_hex;
187187

188188
format_hex(self.serialize().as_slice(), f)
189189
}

0 commit comments

Comments
 (0)