TelegramHub

Securely store and retrieve encrypted data on the Avail blockchain using a Telegram bot. Built with NestJS, Lit Protocol for encryption, and Polkadot.js for blockchain interactions. Simple, decentralized, and user-friendly! 🚀🔒📱 #Blockchain #TelegramBot

ETHOnline 2024Shipped August 23, 2024Prize winner#privacy
Visit Repo
TelegramHub banner

About

This project is a backend service that facilitates interaction between users and the Avail blockchain via a Telegram bot. The main functionality of the service allows users to securely submit and retrieve encrypted data on the blockchain. Using Lit Protocol for encryption and decryption, the project ensures that data remains private and secure throughout the process.

Users interact with the system through a Telegram bot, where they can submit data, encrypted with a public key, which is then stored on the Avail blockchain. Additionally, users can retrieve stored data by providing a transaction hash and decrypt it using their private key. The project integrates Polkadot.js API for communicating with the Avail network and leverages NestJS for the backend structure.

Key features include secure data handling, blockchain-based storage, and retrieval, making this project a powerful tool for decentralized applications that require secure and reliable data management.

How it's made

This project was built using a combination of cutting-edge technologies to securely handle data submission and retrieval on the Avail blockchain, all orchestrated through a Telegram bot interface. Here's a breakdown of the key components and how they work together: 1. Backend Framework: NestJS

The core of the project is powered by NestJS, a progressive Node.js framework. NestJS was chosen for its modularity, scalability, and support for TypeScript. It helped structure the backend service efficiently, allowing for easy integration with external APIs and services.

  • Blockchain Integration: Avail Blockchain & Polkadot.js API

To interact with the Avail blockchain, we utilized the Polkadot.js API. This library enabled us to easily connect to Avail’s decentralized network, submit transactions, and query data from the chain. Specifically, we implemented functionality to: Submit data using Avail's dataAvailability.submitData function. Retrieve stored data from the blockchain using transaction hashes.

  • Data Encryption & Decryption: Lit Protocol

Lit Protocol was integrated to handle encryption and decryption of the user-submitted data. This ensures that any data stored on the blockchain is encrypted using public keys, and only authorized users with the corresponding private key can decrypt it. Key encryption flow: Users provide a public key to encrypt their data before submitting it. Data is encrypted on the client side using Lit Protocol. When retrieving data, users provide their private key to decrypt the data after pulling it from the Avail blockchain.

  • Telegram Bot: node-telegram-bot-api

We used the node-telegram-bot-api library to create an interface where users can easily interact with the system through Telegram. The bot allows users to: Submit data by providing their public key. Retrieve stored data by providing the transaction hash and decrypt it using their private key. This Telegram-based interaction provides a simple and familiar interface for users to interact with the blockchain without needing technical expertise.

  • Hacky Workarounds & Challenges

One of the hacky parts of the project was managing asynchronous transaction submissions on the blockchain while maintaining real-time interaction via the Telegram bot. Handling transaction states, including errors or blockchain rejections, and relaying that information back to the user in real-time through the bot required careful handling of async operations and error management. We also had to implement a secure key management system for users to submit their public and private keys in a way that ensured the integrity of the encryption process and prevented any leaks or mishandling of sensitive information.

  • Partner Technologies

Lit Protocol was a key partner technology, enabling secure encryption and decryption of data without needing to expose private keys or secrets during the submission or retrieval process. Avail blockchain allowed for the decentralized, tamper-proof storage of data, ensuring the integrity and availability of information.

By combining these technologies, the project provides a secure and decentralized way to store and retrieve data on the blockchain, all through an easy-to-use Telegram interface.

Prizes

  • Sign Protocol · Sign Everything Pool Prize · Sign Everything Pool Prize
  • Avail · Build with Avail · Build with Avail
  • Avail · Best Core Tooling project · Best Core Tooling project

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

AI Web3 Assistant

Meet TxGPT, your AI chatbot for effortless blockchain interaction! Manage transactions, check balances, and explore data with natural language. Powered by Circle's wallets and ENS mapping Telegram IDs to addresses. Say hello to seamless blockchain use! 🚀

TeleSplit

Tele-Split is a Telegram bot that allows you to split bills with your friends. It is built with the Telegram Web App and uses the blockchain to enable transactions.

Duckbot

Building a prediction market Telegram bot that lets users bet on real-world events directly within the app. Utilizing blockchain for transparent and verifiable outcomes, ensuring fairness and security. Bet, track, and win – on-chain!