feat: Create tasks on Gibwork

This commit is contained in:
thatsmeadarsh
2024-12-25 09:16:44 +05:30
parent 2753794342
commit bb629f287f
5 changed files with 158 additions and 2 deletions

View File

@@ -34,10 +34,12 @@ import {
getMainAllDomainsDomain,
getOwnedAllDomains,
resolveAllDomains,
create_gibwork_task,
} from "../tools";
import {
CollectionDeployment,
CollectionOptions,
GibworkCreateTaskReponse,
JupiterTokenData,
MintCollectionNFTResponse,
PumpfunLaunchResponse,
@@ -229,7 +231,7 @@ export class SolanaAgentKit {
async getOwnedDomainsForTLD(
tld: string
):Promise<string[]> {
): Promise<string[]> {
return getOwnedDomainsForTLD(this, tld);
}
@@ -318,4 +320,25 @@ export class SolanaAgentKit {
async pythFetchPrice(priceFeedID: string): Promise<string> {
return pythFetchPrice(priceFeedID);
}
async createGibworkTask(
title: string,
content: string,
requirements: string,
tags: string[],
tokenMintAddress: string,
tokenAmount: number,
payer?: string
): Promise<GibworkCreateTaskReponse> {
return create_gibwork_task(
this,
title,
content,
requirements,
tags,
new PublicKey(tokenMintAddress),
tokenAmount,
payer ? new PublicKey(payer) : undefined
);
}
}