Skip to main content

execute

Function execute 

Source
pub fn execute(
    mnemonic_path: Option<&str>,
    passphrase_path: Option<&str>,
    json: bool,
    show_secret: bool,
    out_path: Option<&str>,
    force: bool,
) -> Result<(), CliError>
Expand description

High-level generation flow: orchestrates handler call, file saving, and presentation.

Parameters

  • mnemonic_path – read mnemonic from file or stdin (“-”); when None, a new mnemonic is generated
  • passphrase_path – read BIP‑39 passphrase from file or stdin (“-”); when None, uses empty passphrase
  • json – print result as JSON (--json)
  • show_secret – print private part to stdout (--unsafe-show-secret)
  • out_path – target path (file or directory) to save the full wallet JSON
  • force – override the wallet file if it exists