Aleksey,<div><br></div><div>Considering the security situation with browsers, I think a better approach would be to write an extension that interfaces with a daemon already running on the system thrlugh REST or similar. </div><div><br></div><div>Lightning Charge would help here for c-lightning, or lnd has REST and gRPC built in. </div><div><br></div><div>The key difference here is key msterial isn't accessed by the browser and secured by the browser's pitiful security, but instead live in the usual directory and the daemon handles it normally.</div><div><br></div><div>You could even do something like the Tor Browser Bundle and bundle the daemon with the browser in a neat package.</div><div><br></div><div>Thanks,</div><div>Tyler<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 23, 2018, 02:27 Igor Cota <<a href="mailto:igor@codexapertus.com">igor@codexapertus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Aleksey,<div><br></div><div>Your biggest obstacle is probably the fact that c-lightning spawns several processes (subdaemons) and depends on the bitcoin-cli binary for bitcoind RPC. If WebAssembly supports multiple processes (not just threads) that's a good start I guess.</div><div><br></div><div>There is a c-lightning specific mailing list on <a href="https://lists.ozlabs.org/listinfo/c-lightning" target="_blank">https://lists.ozlabs.org/listinfo/c-lightning</a></div><div><br></div><div>Cheers,</div><div>Igor</div></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 April 2018 at 16:39, Быхун, Алексей Викторович <span dir="ltr"><<a href="mailto:aleksey.bykhun@phystech.edu" target="_blank">aleksey.bykhun@phystech.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Hi everyone!</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,helvetica,sans-serif">I am looking for a way to run a LN node inside the browser. One way would be to implement BOLT protocol from scratch in JS, but I am thinking of a more easy way.</span><br></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Has anyone succeed in compiling, for example, c-lightning project (<a href="https://github.com/ElementsProject/lightning" target="_blank">https://github.com/ElementsProject/lightning</a>) under WebAssembly (<a href="http://webassembly.org/getting-started/developers-guide/" rel="nofollow" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">http://webassembly.org/getting-started/developers-guide/</a>).</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">WebAssembly is a C/C++ compiler into browser-compatible byte-code. It can use JS-API, but can also work with low-level C functions.</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">There are some things c-lighting does (e.g. sockets), that should stop it from compiling easily. However, there are wrappers for many C-functions by Emscripten lib: <a href="https://github.com/kripken/emscripten" target="_blank">https://github.com/kripken/emscripten</a>.</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">My question is what should I look for when trying to run that? And also, I want to hear your general feedback on the idea.</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Aleksey Bykhun.</font></p></div></div>
<br>_______________________________________________<br>
Lightning-dev mailing list<br>
<a href="mailto:Lightning-dev@lists.linuxfoundation.org" target="_blank">Lightning-dev@lists.linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div class="m_8993571357537553449gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b>Igor Cota</b><div>Codex Apertus Ltd<br></div></div></div></div></div>
</div>
_______________________________________________<br>
Lightning-dev mailing list<br>
<a href="mailto:Lightning-dev@lists.linuxfoundation.org" target="_blank">Lightning-dev@lists.linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev</a><br>
</blockquote></div></div>