World Chat is a versatile Telegram bot that facilitates seamless messaging between users on XMTP and Push protocols. When users message the bot, they can specify either an Ethereum Name Service (ENS) or an address. The bot then creates and provisions a wallet for the user, allowing them to send and receive messages. The bot's intelligence enables it to handle various message formats and ensure smooth communication across platforms.
XMTPizza, the initial version of World Chat, is a Telegram bot designed to communicate with the XMTP team using the XMTP protocol. Users can interact with the bot, which facilitates sending and receiving messages on their behalf. During the hackathon, nearly 40 participants signed up and utilized the bot to contact the team, requesting snack deliveries like tic tacs. XMTPizza remains active and functional, providing ongoing communication capabilities for users.
The project is built using Node.js and utilizes several libraries and APIs. It integrates with Telegram through the node-telegram-bot-api library to enable messaging. For XMTP functionality, it employs the @xmtp/xmtp-js library, which allows users to send and receive messages using the XMTP protocol. Additionally, the @pushprotocol/restapi library facilitates interaction with the Push protocol.
The project relies on a PostgreSQL database to store user data, handled using the sequelize library. For encryption and decryption, it uses the ethers library, particularly for handling private keys. The bot also leverages axios for making HTTP requests to external APIs, such as the Airstack API for ENS resolution and the Push API for handling encrypted messages.
The core functionalities of the bot include creating and provisioning wallets for users, handling message parsing to extract ENS or address information, and sending messages via both XMTP and Push protocols. The bot also listens for incoming XMTP messages and relays them to the corresponding Telegram users.