lnsocket

A minimal C library for connecting to the lightning network
git clone git://jb55.com/lnsocket
Log | Files | Refs | Submodules | README | LICENSE

commit 0bd5a8989512e2c78291f0ea361ab37759dde4b7
parent 781846a0b17c9f1745ee84b5d9f767edb9d6f472
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 16 Mar 2022 18:18:55 -0700

I prefer this

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mexamples/node.js | 3++-
Mindex.js | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/node.js b/examples/node.js @@ -1,7 +1,8 @@ const LNSocket = require('lnsocket') async function go() { - const ln = await LNSocket() + const LNSocket = await lnsocket_init() + const ln = LNSocket() ln.genkey() await ln.connect_and_init("03f3c108ccd536b8526841f0a5c58212bb9e6584a1eb493080e7c1cc34f82dad71", "24.84.152.187") diff --git a/index.js b/index.js @@ -5,7 +5,7 @@ const LNSocketReady = Module.lnsocket_init() async function load_lnsocket(opts) { const LNSocket = await LNSocketReady - return new LNSocket(opts) + return LNSocket } module.exports = load_lnsocket