Skip to content

Commit

Permalink
Add MSRV for 1.63 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph authored Sep 9, 2024
1 parent f368159 commit c79c0d9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
name = "bip322"
version = "0.0.7"
edition = "2021"
description = "Implements BIP322 generic message signing"
description = "Implements BIP322 generic message signing and verification"
license = "CC0-1.0"
homepage = "https://bip322.rs"
repository = "https://github.com/raphjaph/bip322"
rust-version = "1.63"

[dependencies]
base64 = "0.22.1"
bitcoin = { version = "0.31.2" }
bitcoin = "0.31.2"
bitcoin_hashes = "0.14.0"
hex = "0.4.3"
miniscript = "11.0.0"
snafu = "0.8.4"
snafu = { version = "0.8.4", default-features = false, features = ["rust_1_61", "std"] }

[dev-dependencies]
pretty_assertions = "1.4.0"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ The WASM binary and Javascript glue code can then be found in `www/pkg`. The
[bip322.rs](https://bip322.rs) site also runs a small WASM binary if you'd like
to check it out.

## MSRV

At the moment the Minimum Supported Rust Version (MSRV) is 1.63. You can check
it by running `just msrv`.
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ outdated:
coverage:
cargo llvm-cov

msrv:
cargo msrv verify -- rustup run 1.63 cargo check

wasm:
AR=/opt/homebrew/opt/llvm/bin/llvm-ar \
CC=/opt/homebrew/opt/llvm/bin/clang \
Expand Down
8 changes: 6 additions & 2 deletions src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ fn verify_full_p2wpkh(
return Err(Error::ToSignInvalid);
}

let Some(witness) = to_sign.inputs[0].final_script_witness.clone() else {
let witness = if let Some(witness) = to_sign.inputs[0].final_script_witness.clone() {
witness
} else {
return Err(Error::WitnessEmpty);
};

Expand Down Expand Up @@ -182,7 +184,9 @@ fn verify_full_p2tr(
return Err(Error::ToSignInvalid);
}

let Some(witness) = to_sign.inputs[0].final_script_witness.clone() else {
let witness = if let Some(witness) = to_sign.inputs[0].final_script_witness.clone() {
witness
} else {
return Err(Error::WitnessEmpty);
};

Expand Down

0 comments on commit c79c0d9

Please sign in to comment.