Comments (7)
I can work on this, got a pretty clear idea on how the client is used, I need to create a new connection for LND and wrap the calls so they have the same names.
- Flag to specify LND and provide needed params
- Create client connecting to RPC through port and macaroons
- Identify all calls to the client (Named ln on code)
- Create wrappers for those calls into LND
- Tests
I'll work on a simplified fork from this library, which is similar to the current client (lightning-client-js).
I won't use the current one because the access to the client is completely different and heavily designed for specific behaviours from lightningd
@shesek I've found that the client is only used on the following files, can you confirm? Thanks!
app.js, model.js (invoice uses lnconf which is taken from ln but it's not used right now)
from lightning-charge.
Is there a way of running the lightning-charge API on top of lightningnetwork/lnd?
Are there already projects out there trying this?
It's currently not possible and afaik not being worked on, but is something that might be added to Charge in a future release.
Is the REST API described in the README stable or are there still a lot of changes?
It is considered stable. There might be slight changes, but considerations are made to retain backward compatibility and the introduction of incompatible changes will be communicated clearly and result in appropriate semver version bump.
What events does the WebSocket API support?
The WebSocket API currently provides a single event type, for incoming payments. It is simply a message with the invoice JSON as the body. This might be extended in the future for additional event types.
Do you think the current test coverage is enough to run other ElementsProjects like e.g. nanopos on top of a compatible REST API or are they using a lot of undocumented stuff?
The main thing that isn't part of the test coverage (nor is documented very well) is the built-in checkout page that's used by nanopos (via redirection) and Lightning Publisher (via an iframe).
Other than that, I would say that the test coverage for the HTTP REST API is quite complete, minus testing for some edge cases etc.
I was looking into it and got it working.
@parth-choudhary that doesn't seem like it should actually be working... lnd has an entirely different rpc from c-lightning, Lightning Charge won't be able to use that even if you get them to connect.
from lightning-charge.
@mojoaxel I noticed another untested feature: POST /invoice
can accept a webhook
parameter directly, rather than adding it via POST /invoice/:inv/webhook
. I created #39 to keep track of this.
from lightning-charge.
I was looking into it and got it working.
All you need to do is, create a domain socket which listens to lnd node. Since Lightning Charge uses domain socket to connect. There can be a number of ways to do that, I used socat
The command to connect create a domain socket using socat is:
socat -d -d UNIX-LISTEN:/somepath/lightning-rpc,fork OPENSSL:0.0.0.0:8001,verify=0
This is assuming LND is listening on port 8001.
Now start lightning charge using:
charged -l /somepath/ --api-token mySecretToken
And Voila
from lightning-charge.
This is assuming you have installed LND certificates using openssl. :)
from lightning-charge.
That's true, I got them to connect and only rpc calls that they both have same are callable like getinfo, getbalance etc.
from lightning-charge.
Thanks for all your answers!
I think it would be great if we could provide some interoperability in the future.
from lightning-charge.
Related Issues (20)
- shesek/lightning-charge (standalone) is unable to start HOT 2
- shesek/lightning-charge:standalone - unable to start HOT 8
- Support for v0.8.0? HOT 3
- Look for lightning-rpc in the network subdirectory if it does not exists in the parent LN_PATH
- Change price from Bitcoin Average? HOT 2
- Weird 'forbidden' error HOT 2
- Can you use tini in the dockerfiles? HOT 1
- Feature request: Add support for displaying in satoshis HOT 3
- Adopt to changed lightningd api HOT 4
- Docker image error HOT 2
- Docker container stops on boot using latest version of charged HOT 3
- Support for v0.10.0? HOT 1
- Lightning Charge container keeps restarting in docker , ARM64 HOT 2
- Toks
- gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp HOT 4
- Unable to run Docker with existing bitcoind/lightningd
- build fail
- lightning-charge not answering
- Add lightning-network as a topic to this repository
- Compatibility with Core-Lightning v23.05 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning-charge.