diff --git a/examples/tg-bot-starter/README.md b/examples/tg-bot-starter/README.md index 67b4670..3d54e91 100644 --- a/examples/tg-bot-starter/README.md +++ b/examples/tg-bot-starter/README.md @@ -1,8 +1,10 @@ - # Telegram Bot Starter with Solana Agent Kit This example showcases how we can make a telegram bot with the Solana Agent Kit by Send AI. +## Quick Deploy +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsendaifun%2Fsolana-agent-kit%2Ftree%2Fmain%2Fexamples%2Ftg-bot-starter&env=OPENAI_API_KEY,RPC_URL,SOLANA_PRIVATE_KEY,TELEGRAM_BOT_TOKEN&project-name=solana-agent-kit&repository-name=sak-yourprojectname) + ## How to get the telegram bot token You can check [here](https://help.zoho.com/portal/en/kb/desk/support-channels/instant-messaging/telegram/articles/telegram-integration-with-zoho-desk#How_to_find_a_token_for_an_existing_Telegram_Bot) how you can obtain a bot token for your telegram bot. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7202c0f..e7e4508 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -442,6 +442,9 @@ packages: '@shikijs/engine-oniguruma@1.24.3': resolution: {integrity: sha512-iNnx950gs/5Nk+zrp1LuF+S+L7SKEhn8k9eXgFYPGhVshKppsYwRmW8tpmAMvILIMSDfrgqZ0w+3xWVQB//1Xw==} + '@shikijs/types@1.24.3': + resolution: {integrity: sha512-FPMrJ69MNxhRtldRk69CghvaGlbbN3pKRuvko0zvbfa2dXp4pAngByToqS5OY5jvN8D7LKR4RJE8UvzlCOuViw==} + '@shikijs/types@1.24.4': resolution: {integrity: sha512-0r0XU7Eaow0PuDxuWC1bVqmWCgm3XqizIaT7SM42K03vc69LGooT0U8ccSR44xP/hGlNx4FKhtYpV+BU6aaKAA==} @@ -2059,7 +2062,7 @@ snapshots: '@gerrit0/mini-shiki@1.24.4': dependencies: '@shikijs/engine-oniguruma': 1.24.3 - '@shikijs/types': 1.24.3 + '@shikijs/types': 1.24.4 '@shikijs/vscode-textmate': 9.3.1 '@humanwhocodes/config-array@0.13.0': @@ -2399,12 +2402,17 @@ snapshots: - utf-8-validate '@scure/base@1.2.1': {} - + '@shikijs/engine-oniguruma@1.24.3': dependencies: - '@shikijs/types': 1.24.4 + '@shikijs/types': 1.24.3 '@shikijs/vscode-textmate': 9.3.1 + '@shikijs/types@1.24.3': + dependencies: + '@shikijs/vscode-textmate': 9.3.1 + '@types/hast': 3.0.4 + '@shikijs/types@1.24.4': dependencies: '@shikijs/vscode-textmate': 9.3.1 @@ -3755,7 +3763,6 @@ snapshots: dependencies: wrappy: 1.0.2 - openai@4.77.0(zod@3.24.1): dependencies: '@types/node': 18.19.68 diff --git a/src/agent/index.ts b/src/agent/index.ts index 461baf5..d2e10c0 100644 --- a/src/agent/index.ts +++ b/src/agent/index.ts @@ -295,8 +295,7 @@ export class SolanaAgentKit { return getOwnedDomainsForTLD(this, tld); } - // eslint-disable-next-line @typescript-eslint/ban-types - async getAllDomainsTLDs(): Promise { + async getAllDomainsTLDs(): Promise { return getAllDomainsTLDs(this); } diff --git a/src/tools/get_all_domains_tlds.ts b/src/tools/get_all_domains_tlds.ts index 12bd9f0..4d2fcbd 100644 --- a/src/tools/get_all_domains_tlds.ts +++ b/src/tools/get_all_domains_tlds.ts @@ -8,11 +8,10 @@ import { getAllTld } from "@onsol/tldparser"; */ export async function getAllDomainsTLDs( agent: SolanaAgentKit, - // eslint-disable-next-line @typescript-eslint/ban-types -): Promise { +): Promise { try { const tlds = await getAllTld(agent.connection); - return tlds.map((tld) => tld.tld); + return tlds.map((tld) => String(tld.tld)); } catch (error: any) { throw new Error(`Failed to fetch TLDs: ${error.message}`); }