# 📦 aiogram TON Connect UI

[![TON](https://img.shields.io/badge/TON-grey?logo=TON&logoColor=40AEF0)](https://ton.org)
[![PyPI](https://img.shields.io/pypi/v/aiogram-tonconnect.svg?color=FFE873&labelColor=3776AB)](https://pypi.python.org/pypi/aiogram-tonconnect)
![Python Versions](https://img.shields.io/badge/Python-3.8%20--%203.12-black?color=FFE873&labelColor=3776AB)
[![License](https://img.shields.io/github/license/nessshon/aiogram-tonconnect)](https://github.com/nessshon/aiogram-tonconnect/blob/main/LICENSE)


<img src="https://telegra.ph//file/9e28473c8da8989fdf027.jpg">

![Downloads](https://pepy.tech/badge/aiogram-tonconnect)
![Downloads](https://pepy.tech/badge/aiogram-tonconnect/month)
![Downloads](https://pepy.tech/badge/aiogram-tonconnect/week)

**Aiogram TON Connect UI** is a middleware library that streamlines the integration
of [TON Connect](https://github.com/ton-connect) technology into Telegram bots based
on [aiogram](https://github.com/aiogram/). It offers a pre-built user interface and orchestrates the interaction flow
for connecting wallets and initiating transactions. The library takes care of all user interactions with TON Connect
within the bot, encompassing the presentation of QR codes, texts, and keyboards, along with the handling of timeouts and
user cancellations.

Check out the [documentation](https://nessshon.github.io/aiogram-tonconnect/).\
Bot example [@aiogramTONConnectBot](https://t.me/aiogramTONConnectBot/).

## Installation

```bach
pip install aiogram-tonconnect
```

## Features

* Ready-to-Use User Interface
* Middleware Functionality
* Interface Customization
* Multilingual Support
* QR Code Generation

## Screenshots

|                                                                                                                      |                                                                                                                      |                                                                                                                      |
|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
| [![Image 1](https://telegra.ph//file/555175fd35c05370a64d4.jpg)](https://telegra.ph//file/555175fd35c05370a64d4.jpg) | [![Image 2](https://telegra.ph//file/ef770d825534cf049c1bb.jpg)](https://telegra.ph//file/ef770d825534cf049c1bb.jpg) | [![Image 3](https://telegra.ph//file/502a80771bc07acc6e93b.jpg)](https://telegra.ph//file/502a80771bc07acc6e93b.jpg) |
| [![Image 4](https://telegra.ph//file/99443226ba404a86586ad.jpg)](https://telegra.ph//file/99443226ba404a86586ad.jpg) | [![Image 5](https://telegra.ph//file/74fba6fca9c273d5f6f30.jpg)](https://telegra.ph//file/74fba6fca9c273d5f6f30.jpg) | [![Image 6](https://telegra.ph//file/656593c298123fea6be60.jpg)](https://telegra.ph//file/656593c298123fea6be60.jpg) |

## Acknowledgments

This project utilizes the following dependencies to enhance its functionality:

- [**aiogram:**](https://pypi.org/project/aiogram/) An asynchronous framework for building Telegram bots.
- [**pytonconnect:**](https://pypi.org/project/pytonconnect/) Python SDK for TON Connect 2.0.
- [**pytoniq-core:**](https://pypi.org/project/pytoniq-core/) TON Blockchain primitives.
- [**qrcode-fastapi:**](https://github.com/nessshon/qrcode-fastapi) Generate QR codes with optional image inclusion,
  supports base64-encoded.
- and more...

We extend our gratitude to the maintainers and contributors of these libraries for their valuable contributions to the
open-source community.

## Contribution

We welcome your contributions! If you have ideas for improvement or have identified a bug, please create an issue or
submit a pull request.

## Donations

**TON** - `EQC-3ilVr-W0Uc3pLrGJElwSaFxvhXXfkiQA3EwdVBHNNess`

**USDT** (TRC-20) - `TJjADKFT2i7jqNJAxkgeRm5o9uarcoLUeR`

## License

This repository is distributed under
the [MIT License](https://github.com/nessshon/aiogram-tonconnect/blob/main/LICENSE). Feel free to use, modify, and
distribute the code in accordance with the terms of the license.