pluja / nerostr

nostr paid relay, but with monero

Home Page:https://xmr.usenostr.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not parse NIP-11 information document

hundehausen opened this issue · comments

Hey @pluja and other Nerostr users,

as you can see here and here, the website could not read the NIP-11 information document from our relays.

I checked my config from strfry.conf, it seems correct:

    info {
        # NIP-11: Name of this server. Short/descriptive (< 30 characters)
        name = "nostr-portemonero"

        # NIP-11: Detailed information about relay, free-form
        description = "Nostr Relay powered by Nerostr. Monero is real money."

        # NIP-11: Administrative nostr pubkey, for contact purposes
        pubkey = "ffe7daceb57342af434f1ff7607042db5ed4b9b90feb6fd460e0573d3487c006"

        # NIP-11: Alternative administrative contact (email, website, etc)
        contact = "https://twitter.com/hundehausen"
    }

In the protocol description they write:

When a relay receives an HTTP(s) request with an Accept header of application/nostr+json to a URI supporting WebSocket upgrades, they SHOULD return a document with the following structure.

{
  "name": <string identifying relay>,
  "description": <string with detailed information>,
  "pubkey": <administrative contact pubkey>,
  "contact": <administrative alternate contact>,
  "supported_nips": <a list of NIP numbers supported by the relay>,
  "software": <string identifying relay software URL>,
  "version": <string version identifier>
}

Any field may be omitted, and clients MUST ignore any additional fields they do not understand. Relays MUST accept CORS requests by sending Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods headers.

Is our Caddyfile missing something?

Hey! You're right, there's a missing config in the caddyfile. Just fixed my relay: https://nostr.watch/relay/xmr.usenostr.org

I'll update the README right now

to anyone: remember to use a hex key (not npub), you can use this to transform it: https://damus.io/key

I can confirm it's working now! Thank you