Git Product home page Git Product logo

clightning-tebot's Introduction

Telegram Bot for c-lightning

Build Status

Not Custodiant Telegram Bot to control lightning wallet based on c-lightning implementation.

We discorage to use the bot without any access rules, specify the telegram username to interact with.

Some critical operation are not exported by Telegram Bot, as: fund new channel, close channel, withdraw, newaddress.

Warning

This software is for testing and demonstration purposes only. This software and c-lightning are still very new and contain known and unknown bugs. In particular, be warned: YOU MAY LOSE FUNDS!

Commands

  • /help: Show help message
  • /invoice msatoshi [label] [description] [expiry]: Create an invoice for {msatoshi} with {label} and {description} with optional {expiry} seconds (default 1 hour). If {label} is not defined a random value will be generate. Default description is empty.
  • /decodepay bolt11 [description]: Decode {bolt11}, using {description} if necessary
  • /pay bolt11 [msatoshi]: Send payment specified by {bolt11} with {msatoshi}
  • /listinvoices [label]: Show invoice {label} (or all, if no {label})
  • /listpayments [bolt11] [payment_hash]: Show outgoing payments
  • /waitinvoice label: Wait for an incoming payment matching the invoice with {label}, or if the invoice expires
  • /waitanyinvoice [lastpay_index]: Wait for the next invoice to be paid, after {lastpay_index} (if supplied)

If a qrcode image is send to the bot without any command, the bot call implicit /decodepay.

Install

In order to install all dependencies

npm install

Setup

The configuration file config.json requires:

  • telegramToken: telegram token of specified bot
  • lightningDir: c-lightning directory
  • username: replay only to telegram username

An configuration example file is available ad config_example.json

Run

To run the bot in a single instances:

npm start

Run the bot as a daemon using pm2

npm install -g pm2
pm2 start ./index.js --name clightning-tebot
pm2 save

clightning-tebot's People

Contributors

lvaccaro avatar

Stargazers

Andrejs Agejevs avatar Coinpocalypse avatar Incede avatar Kristaps Kaupe avatar The Hapax avatar Federico Badaloni avatar  avatar Melvin Carvalho avatar Valerio Vaccaro avatar isidoro ghezzi avatar

Watchers

James Cloos avatar  avatar  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.