Giter Club home page Giter Club logo

lnpingbot's Introduction

LNPingBot

Test Status

LNPingBot ("Lightning Ping Bot") is a small Telegram bot designed to look up information about Lightning nodes.

Usage

Chat with @LNPingBot on Telegram. Use /help to see the available commands.

Support is available via this Telegram group.

Features

/ping

Usage: /ping PEER_PUBLIC_KEY@HOSTNAME:PORT

This command tests whether a node is reachable on a certain IP address, hostname, or onion address.

For example, when spinning up a new Lightning node you may use this command to test whether it is running and externally reachable on the IP address set in your config file.

Note: This is not a payment probe. The bot simply attempts to add the given node as a peer and measures the time this takes. Forwarding a payment through a node with an already established connection is entirely different and will likely be faster than the /ping command.

Development

Create Telegram Bot

Chat with @botfather on Telegram to create a new bot and get the secret key.

Run Locally

First copy .env.sample file to .env and fill in the required variables. You will need to provide valid base64-encoded credentials for an LND node and the host/port for the gRPC server. You may also need to provide a base64-encoded TLS cert for the server. Here are instructions for generating the credentials.

Then use the following commands to spin up a local development environment:

nix-shell
yarn dev

The API server will be available at http://localhost:8888/api/bot

Forward To Internet

If you want to configure a Telegram bot pointing to this backend, use ngrok:

nix-shell
ngrok http 8888

Then call the Telegram API to set the new backend:

https://api.telegram.org/bot{YOUR_BOT_TOKEN}/setWebhook?url={YOUR_NGROK_DOMAIN}/api/bot

Releases

New versions are automatically released by a CI/CD pipeline whenever the code is updated. After your pull request is merged, changes should be live within a few minutes.

If you want to run your own self-hosted version it's quite simple:

  • Copy the environment variables from .env to your production server
  • Prepare the app for deployment using yarn build
  • Launch the app using yarn start

Donations

This Telegram bot is maintained and hosted by Swiss Routing. It costs a small amount every month to keep the backend server and Lightning node running.

If you'd like to help contribute to the hosting costs, you can send us sats.

  • LNURL: LNURL1DP68GURN8GHJ7MRW9E6XJURN9UH8WETVDSKKKMN0WAHZ7MRWW4EXCUP0X9URJEPKXANRXVRZVVEXGDE4XFJNQRHS3CL
  • Lightning Address: [email protected]
  • Keysend to Lightning node: 0279f06eba0e1080f6a693201f090d0635a0e5dd2ef57d0207210e3d338133092e

lnpingbot's People

Contributors

swissrouting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

22388o

lnpingbot's Issues

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.