From 51d617e70f90a972185917ea0096c1ecef2bfa8b Mon Sep 17 00:00:00 2001 From: Bitflash-sh Date: Fri, 24 Jul 2026 11:18:11 -0300 Subject: Bitflash: fair-launch release Satoshi's bitcoin-0.1.0 reborn with RandomX CPU proof of work, anonymous .btf addressing over Nostr with CGNAT rendezvous, automatic peer discovery, a headless Linux node, and Windows GUI wallet. Fair launch, no premine, 21M cap. --- src/nostr.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/nostr.h (limited to 'src/nostr.h') diff --git a/src/nostr.h b/src/nostr.h new file mode 100644 index 0000000..5ec9f65 --- /dev/null +++ b/src/nostr.h @@ -0,0 +1,39 @@ +// Copyright (c) 2026 Bitflash developers +// Distributed under the MIT/X11 software license. +// +// Peer discovery over Nostr relays -- replaces the old ThreadIRCSeed. Each +// node publishes a replaceable event (NIP-78, kind 30078) containing its +// "ip:port", signed with Schnorr/secp256k1 (BIP340, the same scheme used by +// Nostr), and subscribes to receive the announcements of other nodes, feeding +// them into the Bitflash address manager. + +#ifndef BITFLASH_NOSTR_H +#define BITFLASH_NOSTR_H + +#include + +// Thread entry point (signature compatible with _beginthread) +void ThreadNostrSeed(void* parg); + +// Public relays used for discovery. Tunable. +extern const char* pszNostrRelays[]; +extern const int nNostrRelays; + +// Rendezvous meeting relay ("host:port") this node registers at and advertises +// in its .btf descriptor. Overridable with /rvrelay=host:port. +extern std::string strBtfMeetingRelay; + +// Copy this node's .btf identity (lazily loading or generating it): the x-only +// pubkey (= the .btf address) and the x25519 secret for the end-to-end channel. +bool BtfGetIdentity(unsigned char pubkey[32], unsigned char enc_sk[32]); + +// This node's printable .btf address, or "" if the identity failed to load. +std::string BtfLocalAddress(); + +// Resolve a .btf address via the public discovery relays: fetch the owner's +// self-certified descriptor and return its meeting node ("host:port") and +// x25519 public key for the end-to-end channel. +bool BtfResolve(const std::string& btfAddr, std::string& meetingHostPort, + unsigned char enc_pub[32]); + +#endif -- cgit v1.2.3