pcli/command/view/
wallet_id.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use anyhow::Result;

use penumbra_keys::FullViewingKey;

#[derive(Debug, clap::Parser)]
pub struct WalletIdCmd {}

impl WalletIdCmd {
    /// Determine if this command requires a network sync before it executes.
    pub fn offline(&self) -> bool {
        true
    }

    pub fn exec(&self, fvk: &FullViewingKey) -> Result<()> {
        let wallet_id = fvk.wallet_id();
        println!("{wallet_id}");

        Ok(())
    }
}