blob: 199de6952e62a4396b10fbc8e80af852b27c4577 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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(())
}
|