From: Sandipan Dey Date: Wed, 14 Jul 2021 08:05:29 +0000 (+0530) Subject: added structopt and fixed tests temporarily X-Git-Tag: v0.3.0~38 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/enum.FromScriptError.html?a=commitdiff_plain;h=442097f7b50f42bc354da8338e68c2a91f6f973f;p=bdk-cli added structopt and fixed tests temporarily --- diff --git a/src/lib.rs b/src/lib.rs index d5a1b14..2e2d676 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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")]