crea8r / communify

Decaying tokens.
0 stars 0 forks source link

Telegram bot support /register command for admin #19

Closed 0xk2 closed 2 weeks ago

0xk2 commented 1 month ago

This function make it easier for admin to register a chat channel. However, admin can do it through webapp so this is something for the future.

0xk2 commented 3 weeks ago

/register will create a community if it is not yet created: /register [POINT_NAME] [DAYS_TO_EXPIRE]

Note, use this for kp storage

const mnemonic = bip39.generateMnemonic(); // mnemonic is a `varchar`
const seed = bip39.mnemonicToSeedSync(mnemonic).slice(0, 32);
const keypair = Keypair.fromSeed(seed);