blob: 65cbf84dabd6239a78631bef00bbfa468f94158e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//! Module implementing the `address` subcommand for displaying the public
//! address for corresponding account.
use crate::cmd::AccountOptions;
use anyhow::Result;
use clap::Parser;
#[derive(Debug, Parser)]
pub struct Options {
#[clap(flatten)]
account: AccountOptions,
}
pub fn run(options: Options) -> Result<()> {
println!(
"0x{}",
hex::encode(
options
.account
.private_key()?
.public()
.encode_uncompressed()
.as_slice()
)
);
Ok(())
}
|