Getting started
Setting-up your account.
To launch coins with Telau, you need to create an account in the bot conversation.
As a true web3 project, Telau doesn't requires any mail or phone number.
You just need to start the bot and generate a wallet, you can also enter your own private key.
Code Blocks (Some)
pub async fn export_wallet_key(
bot: &Bot,
chat_id: ChatId,
user_id: i64,
db_pool: &PgPool,
encryption_key: &EncryptionKey,
which: KeyType,
) -> Result<(), teloxide::RequestError> {
let label = match which {
KeyType::Creator => "Creator"
};
match get_user_privkey(db_pool, user_id, &*encryption_key, which).await {
Ok(pk) => {
match decrypt(&pk, &encryption_key) {
Ok(plain) => {
let bytes: Vec<u8> = serde_json::from_str(&plain).unwrap_or_default();
let base58_str = bs58::encode(&bytes).into_string();
let text = format!("🔑 {} private key:\n||{}||", label, base58_str);
let keyboard = InlineKeyboardMarkup::new(vec![
vec![InlineKeyboardButton::callback("🫧 Delete export message", "wallet_delete_export")],
]);
bot.send_message(chat_id, text)
.parse_mode(ParseMode::MarkdownV2)
.reply_markup(keyboard)
.await?;
}
Err(e) => {
eprintln!("Decrypt error: {}", e);
bot.send_message(chat_id, error_msg())
.parse_mode(ParseMode::MarkdownV2)
.disable_link_preview(true)
.await?;
}
}
}
Err(e) => {
eprintln!("DB error exporting key: {}", e);
bot.send_message(chat_id, error_msg())
.parse_mode(ParseMode::MarkdownV2)
.disable_link_preview(true)
.await?;
}
}
Ok(())
}
pub enum WalletMenuMode {
Main,
Creator
}Last updated
