deps: Remove bitcoin_hashes and use nostr::hashes re-export
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Add `either@1.15.0` to the dependencies - by Awiteb
|
||||
- Update `nostr` to `0.42.2` - by Awiteb
|
||||
- Remove `bitcoin_hashes` and use `nostr::hashes` re-export - by Awiteb
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
39
Cargo.lock
generated
39
Cargo.lock
generated
@@ -200,34 +200,19 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb"
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin-internals"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b854212e29b96c8f0fe04cab11d57586c8f3257de0d146c76cb3b42b3eb9118"
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin-io"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf"
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin-io"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26792cd2bf245069a1c5acb06aa7ad7abe1de69b507c90b490bca81e0665d0ee"
|
||||
dependencies = [
|
||||
"bitcoin-internals 0.4.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin_hashes"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b"
|
||||
dependencies = [
|
||||
"bitcoin-internals 0.2.0",
|
||||
"bitcoin-internals",
|
||||
"hex-conservative 0.1.2",
|
||||
]
|
||||
|
||||
@@ -237,21 +222,11 @@ version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16"
|
||||
dependencies = [
|
||||
"bitcoin-io 0.1.3",
|
||||
"bitcoin-io",
|
||||
"hex-conservative 0.2.1",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin_hashes"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e5d09f16329cd545d7e6008b2c6b2af3a90bc678cf41ac3d2f6755943301b16"
|
||||
dependencies = [
|
||||
"bitcoin-io 0.2.0",
|
||||
"hex-conservative 0.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.9.1"
|
||||
@@ -727,15 +702,6 @@ dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hex-conservative"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4afe881d0527571892c4034822e59bb10c6c991cce6abe8199b6f5cf10766f55"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hmac"
|
||||
version = "0.12.1"
|
||||
@@ -1115,7 +1081,6 @@ dependencies = [
|
||||
name = "n34"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"bitcoin_hashes 0.16.0",
|
||||
"chrono",
|
||||
"clap",
|
||||
"clap-verbosity-flag",
|
||||
|
||||
@@ -12,7 +12,6 @@ categories = ["command-line-utilities"]
|
||||
rust-version = "1.85.1"
|
||||
|
||||
[dependencies]
|
||||
bitcoin_hashes = "0.16.0"
|
||||
chrono = "0.4.41"
|
||||
clap = { version = "4.5.37", features = ["derive"] }
|
||||
clap-verbosity-flag = { version = "3.0.2", default-features = false, features = [
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://gnu.org/licenses/gpl-3.0.html>.
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use clap::Args;
|
||||
use nostr::hashes::sha1::Hash as Sha1Hash;
|
||||
|
||||
use super::PatchStatus;
|
||||
use crate::{
|
||||
@@ -40,7 +40,7 @@ pub struct ApplyArgs {
|
||||
patch_id: NostrEvent,
|
||||
/// The applied commits
|
||||
#[arg(num_args = 1..)]
|
||||
applied_commits: Vec<Sha1>,
|
||||
applied_commits: Vec<Sha1Hash>,
|
||||
}
|
||||
|
||||
impl CommandRunner for ApplyArgs {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://gnu.org/licenses/gpl-3.0.html>.
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use clap::Args;
|
||||
use nostr::hashes::sha1::Hash as Sha1Hash;
|
||||
|
||||
use super::PatchStatus;
|
||||
use crate::{
|
||||
@@ -39,7 +39,7 @@ pub struct MergeArgs {
|
||||
/// revision root
|
||||
patch_id: NostrEvent,
|
||||
/// The merge commit id
|
||||
merge_commit: Sha1,
|
||||
merge_commit: Sha1Hash,
|
||||
}
|
||||
|
||||
impl CommandRunner for MergeArgs {
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
use std::{fs, str::FromStr};
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use clap::Args;
|
||||
use futures::future;
|
||||
use nostr::{
|
||||
event::{EventBuilder, EventId, Kind, Tag, TagKind, Tags, UnsignedEvent},
|
||||
hashes::sha1::Hash as Sha1Hash,
|
||||
key::PublicKey,
|
||||
nips::{nip01::Coordinate, nip10::Marker},
|
||||
types::RelayUrl,
|
||||
@@ -156,7 +156,7 @@ async fn make_patch_series(
|
||||
original_patch: Option<EventId>,
|
||||
relay_hint: Option<RelayUrl>,
|
||||
repo_coordinates: Vec<Coordinate>,
|
||||
euc: &Sha1,
|
||||
euc: Option<&Sha1Hash>,
|
||||
author_pkey: PublicKey,
|
||||
) -> N34Result<(Vec<UnsignedEvent>, Vec<RelayUrl>)> {
|
||||
let mut write_relays = Vec::new();
|
||||
@@ -207,7 +207,7 @@ async fn make_patch(
|
||||
reply_to: Option<EventId>,
|
||||
write_relay: Option<&RelayUrl>,
|
||||
repo_coordinates: &[Coordinate],
|
||||
euc: &Sha1,
|
||||
euc: Option<&Sha1Hash>,
|
||||
author_pkey: PublicKey,
|
||||
) -> (UnsignedEvent, Vec<RelayUrl>) {
|
||||
let content_details = client.parse_content(&patch.body).await;
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
use std::iter;
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use either::Either;
|
||||
use nostr::{
|
||||
event::{EventBuilder, Tag, TagKind},
|
||||
filter::Filter,
|
||||
hashes::sha1::Hash as Sha1Hash,
|
||||
nips::nip10::Marker,
|
||||
};
|
||||
|
||||
@@ -128,7 +128,7 @@ pub async fn patch_status_command(
|
||||
patch_id: NostrEvent,
|
||||
naddrs: Option<Vec<NaddrOrSet>>,
|
||||
new_status: PatchStatus,
|
||||
merge_or_applied_commits: Option<Either<Sha1, Vec<Sha1>>>,
|
||||
merge_or_applied_commits: Option<Either<Sha1Hash, Vec<Sha1Hash>>>,
|
||||
check_fn: impl FnOnce(&PatchStatus) -> N34Result<()>,
|
||||
) -> N34Result<()> {
|
||||
let user_pkey = options.pubkey().await?;
|
||||
|
||||
Reference in New Issue
Block a user