Remove stray keygen
This commit is contained in:
parent
3f835f8ee3
commit
aaa5cd4615
|
@ -23,8 +23,3 @@ serde_derive = "1.0.82"
|
|||
serde_json = "1.0.10"
|
||||
untrusted = "0.6.2"
|
||||
|
||||
[[bin]]
|
||||
name = "solana-keygen"
|
||||
path = "src/bin/keygen.rs"
|
||||
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
#[macro_use]
|
||||
extern crate clap;
|
||||
extern crate dirs;
|
||||
extern crate solana_sdk;
|
||||
|
||||
use clap::{App, Arg};
|
||||
use solana_sdk::signature::gen_keypair_file;
|
||||
use std::error;
|
||||
|
||||
fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
let matches = App::new("solana-keygen")
|
||||
.version(crate_version!())
|
||||
.arg(
|
||||
Arg::with_name("outfile")
|
||||
.short("o")
|
||||
.long("outfile")
|
||||
.value_name("PATH")
|
||||
.takes_value(true)
|
||||
.help("Path to generated file"),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
let mut path = dirs::home_dir().expect("home directory");
|
||||
let outfile = if matches.is_present("outfile") {
|
||||
matches.value_of("outfile").unwrap()
|
||||
} else {
|
||||
path.extend(&[".config", "solana", "id.json"]);
|
||||
path.to_str().unwrap()
|
||||
};
|
||||
|
||||
let serialized_keypair = gen_keypair_file(outfile.to_string())?;
|
||||
if outfile == "-" {
|
||||
println!("{}", serialized_keypair);
|
||||
}
|
||||
Ok(())
|
||||
}
|
Loading…
Reference in New Issue