Add to library CliSubCommand::Compile enum variant and handle_compile_subcommand() function.
Add to bdk-cli tool a new top level command "Compile" to compile a miniscript policy to an output descriptor.
Help output:
$ cargo run --features=repl,electrum,compiler help compile
...
bdk-cli-compile 0.2.1-dev
Miniscript policy compiler
USAGE:
bdk-cli compile [OPTIONS] <POLICY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-t, --type <TYPE> Sets the script type used to embed the compiled policy [default: wsh] [possible values: sh,
wsh, sh-wsh]
ARGS:
<POLICY> Sets the spending policy to compile
This command requires the compiler feature be enabled. I didn't add an option to parse the policy since this can already be done with the wallet policies sub-command.
Description
Closes issue #20
Add to library
CliSubCommand::Compile
enum variant andhandle_compile_subcommand()
function.Add to
bdk-cli
tool a new top level command "Compile" to compile a miniscript policy to an output descriptor.Help output:
Example usage:
Notes to the reviewers
This command requires the
compiler
feature be enabled. I didn't add an option to parse the policy since this can already be done with thewallet policies
sub-command.I also renamed the cli arg parsing tests.
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md