ln-service icon indicating copy to clipboard operation
ln-service copied to clipboard

Abstract out REST proxy

Open alexbosworth opened this issue 4 years ago • 4 comments

The original REST proxy mode has some problems, needed fixes:

  1. Abstract out and fill in all REST translations
  2. Add HMAC based authentication option
  3. Add a proxy call that allows simply tunneling gRPC calls through REST

alexbosworth avatar Nov 30 '19 20:11 alexbosworth

Regarding point 3: I've experimented with that in a project of mine where I'm also using ln-service. I've written up some more on the approach here and maybe you find this interesting – relevant part here.

dennisreimann avatar Dec 11 '19 10:12 dennisreimann

Looks great

This is how ln-service started originally before I switched it to focus on gRPC. I think REST is more natural and flexible for a lot of people, including myself before I adapted my stuff to gRPC

alexbosworth avatar Dec 11 '19 17:12 alexbosworth

I've created an alternative to the REST proxy that I think can serve as a successor: https://github.com/alexbosworth/lightning/tree/master/lnd_gateway

The big difference though is that I don't really do REST with this, it's more of a direct proxy to the gRPC. That helps ensure that the REST requests would have total feature parity with gRPC requests

alexbosworth avatar Feb 03 '20 17:02 alexbosworth

Nice, I‘ll take a look!

dennisreimann avatar Feb 03 '20 18:02 dennisreimann