diff options
Diffstat (limited to 'src/nostr.h')
| -rw-r--r-- | src/nostr.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nostr.h b/src/nostr.h index 827b2f3..6dbbe26 100644 --- a/src/nostr.h +++ b/src/nostr.h | |||
| @@ -40,6 +40,13 @@ std::string BtfActiveRelay(); | |||
| 40 | // Record the relay this node just registered its service at (thread-safe). | 40 | // Record the relay this node just registered its service at (thread-safe). |
| 41 | void BtfSetActiveRelay(const std::string& relay); | 41 | void BtfSetActiveRelay(const std::string& relay); |
| 42 | 42 | ||
| 43 | // Optional Tor hidden-service endpoint for this node's normal P2P listener. | ||
| 44 | // Set by /onionservice=HOST.onion:PORT. The endpoint is signed into this node's | ||
| 45 | // .btf descriptor, so peers with -tor can dial it directly before falling back | ||
| 46 | // to rendezvous relays. | ||
| 47 | bool BtfSetLocalOnionEndpoint(const std::string& endpoint, std::string& errOut); | ||
| 48 | std::string BtfLocalOnionEndpoint(); | ||
| 49 | |||
| 43 | // If set (via /announcerelay=host:port), this node announces that relay on | 50 | // If set (via /announcerelay=host:port), this node announces that relay on |
| 44 | // Nostr so other nodes discover it automatically -- no manual seed-list edit. | 51 | // Nostr so other nodes discover it automatically -- no manual seed-list edit. |
| 45 | extern std::string strBtfAnnounceRelay; | 52 | extern std::string strBtfAnnounceRelay; |
| @@ -102,12 +109,15 @@ void* BtfSecpContext(); | |||
| 102 | // self-certified descriptor and return its meeting node ("host:port") and | 109 | // self-certified descriptor and return its meeting node ("host:port") and |
| 103 | // x25519 public key for the end-to-end channel. | 110 | // x25519 public key for the end-to-end channel. |
| 104 | bool BtfResolve(const std::string& btfAddr, std::string& meetingHostPort, | 111 | bool BtfResolve(const std::string& btfAddr, std::string& meetingHostPort, |
| 105 | unsigned char enc_pub[32]); | 112 | unsigned char enc_pub[32], |
| 113 | std::string* onionHostPort = NULL); | ||
| 106 | 114 | ||
| 107 | // Result of resolving one .btf address via BtfResolveMany. | 115 | // Result of resolving one .btf address via BtfResolveMany. |
| 108 | struct BtfResolvedPeer | 116 | struct BtfResolvedPeer |
| 109 | { | 117 | { |
| 110 | std::string meetingHostPort; | 118 | std::string meetingHostPort; |
| 119 | std::string onionHostPort; | ||
| 120 | std::string descriptor; | ||
| 111 | unsigned char enc_pub[32]; | 121 | unsigned char enc_pub[32]; |
| 112 | }; | 122 | }; |
| 113 | 123 | ||