Crates.io | grinbot |
lib.rs | grinbot |
version | 0.1.0-alpha.1 |
source | src |
created_at | 2020-01-11 22:13:42.9892 |
updated_at | 2020-01-11 22:13:42.9892 |
description | Keybase and Telegram bot for Grin |
homepage | https://github.com/alexbyrnes/grinbot |
repository | https://github.com/alexbyrnes/grinbot |
max_upload_size | |
id | 197604 |
size | 108,037 |
Grin Bot is a self-hosted Keybase or Telegram bot wallet for the Grin cryptocurrency. You can run Grin Bot on your own desktop hardware, and control it from a smartphone.
git clone --branch v0.0.1 https://github.com/alexbyrnes/grinbot.git
cd grinbot
docker build -t grinbot .
docker run -it grinbot
git clone --branch v0.0.1 https://github.com/alexbyrnes/grinbot.git
cargo install --path grinbot --locked
git clone --branch v0.0.1 https://github.com/alexbyrnes/grinbot.git
cd grinbot
cargo run
cargo test --all
cargo doc --no-deps --document-private-items --open --all
All commands can be executed locally without a Keybase or Telegram account.
grinbot -c "/help"
In a grin-wallet directory:
grin-wallet owner_api
Keybase
Telegram
Start the bot by running grinbot
in a directory with config.yml and logging.yml, or cargo run
in the root of the repository.
Keybase Open a Keybase client and start a chat with yourself, or the username associated with your paper key. (The key and user name(s) go in config.yml.)
Telegram
Go to the link provided by Telegram on the device or desktop where Telegram is installed. (The link starts with https://t.me/
.) You should get a prompt to open a chat with your bot.
Type and send /help
for a list of commands.
Note: The best source of troubleshooting information is the dockerfile where a complete bot with Grin node and wallet is set up from scratch.
docker build -t grinbot .
docker run -it grinbot
/create
Create a Grin wallet in the directory specified in your config.yml. /send 0.001 http://some-recipient123.org Send Grin to the specified address. /balance _Get the current balance for your wallet. /help Show this help text.
Keybase Keybase chats are end-to-end encrypted and the bot acts as a regular user. The privacy guarantees provided by Keybase are the same as those for chats with any other user. These guarantees don't include protection from loss of your paper key, or issues with Grin Bot itself, or external libraries. Paper keys can be revoked through the Keybase clients.
Telegram
Grin Bot uses the Telegram bot long polling interface. This means there's no need for an externally-accessible IP or port. Grin Bot will connect to Telegram and pull new messages (called Updates) from an endpoint specifically for your bot instance using your token. To get an idea of how this works, you can visit https://api.telegram.org/bot<your api token>/getUpdates
to manually consume messages you have sent your bot. This is the address Grin Bot polls.
The only information that is sent to Telegram is the contents of the chat itself — the commands you send to your bot and the messages it sends back. The commands and replies do not include passwords or tokens.
Note: Telegram bot traffic is not end-to-end encrypted, however Telegram claims GDPR compliance and the ability to delete messages. If you are using Grin Bot for purposes that require stronger security guarantees than these, you should not use this version of Grin Bot.
grinbot init
for default config filesContributions are welcome. Please submit an issue, or claim an existing one for visibility, and PR against the develop branch.