From 670ba08cf31b0c4dbcf8860863f9653d4435beb4 Mon Sep 17 00:00:00 2001 From: adpthegreat Date: Fri, 20 Dec 2024 20:22:34 +0100 Subject: [PATCH] feat : added domain methods to solana agent kit --- src/agent/index.ts | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/agent/index.ts b/src/agent/index.ts index 721e464..13260b2 100644 --- a/src/agent/index.ts +++ b/src/agent/index.ts @@ -29,6 +29,12 @@ import { } from "../tools"; import { CollectionOptions, PumpFunTokenOptions } from "../types"; import { BN } from "@coral-xyz/anchor"; +import { getAllDomainsTLDs } from "../tools/get_all_active_tlds"; +import { getAllRegisteredAllDomains } from "../tools/get_all_registered_all_domains"; +import { getOwnedDomainsForTLD } from "../tools/get_domains_on_tld"; +import { getMainAllDomainsDomain } from "../tools/get_main_domain"; +import { getOwnedAllDomains } from "../tools/lookup_owner"; +import { resolveAllDomains } from "../tools/resolve_domain"; /** * Main class for interacting with Solana blockchain @@ -174,7 +180,7 @@ export class SolanaAgentKit { otherTokenMint: PublicKey, initialPrice: Decimal, maxPrice: Decimal, - feeTier: keyof typeof FEE_TIERS, + feeTier: keyof typeof FEE_TIERS ) { return createOrcaSingleSidedWhirlpool( this, @@ -184,7 +190,35 @@ export class SolanaAgentKit { initialPrice, maxPrice, feeTier - ) + ); + } + + // New domain-related methods + async resolveAllDomains(domain: string): Promise { + return resolveAllDomains(this, domain); + } + + async getOwnedAllDomains(owner: PublicKey): Promise { + return getOwnedAllDomains(this, owner); + } + + async getOwnedDomainsForTLD( + owner: PublicKey, + tld: string + ): Promise { + return getOwnedDomainsForTLD(this, owner, tld); + } + + async getAllDomainsTLDs(): Promise { + return getAllDomainsTLDs(this); + } + + async getAllRegisteredAllDomains(): Promise { + return getAllRegisteredAllDomains(this); + } + + async getMainAllDomainsDomain(owner: PublicKey): Promise { + return getMainAllDomainsDomain(this, owner); } async raydiumCreateAmmV4(