Giter Site home page Giter Site logo

interledger-deprecated / ilp-plugin-lnd-asym-client Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 1.0 151 KB

Interledger.js ledger plugin for the Bitcoin/Litecoin Lightning Networks

JavaScript 100.00%
interledger ilp ledger-plugin bitcoin litecoin lightning-network payment-channel

ilp-plugin-lnd-asym-client's Introduction

ilp-plugin-lightning

Interledger.js Ledger Plugin for the Lightning Network

This plugin enables Interledger payments through the Bitcoin and Litecoin Lightning Networks.

See the ILP Lightning Demo or the example script to watch this plugin in action.

Installation

npm install --save ilp-plugin-lightning

Usage

This plugin can be used with the ilp client module or the ilp-connector. See the Ledger Plugin Interface for documentation on available methods.

  • Connect to the lightning testnet:
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community --datadir=./data --no-macaroons

Check your settings in ~/Library/Application\ Support/Lnd/lnd.conf, you can also set options like --bitcoin.testnet there instead of on the command line.

lncli --no-macaroons create
lncli --no-macaroons getinfo
lncli --no-macaroons newaddress np2wkh
lncli --no-macaroons walletbalance witness-only=true
  • Run DEBUG=* node test.js

  • You will see a line saying Now go to https://interfaucet.ilpdemo.org/?... - open that URL in your browser. You should see a picture of gummy bears coming out of a faucet (not a picture of a sad faucet).

How It Works

This plugin can be used by two Interledger nodes (sender to connector, connector to connector, and connector to receiver) to send payments through an instance of the Lightning Network. It uses the Bilateral Transfer Protocol, implemented by the payment channel framework, to send Interledger payment and quote details that cannot currently be communicated through lnd itself. Because of the need for an additional messaging layer, this plugin implementation only works bilaterally at present.

ilp-plugin-lnd-asym-client's People

Contributors

bitfurylightning avatar emschwartz avatar michielbdejong avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ilp-plugin-lnd-asym-client's Issues

Illegal value for Message.Field .lnrpc.Invoice.value of type int64

ilp-plugin-lightning:server RPC Error: Illegal value for Message.Field .lnrpc.Invoice.value of type int64: object (no array expected). Message was {"type":"Buffer","data":[6,210,242,171,75,32,1,1,22,95,103,101,116,95,108,105,103,104,116,110,105,110,103,95,105,110,118,111,105,99,101,2,5,91,34,49,34,93]} +3ms

December sprint

This issue is to track work I'll be putting into this plugin in the coming days. The following list of tasks will grow dynamically:

  • update dependencies, see #4
  • full sender-receiver example in readme (BTP on localhost, no https)
  • Make Lightning payments and plugin disconnection aware of each other, see #5
  • Fix #6
  • Fix #7

Cannot decode payment requests

The sender checks whether the invoice from the receiver has the right amount, but for that, it needs to zbase32-decode the pay_req. That process is currently failing with:

Error: String is corrupted at 0
    at Object.decodeString (/Users/michiel/gh/interledgerjs/ilp-plugin-lightning/src/zbase32.js:44:15)
    at decodePaymentRequest (/Users/michiel/gh/interledgerjs/ilp-plugin-lightning/src/reqdecode.js:25:27)
    at payLightningInvoice (/Users/michiel/gh/interledgerjs/ilp-plugin-lightning/src/plugin.js:185:22)
    at Object.createOutgoingClaim (/Users/michiel/gh/interledgerjs/ilp-plugin-lightning/src/plugin.js:161:35)
    at process._tickCallback (internal/process/next_tick.js:109:7) +0ms

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.