package
Settle interledger payments using the Lightning Network
npm install ilp-plugin-lightningGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
:rotating_light: Expect breaking changes while this plugin is in beta.
ilp-plugin-lightning enables settlements between Interledger peers using the Lightning Network on Bitcoin. Using the ILP/Stream protocol, payments are chunked down into small increments, which can facilitate faster and more relaible payments compared with native Lightning!
The integration requires an existing Lightning node with connectivity to the greater Lightning network. Note that speed within the Lightning network degrades as two peers have more degrees of separation, and opening a direct channel provides a much faster experience.
Additional information on the Lightning Network is available here.
npm install ilp-plugin-lightningRequires Node.js 10+.
Here are the available options to pass to the plugin. Additional configuration options are also inherited from ilp-plugin-btp if the plugin is a client, and ilp-plugin-mini-accounts if the plugin is a server.
Clients do not settle automatically. Sending Lightning payments can be triggered by invoking sendMoney on the plugin, and the money handler is called upon receipt of incoming payments (set using registerMoneyHandler).
The balance configuration has been simplified for servers. Clients must prefund before sending any packets through a server, and if a client fulfills packets sent to them through a server, the server will automatically settle such that they owe 0 to the client. This configuration was chosen as a default due to it's security and protection against deadlocks.
role"client" to connect to a single counterparty"server" enables multiple counterparties to connect"client"lndLndOptsTo have the plugin create the connection internally, provide an object with the following properties:
macaroonstring or Bufferfs.readFile)tlsCertstring or Bufferfs.readFile)hostnamestringgrpcPortnumber10009For example:
{
hostname: 'localhost',
macaroon:
'AgEDbG5kArsBAwoQ3/I9f6kgSE6aUPd85lWpOBIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV32ml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaFgoHbWVzc2FnZRIEcmVhZBIFd3JpdGUaFwoIb2ZmY2hhaW4SBHJlYWQSBXdyaXRlGhYKB29uY2hhaW4SBHJlYWQSBXdyaXRlGhQKBXBlZXJzEgRyZWFkEgV3cml0ZQAABiAiUTBv3Eh6iDbdjmXCfNxp4HBEcOYNzXhrm+ncLHf5jA==',
tlsCert:
'LS0tLS1C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FBQUFBQkFBTUFvR0NDcUdTTTQ5CkJBTUNBMGNBTUVRQ0lBOU85eHRhem1keENLajBNZmJGSFZCcTVJN0pNbk9GUHB3UlBKWFFmcllhQWlCZDVOeUoKUUN3bFN4NUVDblBPSDVzUnB2MjZUOGFVY1hibXlueDlDb0R1ZkE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=='
}maxPacketAmountBigNumber, number, or stringInfinityThis plugin uses the Bilateral Transfer Protocol over WebSockets to send messages between peers. Two subprotocols are supported:
peeringRequest[Identity public key], UTF-8 encodedpaymentRequestLatest published Apr 3, 2019
latest
bosbaber
dabatla@gmail.com
Estimated unpacked size across 33 packages.
17.9 MB
Includes dependencies.
11 direct · 4 outdated
^6.4.0
7.8.2
^4.1.1
4.4.3
^2.2.0
2.2.1
^1.0.2
1.4.5-alpha.2
^3.0.7
3.1.4-alpha.2
github:trackforce/protobuf.js#86f968acd6b9b1489059f08e48c9469ba8d4fba1
8.8.1
^7.2.1
11.1.5
^0.3.6
1.14.7
^5.0.1
6.4.9
^1.3.10
1.5.0
^4.0.2
4.2.0