STORY
LNContract Week 6
AUTHOR
Joined 2022.09.22
PROJECT
DATE
VOTES
sats
COMMENTS

LNContract Week 6

Week 5 Recap:

  1. Outwardly, I made slow progress this week. I started the week with a rough implementation of the Open Channel functionality. It worked, but it wasn't pretty. A gRPC call to OpenChannelRequest produces a streaming response, the two most important right now are chan_pending and chan_open. That functionality currently works, but my front end implementation didn't accommodate the streaming response.

    1. As a result, I went down a little front-end rabbit hole, disconnected from Bitcoin/LN. I've ultimately decided on dealing with the streaming response by using web-sockets, as expressed below.

    2. The rabbit hole was the effort to understand better web-sockets as implemented by React on the front-end and Django channels on the back end.

    3. All of this I'm sure could have been easily done by someone more knowledgeable about front-end development, but I wanted to better understand that technology so I figured the diversion was worth it. I hated to not be spending time on something not so directly related to Bitcoin/LN, but that is the nature of software development. Diversions happen, often because in order to do one thing a few other things are required. And software development is constant learning.

Week 6 Plan:

  1. Continue with the re-factoring of the front end. My solution is going to be to make a web-socket. This might be overkill, but I kinda want to do it, so I know how. The front end will establish a web-socket connection to the back end. When the Open Channel button is hit, it will send the request to the back end. The back-end method will prepare the request and then make a gRPC call to the LN Node. It will receive the stream response and handle the individual elements of the stream using a yield generator. This is a lot and I'll be happy if I get this done. After that, I will continue with what I had originally planned for last week.

  2. Make/Receive a payment.

    1. With a channel in place, will provide action for the app to make a payment

      1. Receiving party will need to obtain an invoice. Initially, I will assume it has received the invoice and make the functionality for the other node to pay the invoice.
  3. Need to think how the receiving party should receive the invoice. Might use a separate specialized server app to communicate between the two parties. This is a plausible way, but I don't really think its a good LightninWeek 6 Plan:

    Make/Receive a payment.

    With a channel in place, will provide action for the app to make a payment

    Receiving party will need to obtain an invoice. Initially, I will assume it has received the invoice and make the functionality for the other node to pay the invoice.

    Need to think how the receiving party should receive the invoice. Might use a separate specialized server app to communicate between the two parties. This is a plausible way, but I don't really think its a good Lightning way to do this. Need to do some research on this. The plan is to have a more detailed plan on how to accomplish this communication. I'd like to do it within the LN itself.g way to do this. Need to do some research on this. The plan is to have a more detailed plan on how to accomplish this communication. I'd like to do it within the LN itself.

  4. Need to think more specifically as to how to demo the app. Here again the plan is to make a more detailed plan.