|
|
@ -35,6 +35,26 @@ impl Command for SyncCommand { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct EncryptionStatusCommand {} |
|
|
|
|
|
|
|
impl Command for EncryptionStatusCommand { |
|
|
|
|
|
|
|
fn help(&self) -> String { |
|
|
|
|
|
|
|
let mut h = vec![]; |
|
|
|
|
|
|
|
h.push("Check if the wallet is encrypted and if it is locked"); |
|
|
|
|
|
|
|
h.push("Usage:"); |
|
|
|
|
|
|
|
h.push("encryptionstatus"); |
|
|
|
|
|
|
|
h.push(""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h.join("\n") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn short_help(&self) -> String { |
|
|
|
|
|
|
|
"Check if the wallet is encrypted and if it is locked".to_string() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String { |
|
|
|
|
|
|
|
lightclient.do_encryption_status().pretty(2) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
struct SyncStatusCommand {} |
|
|
|
struct SyncStatusCommand {} |
|
|
|
impl Command for SyncStatusCommand { |
|
|
|
impl Command for SyncStatusCommand { |
|
|
@ -731,27 +751,28 @@ impl Command for QuitCommand { |
|
|
|
pub fn get_commands() -> Box<HashMap<String, Box<dyn Command>>> { |
|
|
|
pub fn get_commands() -> Box<HashMap<String, Box<dyn Command>>> { |
|
|
|
let mut map: HashMap<String, Box<dyn Command>> = HashMap::new(); |
|
|
|
let mut map: HashMap<String, Box<dyn Command>> = HashMap::new(); |
|
|
|
|
|
|
|
|
|
|
|
map.insert("sync".to_string(), Box::new(SyncCommand{})); |
|
|
|
map.insert("sync".to_string(), Box::new(SyncCommand{})); |
|
|
|
map.insert("syncstatus".to_string(), Box::new(SyncStatusCommand{})); |
|
|
|
map.insert("syncstatus".to_string(), Box::new(SyncStatusCommand{})); |
|
|
|
map.insert("rescan".to_string(), Box::new(RescanCommand{})); |
|
|
|
map.insert("encryptionstatus".to_string(), Box::new(EncryptionStatusCommand{})); |
|
|
|
map.insert("help".to_string(), Box::new(HelpCommand{})); |
|
|
|
map.insert("rescan".to_string(), Box::new(RescanCommand{})); |
|
|
|
map.insert("balance".to_string(), Box::new(BalanceCommand{})); |
|
|
|
map.insert("help".to_string(), Box::new(HelpCommand{})); |
|
|
|
map.insert("addresses".to_string(), Box::new(AddressCommand{})); |
|
|
|
map.insert("balance".to_string(), Box::new(BalanceCommand{})); |
|
|
|
map.insert("height".to_string(), Box::new(HeightCommand{})); |
|
|
|
map.insert("addresses".to_string(), Box::new(AddressCommand{})); |
|
|
|
map.insert("export".to_string(), Box::new(ExportCommand{})); |
|
|
|
map.insert("height".to_string(), Box::new(HeightCommand{})); |
|
|
|
map.insert("info".to_string(), Box::new(InfoCommand{})); |
|
|
|
map.insert("export".to_string(), Box::new(ExportCommand{})); |
|
|
|
map.insert("send".to_string(), Box::new(SendCommand{})); |
|
|
|
map.insert("info".to_string(), Box::new(InfoCommand{})); |
|
|
|
map.insert("save".to_string(), Box::new(SaveCommand{})); |
|
|
|
map.insert("send".to_string(), Box::new(SendCommand{})); |
|
|
|
map.insert("quit".to_string(), Box::new(QuitCommand{})); |
|
|
|
map.insert("save".to_string(), Box::new(SaveCommand{})); |
|
|
|
map.insert("list".to_string(), Box::new(TransactionsCommand{})); |
|
|
|
map.insert("quit".to_string(), Box::new(QuitCommand{})); |
|
|
|
map.insert("notes".to_string(), Box::new(NotesCommand{})); |
|
|
|
map.insert("list".to_string(), Box::new(TransactionsCommand{})); |
|
|
|
map.insert("new".to_string(), Box::new(NewAddressCommand{})); |
|
|
|
map.insert("notes".to_string(), Box::new(NotesCommand{})); |
|
|
|
map.insert("seed".to_string(), Box::new(SeedCommand{})); |
|
|
|
map.insert("new".to_string(), Box::new(NewAddressCommand{})); |
|
|
|
map.insert("encrypt".to_string(), Box::new(EncryptCommand{})); |
|
|
|
map.insert("seed".to_string(), Box::new(SeedCommand{})); |
|
|
|
map.insert("decrypt".to_string(), Box::new(DecryptCommand{})); |
|
|
|
map.insert("encrypt".to_string(), Box::new(EncryptCommand{})); |
|
|
|
map.insert("unlock".to_string(), Box::new(UnlockCommand{})); |
|
|
|
map.insert("decrypt".to_string(), Box::new(DecryptCommand{})); |
|
|
|
map.insert("lock".to_string(), Box::new(LockCommand{})); |
|
|
|
map.insert("unlock".to_string(), Box::new(UnlockCommand{})); |
|
|
|
map.insert("fixbip39bug".to_string(), Box::new(FixBip39BugCommand{})); |
|
|
|
map.insert("lock".to_string(), Box::new(LockCommand{})); |
|
|
|
|
|
|
|
map.insert("fixbip39bug".to_string(), Box::new(FixBip39BugCommand{})); |
|
|
|
|
|
|
|
|
|
|
|
Box::new(map) |
|
|
|
Box::new(map) |
|
|
|
} |
|
|
|
} |
|
|
|