mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 11:19:57 +00:00
inital commit, which is clearly not initial
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
35
utils/ghostkey/src/lib.rs
Executable file
35
utils/ghostkey/src/lib.rs
Executable file
@@ -0,0 +1,35 @@
|
||||
use clap::Parser;
|
||||
use ghost_client_cli::{VanityCmd, KeySubcommand};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
name = "ghostkey",
|
||||
author = "f4t50",
|
||||
about = "Ghost Key Tool",
|
||||
version
|
||||
)]
|
||||
pub enum Ghostkey {
|
||||
/// Key utility for the CLI
|
||||
#[clap(flatten)]
|
||||
KeyCli(KeySubcommand),
|
||||
|
||||
/// Sign a message, with a given (secret) key.
|
||||
Sign(sc_cli::SignCmd),
|
||||
|
||||
/// Generate a seed that provides a vanity address/
|
||||
Vanity(VanityCmd),
|
||||
|
||||
/// Verify a signature for a mesage, provided on STDIN, with a given
|
||||
/// (public or secret) key.
|
||||
Verify(sc_cli::VerifyCmd),
|
||||
}
|
||||
|
||||
/// Run the ghostkey command, given the appropriate runtime.
|
||||
pub fn run() -> Result<(), sc_cli::Error> {
|
||||
match Ghostkey::parse() {
|
||||
Ghostkey::KeyCli(cmd) => cmd.run(cli),
|
||||
Ghostkey::Sign(cmd) => cmd.run(),
|
||||
Ghostkey::Vanity(cmd) => cmd.run(),
|
||||
Ghostkey::Verify(cmd) => cmd.run(),
|
||||
}
|
||||
}
|
||||
5
utils/ghostkey/src/main.rs
Executable file
5
utils/ghostkey/src/main.rs
Executable file
@@ -0,0 +1,5 @@
|
||||
//! Ghostkey utility, based on kitchensink_runtime.
|
||||
|
||||
fn main() -> Result<(), sc_cli::Error> {
|
||||
ghostkey::run()
|
||||
}
|
||||
Reference in New Issue
Block a user