can you tell me about how you envision relays preventing spam without identifying the users?

Reply to this note

Please Login to reply.

Discussion

i like it, and i think that it should be something like that.

i just learned about SharedWorkers btw, they can be used on chrome/edge/firefox but not safari, safari is gay like its CEO and you have to specially handle that with a DedicatedWorker per tab. this could then become an IPC that mimics the relay nip-01 RPC and lets you manage relay connections peristently as a worker thread. this would eliminate all risk of race conditions like you see with react apps using NDK because the worker is a single thread and effectively would queue processing - if you wanted it to, or you can fan it out with promises to individual relay sockets so it dispatches the request/event and when it returns, it then returns the response back to the component via teh IPC. this would also then let you restrict use of the signer/bunker to a single piece of code that is isolated from the rest, in a separate thread and runtime.