Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: LeoBot - Bot for minting LP token #6

Open
phamdat721101 opened this issue Dec 25, 2024 · 3 comments
Open

Proposal: LeoBot - Bot for minting LP token #6

phamdat721101 opened this issue Dec 25, 2024 · 3 comments
Assignees
Labels
approved approve proposal to proceed

Comments

@phamdat721101
Copy link

Description

Build: https://dorahacks.io/buidl/17930

@phamdat721101
Copy link
Author

@zxstim zxstim added the approved approve proposal to proceed label Jan 3, 2025
@zxstim
Copy link
Collaborator

zxstim commented Jan 3, 2025

Hmm... i think i will contribute a telegram mini app template with in-dapp-wallet to help you. But you can also just use walletconnect.

i think the wallet handling needs improvement tho. trusting the DB storage while you own the decryption key. yes, other telegram bots do the same too but it's not good to do that.

@phamdat721101
Copy link
Author

Update: Using google authenticate to generate wallet for bot (not mini app)
Description
1 How It Works
Generate Wallet:

  • User sends /start to the bot.
  • Bot generates a QR code for Google Authenticator setup.
  • User scans the QR code and inputs the 6-digit code.
  • Bot generates a wallet, encrypts the private key, and stores it locally.
  • Bot displays the wallet address.

Screenshot 2025-01-14 at 8 52 06 PM

Sign Transactions:

  • User sends /sign to the bot.
  • Bot prompts for the Google Authenticator code.
  • User inputs the code, and the bot decrypts the private key.
  • Bot signs and broadcasts the transaction, then displays the transaction hash.
  1. Tech Stack
  • Telegram Bot Framework: grammy (Node.js/TypeScript).
  • Blockchain Interaction: ethers.js for wallet generation and transaction signing.
  • Encryption: Node.js crypto module (AES-256-CBC).
  • Google Authenticator Integration: speakeasy for TOTP (Time-Based One-Time Password) generation and verification.
  • QR Code Generation: qrcode library.
  • Client-Side Storage: Session-based storage (e.g., ctx.session in grammy).

Bounty track

  • wallet

cc @zxstim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approve proposal to proceed
Projects
None yet
Development

No branches or pull requests

2 participants