Giter VIP home page Giter VIP logo

channel-creation-plugin's Introduction

Portico Channel Creation Plugin

This is a c-lightning plugin for Portico Channel Creation Swaps

Installation

This plugin is written in Python and works with Python version 3.7 or higher. Its dependencies can be installed with:

pip3 install -r requirements.txt

To install the plugin itself, download the Python script and make it executable:

wget https://raw.githubusercontent.com/BoltzExchange/channel-creation-plugin/master/channel-creation.py
chmod +x channel-creation.py

And finally run c-lightning with the plugin:

lightningd --plugin ~/path/to/channel-creation.py

If the plugin started correctly, you should see this message in the logs of c-lightning:

INFO plugin-channel-creation.py: Started channel-creation plugin

Usage

When starting c-lightning, you have to provide the Boltz API endpoint and node public key of the Boltz Lightning node on your network with this argument:

--boltz-api <arg> --boltz-node <arg>

The Boltz API endpoint is:

  • https://boltz.exchange/api for mainnet
  • https://testnet.boltz.exchange/api for testnet

To find the right node public key, checkout the FAQ section of boltz.exchange or testnet.boltz.exchange or query your preferred Lightning network explorer for Boltz.

The plugin exposes the RPC commands:

addchannelcreation invoice_amount inbound_percentage [private]
    Adds a new Boltz Channel Creation Swap

getchannelcreation 
    Gets all available information about the added Boltz Channel Creation Swap

add-channel-creation tells the plugin to create an invoice for a Channel Creation Swap. invoice_amount is the amount of the invoice to be created in millisatoshis, inbound_percentage is the desired percentage of inbound liquidity Boltz should provide in the channel and private tells the plugin whether the channel Boltz opens should be private (default is false).

get-channel-creation allows you to query the status of the Channel Creation Swap.

channel-creation-plugin's People

Contributors

22388o avatar dependabot[bot] avatar michael1011 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.