adamritter / nostr-relaypool-ts

A Nostr RelayPool implementation in TypeScript using only nostr-tools library as a dependency
https://www.npmjs.com/package/nostr-relaypool
MIT License
63 stars 17 forks source link

Events missformat #30

Closed 0xtlt closed 1 year ago

0xtlt commented 1 year ago

No idea where it can come from, I will dig and try to fix it but Events seems having a tags problem, look the event tags at the following link:

https://nostr-gateway.vercel.app/e/bf67a0eb6e8a69e60f4af4909c3dde0e32b7e746fd32cdde7abf826e10abe4e0?relays=wss://relay.damus.io

And now what I get with Nostr relaypool:

{
  "id": "bf67a0eb6e8a69e60f4af4909c3dde0e32b7e746fd32cdde7abf826e10abe4e0",
  "kind": 1,
  "pubkey": "884704bd421721e292edbff42eb77547fe115c6ff9825b08fc366be4cd69e9f6",
  "tags": [
    [
      "",
      "fd5ac66f8379039427ebeddb60d2ef91397914d683bd46a044e0fd0c5be7c2a7",
      "e"
    ],
    [
      "e",
      "71319b99ef3fc0bc2174b0152861c82ca4c59bd26ef805201a21cd8ef1a0a6e6"
    ],
    [
      "p",
      "45c41f21e1cf715fa6d9ca20b8e002a574db7bb49e96ee89834c66dac5446b7a"
    ],
    [
      "p",
      "9989500413fb756d8437912cc32be0730dbe1bfc6b5d2eef759e1456c239f905"
    ]
  ],
  "created_at": 1675004570,
  "content": "Is the API public or CORS protected?",
  "relayPool": {
    "relayByUrl": {},
    "noticecbs": [],
    "eventCache": {
      "eventsById": {},
      "metadataByPubKey": {},
      "contactsByPubKey": {}
    },
    "minMaxDelayms": null,
    "filtersToSubscribe": []
  },
  "relays": [
    "wss://relay.damus.io",
    "wss://relay.snort.social",
    "wss://nostr-01.bolt.observer",
    "wss://relay.nostr.bg",
    "wss://nostr-pub.wellorder.net",
    "wss://nostr.bitcoiner.social",
    "wss://relay.nostr.info"
  ]
}

I'll tell you if I find something

0xtlt commented 1 year ago

After investigation, it seems coming from my code but I'm just doing a copy of an event Object, anyway... javascript... lol