[verified] Add sqlite store and first-run identity.
Friends are UNIQUE(pubkey); onion is a locator. Honor ONIONWIRE_HOME.
This commit is contained in:
parent
84b9c940cc
commit
0a0dd3a8d8
6 changed files with 349 additions and 42 deletions
18
src/main.rs
18
src/main.rs
|
|
@ -1,3 +1,19 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
match onionwire::Store::open() {
|
||||
Ok(store) => match store.self_identity() {
|
||||
Ok(me) => {
|
||||
let fp: String = me.identity_pk.iter().map(|b| format!("{b:02x}")).collect();
|
||||
println!("onionwire ready");
|
||||
println!("fingerprint {fp}");
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("onionwire: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
eprintln!("onionwire: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue