so, i'm trying a new thing with Junie

i've asked it to take the NWC package of https://github.com/getAlby/js-sdk and translate it to #golang

i'm sure it's gonna not work but it might be good enough that i can fix it and make it work.

why alby built half of their infra with go and never considered building the client/server parts of the NWC SDK so they can be used by go based apps is beyond me. but hopefully i will fix this, and i'm NOT porting it to go-nostr, because that is a bag of dicks, slathered in blueberry and pickles.

afaik there is a Go library by somebody, check if you fan contribute there.

JS is just more wide used.

Reply to this note

Please Login to reply.

Discussion

JS is not widely used for servers that need to handle high load with low latency. Go's throughput is a bit lower than C/C++/Java/Rust but its latency is way lower.

anyway, i am not turning my relay project into something that requires 50 different toolchains to be installed. linux, bash, go, the end.

that JS library is a client library...

the js-sdk one? no, it has client and server

https://github.com/getAlby/js-sdk/tree/master/src/nwc

i actually didn't notice the client part of it and refactored only the types and wallet service parts first, still gotta finish the client. i need both for completeness, i think the client side would only be needed to make payments outbound, the server would be for receiving them. or maybe i do need both, idk, but i expect to need the client later when i build a UI

btw, why is the encryption functions for the client only doing nip-04?