Lightning JavaScript implementation that conforms BOLT [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2018-04-23T13:23:34+00:00


Summary:

Aleksey Bykhun is interested in running a Lightning Network (LN) node within a browser and is seeking suggestions on how to achieve this. One option would be to implement the BOLT protocol from scratch in JavaScript, but the writer is looking for a simpler approach. They inquire if anyone has successfully compiled the c-lightning project under WebAssembly, a C/C++ compiler that generates browser-compatible byte-code. However, there are challenges to overcome as c-lighting relies on spawning multiple processes and depends on the bitcoin-cli binary for bitcoind RPC.The possibility of using WebAssembly for multiple processes is mentioned as a potential solution. The writer notes that there is a c-lightning specific mailing list available for more information. WebAssembly allows for the use of low-level C functions through Emscripten lib, which provides wrappers for many C-functions. However, certain actions of c-lightning, such as sockets, may complicate the compilation process.Aleksey asks for guidance on what to consider when attempting to run a Lightning Network node in a browser and welcomes general feedback on the idea. Tyler suggests using Lightning Charge for c-lightning or utilizing the REST and gRPC built into lnd. It is emphasized that the key difference in these suggestions is that the browser does not have access to the key material, which remains secure within the daemon's usual directory. The writer even proposes bundling the daemon with the browser, similar to the Tor Browser Bundle, for a more convenient package.


Updated on: 2023-07-31T19:59:16.235297+00:00