| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Telegram bot that allows people to trade using lightning network with other people on telegram, this is an open source project and anyone can create issues, submit a PR, fork it, modify it or create their own bot with the code.
Wherever you are you can start using the bot, just need to have a telegram account with a username and /start the bot.
LNp2pBot is being developed on nodejs and connects with an LND node, we wanted that the telegram bot be able to receive lightning payments without being custodial, after some thinking we decided to use hold invoices for it, the bot only settle seller invoices when each party is ok with it and right after that moment the bot pays the buyer's invoice.
After a user creates a new order and before another user take it, the user can cancel the order, but in some cases users may need to cancel the order, it shouldn't be unilateral.
Only if both parties cancel cooperatively the order is canceled and seller's funds are returned.
If users have a disagreement on canceling or don't want to go forward they can start a dispute.
Both parties can start a dispute at any moment, after a dispute is started a human (aka "solver") will be notified with all the information, this solver will contact both parties to evaluate the situation and take a decision.
After a user starts a dispute, both parties will have increased by 1 their own dispute field in database. If during a dispute it is proven that there is a malicious user, the solver can ban that user, and they will no longer be able to use the bot anymore.
A seller that didn't release funds to the buyer can't open or take another order from the bot and probably will be involved in a dispute from the buyer damaging his/her reputation
Anyone who already has or creates a Telegram group can include the bot inside to facilitate buying and selling bitcoin among its members. The group administrator will earn a commission for transactions conducted within their community, and they can also offer discounts on the fees that the bot charges within their community.
LNp2pBot is an open source project. We are not a company, we don't do ICOs or dark business, we are just people that wants bring solutions to the people using the best open source money in the world. Our work depends on the financial collaboration of the users.
To financially support further development of LNp2pBot, please consider support our project sending bitcoin to lightning address lnp2pbot@getalby.com.
You will need to create an .env file on the root dir, you can use a sample env file called .env.sample on the root dir, an easy way of doing this is just to copy the sample file to .env.
cp .env-sample .env
You will need to have mongo installed and fill the mongo variables on the .env file, those that stats with DB_.
You will need a telegram bot api key (BOT_TOKEN), find out more about it here.
You can route the bot API via Tor service or another proxy if you specify 'SOCKS_PROXY_HOST' parameter in .env. For Ubuntu see this
You will need a lightning network node, for this bot we use LND.
There are two methods to connect with an LND node:
To connect with an LND node we need to set 3 variables in the .env file,
LND_CERT_BASE64: LND node TLS certificate on base64 format, you can get it with base64 -w0 ~/.lnd/tls.cert on the LND node.
LND_MACAROON_BASE64: Macaroon file on base64 format, the macaroon file contains permission for doing actions on the LND node, you can get it with base64 -w0 ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon.
LND_GRPC_HOST: IP address or domain name from the LND node and the port separated by colon (:), example: 192.168.0.2:10009.
Instead of setting the LND_MACAROON_BASE64 and LND_CERT_BASE64 variables in the .env file, you can simply copy the admin.macaroon and tls.cert files to the root of the project.
Please note that you will still need to define the LND_GRPC_HOST in the .env file as in Method 1, step 3.
Please choose one of these two methods for your setup.
To install just run:
$ git clone https://github.com/lnp2pbot/bot.git lnp2pbot $ cd lnp2pbot $ npm install
Here we have a detailed guide for installation and first steps using the bot.
$ npm start
$ npm test
You can find documentation in English, Spanish, Portuguese, French and Persian
See contributing guide.
| Back | FazBrowse Home | New Git URL |