"bdk_redb",
"bdk_sp",
"bdk_testenv",
- "bdk_wallet",
+ "bdk_wallet 2.4.0",
"bitcoin-payment-instructions",
"clap",
"clap_complete",
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346c1d502ee4613cf2201db9c3b93a2317772d8eaa372114f34bf5f374be94fd"
dependencies = [
- "bdk_wallet",
+ "bdk_wallet 2.4.0",
"bip157",
]
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2e0c999b3dcc448ceb6337658c363df3197bbed987b663810497bd9c20ea4ef"
+dependencies = [
+ "bdk_wallet 3.1.0",
+ "bitcoin",
+]
+
+[[package]]
+name = "bdk_redb"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2e0c999b3dcc448ceb6337658c363df3197bbed987b663810497bd9c20ea4ef"
dependencies = [
"bdk_wallet",
"bitcoin",
checksum = "69ac8b88c9594c615fcb5b763e7afa16937e94f7a7f5ca334bf59a7fee69fea1"
dependencies = [
"bdk_chain",
- "bdk_wallet",
+ "bdk_wallet 2.4.0",
"ciborium",
"redb",
"thiserror 2.0.18",
"serde_json",
]
+[[package]]
+name = "bdk_wallet"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1284fb23acc3e3022673712b55f4d5ce7e38aadc2c49bbef830dc3935f0a3289"
+dependencies = [
+ "bdk_chain",
+ "bitcoin",
+ "miniscript",
+ "rand_core 0.6.4",
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "bech32"
version = "0.11.1"
# Internal features
_payjoin-dependencies = ["payjoin", "reqwest", "url", "sqlite"]
-bip322 = ["bdk_message_signer"]
+message_signer = ["bdk_message_signer"]
# Use this to consensus verify transactions at sync time
verify = []
//! All subcommands are defined in the below enums.
#![allow(clippy::large_enum_variant)]
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
use crate::handlers::offline::{SignMessageCommand, VerifyMessageCommand};
use crate::handlers::{
config::{ListWalletsCommand, SaveConfigCommand},
/// Combines multiple PSBTs into one.
CombinePsbt(CombinePsbtCommand),
/// Sign a message using BIP322
- #[cfg(feature = "bip322")]
+ #[cfg(feature = "message_signer")]
SignMessage(SignMessageCommand),
/// Verify a BIP322 signature
- #[cfg(feature = "bip322")]
+ #[cfg(feature = "message_signer")]
VerifyMessage(VerifyMessageCommand),
/// Lock UTXO(s) so they're excluded from coin selection.
LockUtxo(LockUtxoCommand),
#[cfg(feature = "payjoin")]
#[error("Payjoin database error: {0}")]
PayjoinDb(#[from] crate::handlers::payjoin::db::Error),
- #[cfg(feature = "bip322")]
+
+ #[cfg(feature = "message_signer")]
#[error("BIP-322 error: {0}")]
- Bip322Error(#[from] bdk_message_signer::error::Error),
+ MessageSignerError(#[from] bdk_message_signer::error::Error),
}
impl From<ExtractTxError> for BDKCliError {
bdk_wallet::keys::{DescriptorPublicKey, DescriptorSecretKey, SinglePubKey},
std::collections::HashMap,
};
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
use {
crate::utils::parse_signature_format,
crate::utils::types::MessageResult,
- bdk_message_signer::{MessageProof, MessageSigner},
+ bdk_message_signer::{MessageSigner, MessageProof},
};
impl OfflineWalletSubCommand {
Self::CombinePsbt(combine_psbt_command) => combine_psbt_command
.execute(ctx)?
.write_out(std::io::stdout()),
- #[cfg(feature = "bip322")]
+ #[cfg(feature = "message_signer")]
Self::SignMessage(sign_message_command) => sign_message_command
.execute(ctx)?
.write_out(std::io::stdout()),
- #[cfg(feature = "bip322")]
+ #[cfg(feature = "message_signer")]
Self::VerifyMessage(verify_message_command) => verify_message_command
.execute(ctx)?
.write_out(std::io::stdout()),
}
}
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
#[derive(Debug, Parser, Clone, PartialEq)]
pub struct SignMessageCommand {
/// The message to sign
pub utxos: Option<Vec<OutPoint>>,
}
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
impl AppCommand<AppContext<OfflineOperations<'_>>> for SignMessageCommand {
type Output = MessageResult;
}
}
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
#[derive(Debug, Parser, Clone, PartialEq)]
pub struct VerifyMessageCommand {
/// The signature proof to verify
pub address: String,
}
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
impl AppCommand<AppContext<OfflineOperations<'_>>> for VerifyMessageCommand {
type Output = MessageResult;
use crate::{commands::WalletOpts, config::WalletConfig, error::BDKCliError as Error};
+#[cfg(feature = "message_signer")]
+use bdk_message_signer::SignatureFormat;
#[cfg(feature = "cbf")]
use bdk_kyoto::{Info, Receiver, UnboundedReceiver, Warning};
-#[cfg(feature = "bip322")]
-use bdk_message_signer::SignatureFormat;
#[cfg(feature = "silent-payments")]
use bdk_sp::encoding::SilentPaymentCode;
use bdk_wallet::bitcoin::{Address, Network, OutPoint, ScriptBuf};
}
/// Function to parse the signature format from a string
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
pub(crate) fn parse_signature_format(format_str: &str) -> Result<SignatureFormat, Error> {
match format_str.to_lowercase().as_str() {
"legacy" => Ok(SignatureFormat::Legacy),
| OfflineWalletSubCommand::FinalizePsbt(_)
| OfflineWalletSubCommand::CombinePsbt(_) => false,
- #[cfg(feature = "bip322")]
+ #[cfg(feature = "message_signer")]
OfflineWalletSubCommand::SignMessage(_) => true,
- #[cfg(feature = "bip322")]
+ #[cfg(feature = "message_signer")]
OfflineWalletSubCommand::VerifyMessage(_) => true,
#[cfg(feature = "silent-payments")]
OfflineWalletSubCommand::CreateSpTx(_) => true,
pub internal: T,
}
-#[cfg(feature = "bip322")]
+#[cfg(feature = "message_signer")]
#[derive(Serialize, Debug, Default)]
pub struct MessageResult {
#[serde(skip_serializing_if = "Option::is_none")]