Code Monkey home page Code Monkey logo

lnd-rest-client's Introduction

lnd-rest-client

GitHub GitHub Workflow Status Maven Central

lnd-http-client is a simple client to interact with Lightning Network Daemon (LND) via it's REST API. Thanks to the API's excellent documentation the client is simply generated based on it's swagger definition.

If you prefer LND's gRPC API please have a look at LighntingJ.

Why this client?

This library mostly exists because when I needed such a library LighntingJ. wasn't (yet) supported on Apple Silicon....

Other advantages are:

  • it's very easy to review (which you should always do when you handle any valuable assets, crypto or otherwise)
  • it supports good old HTTP/1.1 while gRPC is build on http/2. In a perfect world we would all have migrated to http/2 already but there might be circumstances that might hinder its usage.
  • It serves as my playground for reproducible builds via maven ;-)

QuickStart

Maven

<dependency>
    <groupId>net.osslabz</groupId>
    <artifactId>lnd-rest-client</artifactId>
    <version>0.0.2</version>
</dependency>

Usage

    String lndHost="127.0.0.1";
    int lndPort=8080;

    String lndCertPath="/path/to/tls.cert";
    String lndMacaroonPath="/path/to/readonly.macaroon";

    LndApiClient lndApiClient=new LndApiClient(lndHost,lndPort,lndCertPath,lndMacaroonPath,true);

    LnrpcNetworkInfo lnrpcNetworkInfo=lndApiClient.getLightningApi().getNetworkInfo();

    log.debug("network info: {}",lnrpcNetworkInfo);

Logging

The actual client uses slf4j-api but doesn't package an implementation. This is up to the using application.

lnd-rest-client's People

Contributors

rvullriede avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.