diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2020-11-30 19:11:36 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2020-11-30 19:11:36 +0100 |
| commit | a699b6b4fe6f0e2567f7298fd8174e779f1bd43d (patch) | |
| tree | e79f3927acc133cd05e06e22b1c95c776effe991 /src/cmd/address.rs | |
| parent | 678d45e7ae09510796d27a80ecd894f6a1ad8279 (diff) | |
hd wallet impl
Diffstat (limited to 'src/cmd/address.rs')
| -rw-r--r-- | src/cmd/address.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cmd/address.rs b/src/cmd/address.rs new file mode 100644 index 0000000..b0322b2 --- /dev/null +++ b/src/cmd/address.rs @@ -0,0 +1,18 @@ +//! Module implementing the `address` subcommand for displaying the public +//! address for corresponding account. + +use crate::cmd::AccountOptions; +use anyhow::Result; +use structopt::StructOpt; + +#[derive(Debug, StructOpt)] +#[structopt(about = "print account public address")] +pub struct Options { + #[structopt(flatten)] + account: AccountOptions, +} + +pub fn run(options: Options) -> Result<()> { + println!("{}", options.account.private_key()?.address()); + Ok(()) +} |
