Conversation
e6fce48 to
67983e4
Compare
67983e4 to
976f025
Compare
|
Hi @dechristopher, thanks for all the effort you put into this PR. I would like to say upfront that, in different circumstances, NIP-05 would be a very cool addition to HAVEN; one that was requested many times by Haven's users. Unfortunately, for several reasons, both Haven’s creator and I have decided to declare Haven feature complete and to accept only bug fixes for Haven in Bitvora's repository. No new features are being accepted in this repository at this time. You can check out @barrydeen’s announcement here: If you are willing to experiment and contribute to something new by Haven’s original creator, maybe have a look at what he is working on here: I will soon add a message to the README so that the current status of Haven’s Bitvora repository is clearer to end users and contributors. Despite not being able to accept your contribution in this repository, I would like to emphasise that Haven is still 100% MIT-licensed open source software and that all developers are welcome to fork it. In fact, I would highly encourage you to advertise your fork with NIP-05 support on Nostr, perhaps using the #haven hashtag so that other users get to know about it. Who knows? It is just the nature of FOSS that one of Haven’s forks may evolve into the go-to next generation relay that everyone gravitates towards. It would certainly make me happy to see Haven evolve and find a life of its own through its community and a new group of developers willing to maintain it beyond the Bitvora era. |
Description
This PR introduces support for NIP-05 (nostr.json), enabling Haven to serve a
/.well-known/nostr.jsonendpoint to provide identity verification and routing information for users of the relay.Changes Made
nip05.go: Implemented a dedicated NIP-05 handler that:nostr.jsonconfig file?name=query parametersAccess-Control-Allow-Origin: *) andapplication/jsonheadersmain.go: Registered the/.well-known/nostr.jsonendpoint and hooked it up to thenip05HandlerNIP05ConfigFileproperty to the global Config struct (config.go)NIP05_CONFIG_FILE="nostr.json"to.env.examplenostr.jsontemplate by default withnames,relays, andnip46blocks.envmissingWHITELISTED_NPUBS_FILEandBLACKLISTED_NPUBS_FILE)How to Test:
.envcontainsNIP05_CONFIG_FILE="nostr.json"or whatever your file path isnostr.jsonwith a valid test user (e.g.,{"names": {"alice": "<64-char-hex-pubkey>"}})GET /.well-known/nostr.json?name=alice200 OKstatus and the appropriate CORS headers400404