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:
Diffstat (limited to 'src/nostr.h')
-rw-r--r--src/nostr.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nostr.h b/src/nostr.h
index b5eb5e3..dc4288c 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).
41void BtfSetActiveRelay(const std::string& relay); 41void 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.
47bool BtfSetLocalOnionEndpoint(const std::string& endpoint, std::string& errOut);
48std::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.
45extern std::string strBtfAnnounceRelay; 52extern std::string strBtfAnnounceRelay;
@@ -94,12 +101,15 @@ void* BtfSecpContext();
94// self-certified descriptor and return its meeting node ("host:port") and 101// self-certified descriptor and return its meeting node ("host:port") and
95// x25519 public key for the end-to-end channel. 102// x25519 public key for the end-to-end channel.
96bool BtfResolve(const std::string& btfAddr, std::string& meetingHostPort, 103bool BtfResolve(const std::string& btfAddr, std::string& meetingHostPort,
97 unsigned char enc_pub[32]); 104 unsigned char enc_pub[32],
105 std::string* onionHostPort = NULL);
98 106
99// Result of resolving one .btf address via BtfResolveMany. 107// Result of resolving one .btf address via BtfResolveMany.
100struct BtfResolvedPeer 108struct BtfResolvedPeer
101{ 109{
102 std::string meetingHostPort; 110 std::string meetingHostPort;
111 std::string onionHostPort;
112 std::string descriptor;
103 unsigned char enc_pub[32]; 113 unsigned char enc_pub[32];
104}; 114};
105 115