lunes/wallet/
mod.rs

1pub mod exec;
2
3use clap::{Args, Subcommand};
4
5/// 🔑 Management your Lunes Wallet
6#[derive(Debug, Args)]
7#[clap(args_conflicts_with_subcommands = true)]
8pub struct Wallet {
9    #[clap(subcommand)]
10    pub command: Option<WalletCommands>,
11}
12
13#[derive(Debug, Subcommand)]
14pub enum WalletCommands {
15    /// Disabled
16    Rename(WalletRename),
17    /// 🎉 Create new Wallet
18    New(WalletNew),
19    /// Disabled
20    Add(WalletAdd),
21    /// Disabled
22    List,
23    /// Disabled
24    Del,
25}
26
27#[derive(Debug, Args)]
28pub struct WalletNew {
29    /// Name of wallet
30    #[clap(long)]
31    pub name: String,
32    /// 1 for mainnet, 0 for testnet
33    #[clap(short, long)]
34    pub chain: Option<u8>,
35    /// Nonce for create your seed
36    #[clap(short, long)]
37    pub nonce: Option<u32>,
38    /// Number of Words for create your seed
39    #[clap(short, long)]
40    pub words: Option<u8>
41}
42
43#[derive(Debug, Args)]
44pub struct WalletRename {
45    #[clap(short, long)]
46    pub old_name: Option<String>,
47    #[clap(short, long)]
48    pub new_name: Option<String>,
49}
50
51#[derive(Debug, Args)]
52pub struct WalletAdd {
53    #[clap(short, long)]
54    pub private_key: Option<String>,
55    #[clap(short, long)]
56    pub seed: Option<String>,
57    #[clap(short, long)]
58    pub name: Option<String>,
59}