e-mk / solagram

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solagram

Solagram is a telegram bot that enables you to stay up-to-date with the activities happening on the Solana network and manages your assets on the connected wallet. By leveraging the capabilities of this bot, you can receive real-time updates and notifications on registered Solana accounts as well as list and send your NFTs directly in your Telegram chat. Helius webhooks are used for monitoring Solana network. Helius DAS API is used to list and manage your assets.

You can launch your own bot or use an existing one by adding SolagramBot to your telegram. Please, note that the default Bot is running on the Solana Devnet. (No need for any additional software to monitor accounts, although You will need to have Phantom wallet application on your phone to manage your assets.

Solagram STNS

Using solagram-stns as DB and name service resolver for Solana address to telegram id mapping will allow Telegram IDs inside Solagram Bot to identify connected wallets and do transactions between them.

Getting Started

  1. Install the dependencies:

    npm install
  2. Set up the configuration file:

    Create .env file with the following variables:

    SOLAGRAM_TG_BOT_TOKEN=<Your Telegram bot token>
    SOLAGRAM_HELIUS_API_KEY=<Helius API key>
    SOLAGRAM_WEBHOOK_URL=<Your application API URL to send webhooks>
    SOLAGRAM_HELIUS_RPC_URL=<Helius RPC to connect>
    SOLAGRAM_SOLANA_NETWORK=<Solana network to operate in (dev | test | main)>
    SOLAGRAM_LOG_LEVEL=<Log level>
    SOLAGRAM_DB_PATH=<The path to the db>
    SOLAGRAM_STNS_PROGRAM_ADDRESS=<The address of Solana to TelegramId name service>
  3. Build

    npm run build
  4. Run

  • in Development environment
    npm run dev
  • in Development environment
    npm run start

Usage

To use the Telegram bot, follow these steps:

  1. Start a chat with your bot on Telegram SolagramBot.
  2. Register a Solana account by sending the /addaccount command.
  3. Receive updates on registered accounts whenever an event occurs on the Solana network.
  4. Connect Solagram to your phantom wallet on your mobile device using /connectwallet command.
  5. Use /myassets command to list assets on your wallet and send them.
  6. Use /sendsol to send SOL.

Certificate of NAS academy course completion

Screenshot 2023-09-24 at 12 50 48

Solana Cohort 6 (dragged).pdf

About


Languages

Language:TypeScript 100.0%