lnsocket

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

commit 268d4fa9d96bbc795b96c402f0d45dab4c452fad
parent 7596faf372448a73d62f11e5c4f693efc71e1ddb
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 11 Mar 2022 20:40:25 -0800

switch readme to markdown

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

Diffstat:
DREADME | 67-------------------------------------------------------------------
AREADME.md | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 67 deletions(-)

diff --git a/README b/README @@ -1,67 +0,0 @@ - -lnsocket -======== - -A simple C library for sending messages over the lightning network - -Thanks to Rusty and the clightning project for much of this code, I have -adapted it to be more library friendly. - - -Motivation ----------- - -I wanted a way to send custom messages to my lightning node, such as RPC. -Building this as a simple C library will allow you to speak the lightning -network in native applications, like on mobile. - - -Dependencies ------------- - -You'll need libtool/autoconf/automake for the libsodium/secp256k1 submodules, -but otherwise there are no dependencies - - -Building --------- - -$ make - - -iOS ---- - -$ make ios - -This will build lnsocket.a, libsodium.a and libsecp256k1.a under target/ios for -arm64 and ios-sim. - - -WASM/JS/Web ------------ - -$ make wasm - -This will build lnsocket.js and lnsocket_module.wasm so that you can connect to -the lightning network from your browser via websockets. See lnsocket_example.js -for a demo. - - -Examples --------- - -* See test.c for a ping/pong example - -* See lnrpc.c for an RPC example - -Contributing ------------- - -Send patches to jb55@jb55.com: - -$ git config format.subjectPrefix 'PATCH lnsocket' -$ git config sendemail.to 'William Casarin <jb55@jb55.com>' -$ git send-email --annotate HEAD^ - -See https://git-send-email.io/ for configuring your mailer diff --git a/README.md b/README.md @@ -0,0 +1,59 @@ + +# lnsocket + +A simple C library for sending messages over the lightning network + +Thanks to Rusty and the clightning project for much of this code, I have +adapted it to be more library friendly. + + +## Motivation + +I wanted a way to send custom messages to my lightning node, such as RPC. +Building this as a simple C library will allow you to speak the lightning +network in native applications, like on mobile. + + +## Dependencies + +You'll need `libtool`, `autoconf`, and `automake` for the `libsodium` & +`secp256k1` submodules, but otherwise there are no dependencies. + +You'll need `emscripten` for the `wasm` build. + +## Building + + $ make + +### iOS + + $ make ios + +This will build `lnsocket.a`, `libsodium.a` and `libsecp256k1.a` under +target/ios for arm64 and ios-sim. + + +### WASM/JS/Web + + $ make wasm + +This will build `lnsocket.js` and `lnsocket_module.wasm` so that you can +connect to the lightning network from your browser via websockets. See +[lnsocket_example.js](lnsocket_example.js) for a demo. + + +## Examples + +* See [test.c](test.c) for a ping/pong example + +* See [lnrpc.c](lnrpc.c) for an RPC example + +## Contributing + +Send patches to [mailto:jb55@jb55.com](jb55@jb55.com): + + $ git config format.subjectPrefix 'PATCH lnsocket' + $ git config sendemail.to 'William Casarin <jb55@jb55.com>' + $ git send-email --annotate HEAD^ + +See [https://git-send-email.io/](git-send-email.io) for configuring your mailer