diff options
| author | Bitflash-sh <btf01@proton.me> | 2026-07-24 14:46:49 -0300 |
|---|---|---|
| committer | Bitflash-sh <btf01@proton.me> | 2026-07-24 14:46:49 -0300 |
| commit | e2bc68de1af27d3459878f43c40061d0c30d09d7 (patch) | |
| tree | 40bffb13573ff9fe4a3c114883d10f533aa7e803 /src/nostr.h | |
| parent | 2b10d4a64fd17ad6320055935d76ab6beca3b9b3 (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.h | 6 |
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). |
| 33 | void BtfSetActiveRelay(const std::string& relay); | 33 | void 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. | ||
| 37 | extern std::string strBtfAnnounceRelay; | ||
| 38 | // Every relay to try: curated seeds + relays discovered from Nostr announcements. | ||
| 39 | std::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. |
| 37 | bool BtfGetIdentity(unsigned char pubkey[32], unsigned char enc_sk[32]); | 43 | bool BtfGetIdentity(unsigned char pubkey[32], unsigned char enc_sk[32]); |