尚未检测到更新。GitHub 发布版本后会显示在这里。
Bitcoin transactions notification bot
翻译准备中
正在加载完整 README。
查看完整 README ↗Bitcoin blockchain explorer and events notification bot. It can send notifications on watched addresses and transactions. It also sends various information and statistics on Bitcoin network
| Flag | Default | Description |
|---|---|---|
-botToken | (required) | Telegram bot token used to authenticateoutbound Bot API calls |
-listen | :8080 | Address the webhook server listens on |
-webhookPath | /bot | Path the Bot API server will POST updates to |
-webhookURL | URL the Bot API server should send updates toe.g. http://localhost:8080/bot | |
-apiBaseURL | http://localhost:8081 | Base URL of the local telegram-bot-api server |
-secretToken | Optional secret checked against theX-Telegram-Bot-Api-Secret-Token header | |
-registerWebhook | true | Call setWebhook on startup |
-db | bitnsbot.db | Path to the database |
-coreURL | Bitcoin Core JSON-RPC URLe.g. http://127.0.0.1:8332 (leave emptyto skip connecting to the node) | |
-coreUser | Bitcoin Core RPC username (or use -coreCookie) | |
-corePass | Bitcoin Core RPC password (or use -coreCookie) | |
-coreCookie | Path to Bitcoin Core's .cookie file, an alternative to-coreUser/-corePass | |
-coreZMQ | Comma-separated ZMQ endpoints publishinghashblock and rawtx,e.g. tcp://127.0.0.1:28332,tcp://127.0.0.1:28333 | |
-backup | Path to copy the database to periodically(empty disables backups) | |
-backupInterval | 24h | How often to back up the database |
-backupScript | Command run after each backup,with the backup path as $1 and in $BACKUP_FILE | |
-verbose | 0 | Log verbosity: 0 = ERR/WARN/status, 1 = +INFO,2 = +NET/DB |
-dbuiListen | Ignored, and kept only so a config filethat sets it still starts —the database UI speaks bbolt and is nowbboltwui | |
-historyFile | Path to a JSON file containinghistorical BTC/USD rates | |
-config | Path to a properties file(name=value lines) with flag values;command-line flags take precedence |
Instead of passing all flags on the command line, you can use a properties file. Lines are name=value pairs (without the leading -). Comments start with #.
Example bitnsbot.conf:
# Telegram
botToken=123456:ABC-DEF1234ghijklmnop
webhookURL=http://127.0.0.1:8082/bot
listen=127.0.0.1:8082
apiBaseURL=http://localhost:8081
# Database
db=bitnsbot.db
# Bitcoin Core RPC (use either cookie or user/pass)
coreURL=http://127.0.0.1:8332
# coreUser=rpcuser
# corePass=rpcpassword
coreCookie=/path/to/.cookie
# Bitcoin Core ZMQ for real-time block/tx notifications
coreZMQ=tcp://127.0.0.1:28332,tcp://127.0.0.1:28333
# Backups
backup=/var/backups/bitnsbot.db
backupInterval=24h
# Logging
verbose=1
Build and run:
go test ./... && go build .
With a configuration file:
./bitnsbot -config=bitnsbot.conf
Any flags passed on the command line override values from the config file:
./bitnsbot -config=bitnsbot.conf -verbose=2
With command-line flags only:
./bitnsbot -botToken=... -webhookURL=http://127.0.0.1:8082/bot -listen=127.0.0.1:8082 -db=bitnsbot.db -coreURL=http://127.0.0.1:8332 -coreCookie=cookie -coreZMQ=tcp://127.0.0.1:28332 -verbose=1
Another option: there are scripts to deploy a bot as a systemd service.
advertise - simple command line tool which sends advertising packets with a specific IP to all nodes in Bitcoin network
bboltwui - simple web interface to manage a bbolt database, in a repository of its own
i18n-vet - check translation
addrindex - build transaction history index on addresses. Gather other statistics