LNURL Encoder Decoder

The lightning network grew a lot in 2018. In Jan, 2019, there were around 3000 nodes having active channels. Around the same time, there were 20000 channels. The network capacity was $2 M. It is our responsibility to ensure people all over the world can reap the benefits of this fascinating technology. Often seen by experts as the solution to bitcoin's scalability problem, many corporations all over the world have launched offerings based on the lightning network that have been very successful. Bitrefill is one of them. The corporation allows purchasing over 750 gift cards, phone refilling, and payment with lightning. The lnurl project, recommended by Bitrefill, inspired us to build LNURL Encoder Decoder. The app's present version is 1.0.0. It can encode a url to an lnurl and decode an lnurl to a url. It has been built utilizing bitcoin lightning network technology. On the front end, the user sees the app page that's written in html. We are using raleway font from google fonts. We are using jquery 3.4.1 for the client side code. In case of encoding, when the user enters the url to encode, and presses the encode button, the entered url is sent to the server's /encode endpoint. In case of a success, the response received i.e. the lnurl is shown to the user in json. In case of decoding, when the user enters the lnurl to decode, and presses the decode button, the entered lnurl is sent to the server's /decode endpoint. In case of a success, the response received i.e. the url is shown to the user in json. Css has been used for beautification purposes. On the backend, we are using a node express server. We are using lnurl version 0.1.0 which is the latest. The node engine that's in use is version 8.x. We are using body parser to retrieve the url and the encoded url from the request to the server. On the /encode post route, the received url is encoded and sent in response. On the /decode post route, the received lnurl is decoded and sent in response. We did not run into any significant challenge on the course of development due to the crystal clear documentation available from bitrefill. We studied the lnurl npm package documentation painstakingly to implement the concept. It was a great experience developing the solution. To test the app, please open lnurl-encoder-decoder.glitch.me on a modern browser, such as, chrome. Please wait for a little as it loads. When it is loaded, you should see the app. The app has 3 sections. One is the encoder section, one is the decoder section, and the remaining one is the result section at the bottom. To test the encoder, please enter a url in the text box and press the encode button. The encoded url will appear at the bottom in the result section. To test the decoder, please enter an lnurl (it will start with lnurl ...), in the text box and press the decode button. In a few seconds, you will see the decoded url in the result section.

Built With

Share this project:
×

Updates