upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/nostr.h
diff options
context:
space:
mode:
authorBitflash-sh <btf01@proton.me>2026-07-24 14:46:49 -0300
committerBitflash-sh <btf01@proton.me>2026-07-24 14:46:49 -0300
commite2bc68de1af27d3459878f43c40061d0c30d09d7 (patch)
tree40bffb13573ff9fe4a3c114883d10f533aa7e803 /src/nostr.h
parent2b10d4a64fd17ad6320055935d76ab6beca3b9b3 (diff)
Automatic relay discovery over Nostr + call-to-action
Relay operators announce their relay with -announcerelay=host:port; every node discovers announced relays (kind 38502) and adds them to its failover list, so volunteer relays join with no maintainer edit or approval. Anti-spam cap + validation; relays are trustless (echan makes a bad relay unable to read/MITM). README: automatic relay-volunteer guide, 'don't let the network die' section.
Diffstat (limited to 'src/nostr.h')
-rw-r--r--src/nostr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nostr.h b/src/nostr.h
index 41e59df..b878db9 100644
--- a/src/nostr.h
+++ b/src/nostr.h
@@ -32,6 +32,12 @@ std::string BtfActiveRelay();
32// Record the relay this node just registered its service at (thread-safe). 32// Record the relay this node just registered its service at (thread-safe).
33void BtfSetActiveRelay(const std::string& relay); 33void BtfSetActiveRelay(const std::string& relay);
34 34
35// If set (via /announcerelay=host:port), this node announces that relay on
36// Nostr so other nodes discover it automatically -- no manual seed-list edit.
37extern std::string strBtfAnnounceRelay;
38// Every relay to try: curated seeds + relays discovered from Nostr announcements.
39std::vector<std::string> BtfAllRelays();
40
35// Copy this node's .btf identity (lazily loading or generating it): the x-only 41// Copy this node's .btf identity (lazily loading or generating it): the x-only
36// pubkey (= the .btf address) and the x25519 secret for the end-to-end channel. 42// pubkey (= the .btf address) and the x25519 secret for the end-to-end channel.
37bool BtfGetIdentity(unsigned char pubkey[32], unsigned char enc_sk[32]); 43bool BtfGetIdentity(unsigned char pubkey[32], unsigned char enc_sk[32]);