diff options
Diffstat (limited to 'src/nostr.h')
| -rw-r--r-- | src/nostr.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/nostr.h b/src/nostr.h index 5ec9f65..41e59df 100644 --- a/src/nostr.h +++ b/src/nostr.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define BITFLASH_NOSTR_H | 11 | #define BITFLASH_NOSTR_H |
| 12 | 12 | ||
| 13 | #include <string> | 13 | #include <string> |
| 14 | #include <vector> | ||
| 14 | 15 | ||
| 15 | // Thread entry point (signature compatible with _beginthread) | 16 | // Thread entry point (signature compatible with _beginthread) |
| 16 | void ThreadNostrSeed(void* parg); | 17 | void ThreadNostrSeed(void* parg); |
| @@ -19,9 +20,17 @@ void ThreadNostrSeed(void* parg); | |||
| 19 | extern const char* pszNostrRelays[]; | 20 | extern const char* pszNostrRelays[]; |
| 20 | extern const int nNostrRelays; | 21 | extern const int nNostrRelays; |
| 21 | 22 | ||
| 22 | // Rendezvous meeting relay ("host:port") this node registers at and advertises | 23 | // Rendezvous meeting relays ("host:port") this node can register its .btf |
| 23 | // in its .btf descriptor. Overridable with /rvrelay=host:port. | 24 | // service at. It registers at the first reachable one and advertises that in |
| 24 | extern std::string strBtfMeetingRelay; | 25 | // its descriptor; if the relay dies it fails over to another, so attacking a |
| 26 | // single relay's IP can't take the network down. Overridable with /rvrelay. | ||
| 27 | extern std::vector<std::string> vBtfMeetingRelays; | ||
| 28 | // The relay this node is currently registered at (set by ThreadBtfAccept). | ||
| 29 | extern std::string strBtfActiveRelay; | ||
| 30 | // The active relay, or the first seed if none active yet ("" if the list is empty). | ||
| 31 | std::string BtfActiveRelay(); | ||
| 32 | // Record the relay this node just registered its service at (thread-safe). | ||
| 33 | void BtfSetActiveRelay(const std::string& relay); | ||
| 25 | 34 | ||
| 26 | // Copy this node's .btf identity (lazily loading or generating it): the x-only | 35 | // Copy this node's .btf identity (lazily loading or generating it): the x-only |
| 27 | // pubkey (= the .btf address) and the x25519 secret for the end-to-end channel. | 36 | // pubkey (= the .btf address) and the x25519 secret for the end-to-end channel. |