upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-09-03 08:32:53 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-09-03 08:32:53 +0100
commitf9af579148f1cbf8f062c8172535f33a0ca99934 (patch)
tree84354977ebf6e7e1b0157bc6fddc267950bda566
parent00d38ac675c69cacab3c4ad3ad1c34666c06d293 (diff)
fix: nostr:// nip05 without local
the patch I sent to rust-nostr library got merged
-rw-r--r--Cargo.lock4
-rw-r--r--src/lib/client.rs7
2 files changed, 2 insertions, 9 deletions
diff --git a/Cargo.lock b/Cargo.lock
index a6266a2..1442a82 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1548,9 +1548,9 @@ dependencies = [
1548 1548
1549[[package]] 1549[[package]]
1550name = "nostr" 1550name = "nostr"
1551version = "0.43.0" 1551version = "0.43.1"
1552source = "registry+https://github.com/rust-lang/crates.io-index" 1552source = "registry+https://github.com/rust-lang/crates.io-index"
1553checksum = "f30e6dcb36d88017587b0b5578d1ed3398afe8e4f45fdb910e48b8675aaf6f68" 1553checksum = "62a97d745f1bd8d5e05a978632bbb87b0614567d5142906fe7c86fb2440faac6"
1554dependencies = [ 1554dependencies = [
1555 "aes", 1555 "aes",
1556 "base64", 1556 "base64",
diff --git a/src/lib/client.rs b/src/lib/client.rs
index b8d2856..92bf266 100644
--- a/src/lib/client.rs
+++ b/src/lib/client.rs
@@ -888,13 +888,6 @@ pub async fn fetch_public_key(signer: &Arc<dyn NostrSigner>) -> Result<nostr::Pu
888} 888}
889 889
890pub async fn nip05_query(nip05_addr: &str) -> Result<Nip05Profile> { 890pub async fn nip05_query(nip05_addr: &str) -> Result<Nip05Profile> {
891 // can be removed if this rust-nostr patch is merged
892 // nostr:nevent1qvzqqqqx2ypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqqsv0xw23ejw77lfvlaqv5y5nnvdc0p68kmvp2vnklpe9wxx0lkugdcv4zjgk
893 let nip05_addr = if nip05_addr.contains('@') {
894 nip05_addr
895 } else {
896 &format!("_@{nip05_addr}")
897 };
898 let addr_deconstructed = Nip05Address::parse(nip05_addr) 891 let addr_deconstructed = Nip05Address::parse(nip05_addr)
899 .context(format!("cannot parse nip05 address: {nip05_addr}"))?; 892 .context(format!("cannot parse nip05 address: {nip05_addr}"))?;
900 let json_res: Value = reqwest::Client::new() 893 let json_res: Value = reqwest::Client::new()