[verified] feat(tui): drop unicode QR, share onionwire:v1 invite
Some checks failed
ci / test (push) Has been cancelled
Some checks failed
ci / test (push) Has been cancelled
F2 shows the invite string with fp/onion hints instead of a terminal QR. Keep encode/decode and F3 paste; drop the qrcode crate.
This commit is contained in:
parent
e902a9041d
commit
4fb47444d5
9 changed files with 64 additions and 55 deletions
|
|
@ -1,6 +1,4 @@
|
|||
use ed25519_dalek::{Signature, Signer, SigningKey, Verifier, VerifyingKey};
|
||||
use qrcode::render::unicode::Dense1x2;
|
||||
use qrcode::QrCode;
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
|
|
@ -66,11 +64,6 @@ pub fn decode(raw: &str) -> Result<QrPayload> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn render_unicode(payload: &str) -> Result<String> {
|
||||
let code = QrCode::new(payload.as_bytes()).map_err(|e| Error(e.to_string()))?;
|
||||
Ok(code.render::<Dense1x2>().build())
|
||||
}
|
||||
|
||||
fn sign_msg(k: &str, onion: &str, spk: &str) -> Vec<u8> {
|
||||
let mut msg = Vec::with_capacity(k.len() + onion.len() + spk.len());
|
||||
msg.extend_from_slice(k.as_bytes());
|
||||
|
|
|
|||
Loading…
Reference in a new issue