]> Untitled Git - bdk-cli/commitdiff
drop verbose flag
authorVihiga Tyonum <withtvpeter@gmail.com>
Wed, 8 Jul 2026 16:32:39 +0000 (17:32 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Wed, 8 Jul 2026 17:47:51 +0000 (18:47 +0100)
src/commands.rs
src/config.rs
src/handlers/offline.rs
src/utils/types.rs

index b9d1206cee70b1f6b76dd9690679457cd731c0f4..529ef26b952b971774d87c4a24a9149130fb4218 100644 (file)
@@ -230,9 +230,6 @@ pub struct WalletOpts {
     /// Selects the wallet to use.
     #[arg(skip)]
     pub wallet: Option<String>,
-    /// Adds verbosity, returns PSBT in JSON format alongside serialized, displays expanded objects.
-    #[arg(env = "VERBOSE", short = 'v', long = "verbose")]
-    pub verbose: bool,
     /// Sets the descriptor to use for the external addresses.
     #[arg(env = "EXT_DESCRIPTOR", short = 'e', long, required = true)]
     pub ext_descriptor: String,
index ec6adfaa237cc6a1222e6a7ec469d89fb8d0ce4c..6865ee0915d7e65b5d3847b9007ae7eeaa0216d6 100644 (file)
@@ -117,7 +117,6 @@ impl TryFrom<&WalletConfigInner> for WalletOpts {
 
         Ok(WalletOpts {
             wallet: Some(config.wallet.clone()),
-            verbose: false,
             ext_descriptor: config.ext_descriptor.clone(),
             int_descriptor: config.int_descriptor.clone(),
 
index 7490d8001d63fa4bada195ccebc7e3f722c940de..094f65730ddc0367aae11b5ad840de831373ba6d 100644 (file)
@@ -311,9 +311,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for CreateTxCommand {
 
         let psbt = tx_builder.finish()?;
 
-        // let psbt_base64 = BASE64_STANDARD.encode(psbt.serialize());
-
-        Ok(PsbtResult::new(&psbt, false, Some(false)))
+        Ok(PsbtResult::new(&psbt, Some(false)))
     }
 }
 
@@ -604,7 +602,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for BumpFeeCommand {
 
         // let psbt_base64 = BASE64_STANDARD.encode(psbt.serialize());
 
-        Ok(PsbtResult::new(&psbt, false, Some(false)))
+        Ok(PsbtResult::new(&psbt, Some(false)))
     }
 }
 
@@ -672,7 +670,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for SignCommand {
             ..Default::default()
         };
         let finalized = wallet.sign(&mut psbt, signopt)?;
-        Ok(PsbtResult::new(&psbt, false, Some(finalized)))
+        Ok(PsbtResult::new(&psbt, Some(finalized)))
     }
 }
 
@@ -728,7 +726,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for FinalizePsbtCommand {
 
         let finalized = wallet.finalize_psbt(&mut psbt, signopt)?;
 
-        Ok(PsbtResult::new(&psbt, false, Some(finalized)))
+        Ok(PsbtResult::new(&psbt, Some(finalized)))
     }
 }
 
@@ -763,7 +761,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for CombinePsbtCommand {
                     Ok(acc)
                 })?;
 
-        Ok(PsbtResult::new(&final_psbt, false, None))
+        Ok(PsbtResult::new(&final_psbt, None))
     }
 }
 
index 6f8cf0913ebd5213c2e8afb9cf47752e2d08ada9..176fd155a470cf11d52b1e8b4ff33c2107fec3d8 100644 (file)
@@ -78,21 +78,13 @@ pub struct PsbtResult {
 
     #[serde(skip_serializing_if = "Option::is_none")]
     pub is_finalized: Option<bool>,
-
-    #[serde(skip_serializing_if = "Option::is_none")]
-    pub details: Option<serde_json::Value>,
 }
 
 impl PsbtResult {
-    pub fn new(psbt: &Psbt, verbose: bool, finalized: Option<bool>) -> Self {
+    pub fn new(psbt: &Psbt, finalized: Option<bool>) -> Self {
         Self {
             psbt: bdk_wallet::bitcoin::base64::prelude::BASE64_STANDARD.encode(psbt.serialize()),
             is_finalized: finalized,
-            details: if verbose {
-                Some(serde_json::to_value(psbt).unwrap_or_default())
-            } else {
-                None
-            },
         }
     }
 }