BoostCLI-0.5.3
توضیحات
Command line tool to send and receive Podcasting 2.0 Value
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | BoostCLI-0.5.3 |
| نام | BoostCLI |
| نسخه کتابخانه | 0.5.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | boostcli.v1pty@slmail.me |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/BoostCLI/ |
| مجوز | - |
# BoostCLI
<img width=100 height=100 src="boostcli.png" />
[](https://github.com/valcanobacon/BoostCLI/actions/workflows/ci.yml)
## Requirements
* Python `3.7+`
* setuptools (tested with `57.4.0`)
* A Raspiblitz Node (LNPay Support Coming)
## Quick Start
```
$ pip install BoostCLI
$ boostcli boost http://mp3s.nashownotes.com/pc20rss.xml
```
### Raspiblitz
```
$ pip install BoostCLI
$ boostcli --macaroon /mnt/hdd/app-data/lnd/data/chain/bitcoin/mainnet/admin.macaroon --tlscert /mnt/hdd/app-data/lnd/tls.cert boost http://mp3s.nashownotes.com/pc20rss.xml
```
## Demo

## Not Quick Start
### Terminal #1
Open a Tunnel from this computer to your Raspiblitz Node. Replace `192.168.1.100` with the IP Address of your node.
```sh
ssh -NL 10009:127.0.0.1:10009 admin@192.168.1.100
```
Enter your password when prompted and leave the terminal open. Switch to a new terminal to continue the quick start.
### Terminal #2
#### Get Macaroon and TLS Certificate
Get the `readonly.macaroon` and `tls.cert` from your node
* SSH into Node, replace `192.168.1.100` with the IP Address of your node.
```sh
ssh admin@192.168.1.100
```
* In Raspiblitz CONNECT -> EXPORT -> scp and following the instructions
#### Install Dependencies
This should be done in the directory that contains this project.
```sh
python3 -m venv venv && source venv/bin/activate # Optional but Recommended
pip install -e .
```
#### Read the docs
```sh
boostcli --help
boostcli boosts --help
```
#### Run Command
```sh
$ boostcli --macaroon /mnt/hdd/app-data/lnd/data/chain/bitcoin/mainnet/admin.macaroon --tlscert /mnt/hdd/app-data/lnd/tls.cert boost http://mp3s.nashownotes.com/pc20rss.xml
```
## Virtual Environment Explained
Using a Python Virtual Environment is optional but highly recommended and is standard practice with development. The basic idea is you create a virtual environment for each project and install all the dependencies into it. The Virtual Environment only needs to be created once but must be activated every time a new terminal is opened.
### Create Virtual Environment
```sh
python3 -m venv venv
```
### Activate Environment
```sh
source venv/bin/activate
```
### Deactivate Environment
```sh
deactivate
```
## Sending a Boostagram with lncli
```sh
PUBKEY="03ecb3ee55ba6324d40bea174de096dc9134cb35d990235723b37ae9b5c49f4f53"
VALUE=69
MVALUE=$(expr $VALUE \* 1000)
SENDER_NAME="Dude named Ben"
MESSAGE="Test Message from lncli!"
RECEIVER_NAME="Podcaster"
APP_NAME="lncli"
DATA="{\"action\":\"boost\",\"value_msat_total\":\"$MVALUE\",\"app_name\":\"$APP_NAME\",\"sender_name\": \"$SENDER_NAME\",\"name\":\"$RECEIVER_NAME\",\"message\":\"$MESSAGE\"}"
RECORD=`echo $DATA | od -A n -t x1 | sed -z 's/[ \n]*//g'`
lncli sendpayment --dest=$PUBKEY --amt=$VALUE --keysend --data 7629169=$RECORD
```
## Receive Boostagrams with lncli
```
for x in $(lncli listinvoices | jq '.invoices[].htlcs[0].custom_records."7629169"'); do echo $x | sed 's/"//g' | xxd -r -p; done
```
نیازمندی
| مقدار | نام |
|---|---|
| <1,>=0.4.3 | lnd-grpc-client |
| <9,>=8.0.3 | click |
| <5,>=4.10.0 | beautifulsoup4 |
| <5,>=4.7.1 | lxml |
| <3,>=2.27.1 | requests |
| <1,>=0.8.9 | tabulate |
| <5,>=4.62.3 | tqdm |
| <13,>=12.5.1 | rich |
| <1,>=0.8.0 | build |
| <5,>=4.0.1 | twine |
| <7,>=6.2.5 | pytest |
| <5,>=4.0.1 | flake8 |
| <1,>=0.3.2 | flake8-black |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl BoostCLI-0.5.3:
pip install BoostCLI-0.5.3.whl
نصب پکیج tar.gz BoostCLI-0.5.3:
pip install BoostCLI-0.5.3.tar.gz