Onboarding with Telegram

Currently many refugees from Ukraine are without financial support and even if they have money, they want to save it for most urgent matters. With Circles they could easily use a mechanism for “bookkeeping” if they trade with others or use Circles in bigger cities with Circles communities.

Almost all of these people use Telegram or know someone who does, probably even more than Whatsapp or other messengers.

So I was playing around with Telegram bots and thought about this: a bot that you can invite to a group, which displays the Circles usernames of the group participants if they either set it manually or used a derived username (telegramFirstname + "_" + hash(telegramId)[0..8])

Bot API

  • /info - prints the either manually set or derived Circles username
  • /set CIRCLES_NAME - sets the Circles username for this Telegram user (not verified!)
  • /query CIRCLES_NAME - queries api.circles.garden for the username and displays avatar + safe address
  • /transfer CIRCLES_NAME AMOUNT - watches User (Safe) address for transfer transactions to CIRCLES_NAME for 10 blocks and notifies for successful transaction or timeout (10 blocks)

Command Flow

1. Add Bot to Group

image

2. Call /info to let Group users know the Circles identity

3. Call /query to check name and safe address

4. Call /set if you have a Circles address already

same output as with /info

5. Suggested derived Circles Username if no Circles identity available

6. Watch User (Safe) Address for transfer to other Circles User

2 Likes

Extended Bot API

  • /transfer CIRCLES_NAME AMOUNT - Watches User (Safe) address for transfer transactions to CIRCLES_NAME for 10 blocks and notifies for successful transaction or timeout (10 blocks)

  • /verify SIGNATURE - Validates the Circles User (against the Telegram User) by verifying an Ethereum Signature

  • Call /verify first, sign the message and finally /verify SIGNATURE

You have to import the private key into some wallet like MetaMask first to be able to sign.