solana-tools-lite-cli 0.1.2

CLI for solana-tools-lite: offline-first Solana signer toolkit.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::flows::presenter::Presentable;
use crate::models::cmds::Base58Action;
use solana_tools_lite::handlers::base58;
use crate::shell::error::CliError;

/// Base58 flow: delegates to the pure handler and presents the result.
pub fn execute(action: &Base58Action, json: bool) -> Result<(), CliError> {
    let result = match action {
        Base58Action::Encode { input } => base58::encode(input)?,
        Base58Action::Decode { input } => base58::decode(input)?,
    };

    result.present(json, false, false)?;
    Ok(())
}