]> Untitled Git - bdk-cli/commitdiff
added structopt and fixed tests temporarily
authorSandipan Dey <sandipandey.12@gmail.com>
Wed, 14 Jul 2021 08:05:29 +0000 (13:35 +0530)
committerSandipan Dey <hey@sandipan.dev>
Wed, 14 Jul 2021 19:19:34 +0000 (00:49 +0530)
src/lib.rs

index d5a1b14a5bdee036a5765cdc01749940801b1fcd..2e2d6763d5ca19ec4f19ca97a574231257dbc39f 100644 (file)
@@ -342,6 +342,9 @@ pub struct WalletOpts {
         default_value = "main"
     )]
     pub wallet: String,
+    /// Adds verbosity, returns PSBT in JSON format alongside serialized
+    #[structopt(name = "VERBOSE", short = "v", long = "verbose")]
+    pub verbose: bool,
     /// Sets the descriptor to use for the external addresses
     #[structopt(name = "DESCRIPTOR", short = "d", long = "descriptor", required = true)]
     pub descriptor: String,
@@ -1064,6 +1067,7 @@ mod test {
             subcommand: CliSubCommand::Wallet {
                 wallet_opts: WalletOpts {
                     wallet: "main".to_string(),
+                    verbose: false,
                     descriptor: "wpkh(xpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)".to_string(),
                     change_descriptor: Some("wpkh(xpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/1/*)".to_string()),
                     #[cfg(feature = "electrum")]
@@ -1113,6 +1117,7 @@ mod test {
             subcommand: CliSubCommand::Wallet {
                 wallet_opts: WalletOpts {
                     wallet: "main".to_string(),
+                    verbose: false,
                     descriptor: "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)".to_string(),
                     change_descriptor: Some("wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/1/*)".to_string()),
                     #[cfg(feature = "electrum")]
@@ -1259,6 +1264,7 @@ mod test {
             subcommand: CliSubCommand::Wallet {
                 wallet_opts: WalletOpts {
                     wallet: "main".to_string(),
+                    verbose: false,
                     descriptor: "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)".to_string(),
                     change_descriptor: None,
                     #[cfg(feature = "electrum")]
@@ -1324,6 +1330,7 @@ mod test {
             subcommand: CliSubCommand::Wallet {
                 wallet_opts: WalletOpts {
                     wallet: "main".to_string(),
+                    verbose: false,
                     descriptor: "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)".to_string(),
                     change_descriptor: Some("wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/1/*)".to_string()),
                     #[cfg(feature = "electrum")]
@@ -1380,6 +1387,7 @@ mod test {
             subcommand: CliSubCommand::Wallet {
                 wallet_opts: WalletOpts {
                     wallet: "main".to_string(),
+                    verbose: false,
                     descriptor: "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)".to_string(),
                     change_descriptor: None,
                     #[cfg(feature = "electrum")]