mleku on Nostr: yeah, the interesting thing is that a lot of what you have done is similar to what ...
yeah, the interesting thing is that a lot of what you have done is similar to what relayer does though you aren't using interfaces where they should be (just reading RelayFunctions right now) if you make those individual methods into individual interfaces you can optionally process with them in the main thread
also i noticed a lot of these methods you have a client type as the first parameter, this is a red flag you should be making the client type as an implementation type of the interface and then you can leave the rest out and you can use those methods anywhere if they are present (relayer does this with auth and several other things)
Published at
2025-04-04 18:44:48Event JSON
{
"id": "fda6a2a3f6bfedb9dd11d6d81768f96d4afbc120f815fa5be32ac7a7c1eb7eaf",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1743792288,
"kind": 1,
"tags": [
[
"e",
"5adbc1b2566f157261dd72748a9f7c81bd2e6a50f8652e4371ab3097d186df43",
"",
"root",
"f683e87035f7ad4f44e0b98cfbd9537e16455a92cd38cefc4cb31db7557f5ef2"
],
[
"e",
"094f6b682d4ac485f4499b811ffd66097156b1b73a072b7bee3f12430504c1f6",
"wss://theforest.nostr1.com/",
"reply",
"f683e87035f7ad4f44e0b98cfbd9537e16455a92cd38cefc4cb31db7557f5ef2"
],
[
"p",
"f683e87035f7ad4f44e0b98cfbd9537e16455a92cd38cefc4cb31db7557f5ef2"
],
[
"client",
"jumble"
]
],
"content": "yeah, the interesting thing is that a lot of what you have done is similar to what relayer does though you aren't using interfaces where they should be (just reading RelayFunctions right now) if you make those individual methods into individual interfaces you can optionally process with them in the main thread\n\nalso i noticed a lot of these methods you have a client type as the first parameter, this is a red flag you should be making the client type as an implementation type of the interface and then you can leave the rest out and you can use those methods anywhere if they are present (relayer does this with auth and several other things)",
"sig": "84fb649f650df17289a3656dd0c09695aeaca605dca025c685a38a2b73f1d80ef004dcbea4634ca8c41f272a91d0b1cc7205596aa074cfe2bcb35e0554dccc44"
}