2022-10-26 21:38:39 -04:00
|
|
|
use lox::BridgeDb;
|
|
|
|
use std::fs::File;
|
|
|
|
use std::io::Write;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// create new bridgedb (implicitly generates keys)
|
|
|
|
let bridgedb = BridgeDb::new();
|
|
|
|
|
|
|
|
// output public key to new file
|
|
|
|
let pubkey_bytes = bridgedb.pubkey.to_bytes();
|
|
|
|
let mut outfile =
|
2022-10-28 13:57:48 -04:00
|
|
|
File::create("bridgedb_pubkey").expect("Failed to create pubkey file");
|
2022-10-26 21:38:39 -04:00
|
|
|
outfile.write_all(&pubkey_bytes)
|
|
|
|
.expect("Failed to write pubkey");
|
|
|
|
}
|