From 65ec65bc86a95419048f3199f9d4883db36beaa8 Mon Sep 17 00:00:00 2001 From: Dolu Date: Mon, 1 Nov 2021 20:20:09 +0100 Subject: [PATCH] Update readme with new backends --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f89d78e..b6cf0d2 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ Una is a Lightning network node wrapper for LND, c-lightning, Eclair, LndHub, LN ## Supported backends - [x] LND (REST) - - [ ] c-lightning + - [x] c-lightning - [x] Eclair (REST) - - [ ] LndHub + - [x] LndHub - [ ] LNBits - Want another implementation? [Open an issue](https://github.com/Dolu89/una/issues/new) @@ -26,12 +26,23 @@ import { Una, EBackendType, ICreateInvoice, Invoice } from 'una-wrapper' const { Una, EBackendType, ICreateInvoice, Invoice } = require('una-wrapper') // LND Rest -const hexMacaroon = '0201036...311c811' -const unaWrapper = new Una(EBackendType.LndRest, { url: 'https://127.0.0.1:8080', hexMacaroon }) +const unaWrapper = new Una(EBackendType.LndRest, { url: 'https://127.0.0.1:8080', hexMacaroon: '0201036...311c811' }) // Eclair Rest const unaWrapper = new Una(EBackendType.EclairRest, { url: 'http://127.0.0.1:8080', user: '', password: 'eclairpw' }) +// C-lightning +const unaWrapper = new Una(EBackendType.ClnRest, { url: '127.0.0.1:8080', hexMacaroon: '0201036...311c811' }) +const unaWrapper = new Una(EBackendType.ClnSocketTcp, { host: '127.0.0.1', port: 27743 }) +const unaWrapper = new Una(EBackendType.ClnSocketUnix, { path: 'unix://root/.lightning/lightning-rpc' }) + +// LndHub +const unaWrapper = new Una(EBackendType.LndHub, { uri: 'lndhub://login:password@https://lndhub.io/' }) +const unaWrapper = new Una(EBackendType.LndHub, { url: 'http://lndhub.io/', login: 'login', password: 'password' }) + +// Tor is supported for LND Rest, Eclair Rest, C-lightning Rest and LndHub +const unaWrapper = new Una(EBackendType.LndHub, { url: 'http://TorLndhub.onion/', login: 'login', password: 'password' }, 'socks5h://127.0.0.1:9050') + /* Create an invoice of 15k satoshis with 'Hello' as memo Possible options are the following (from src/interface/i-create-invoice.ts)