Add: tensor trade support

This commit is contained in:
Lautaro
2024-12-29 03:26:09 -03:00
parent 4f0eaffa55
commit 67dc873a04
6 changed files with 7853 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ import {
create_gibwork_task,
rock_paper_scissor,
create_TipLink,
listNFTForSale,
buyNFT,
cancelListing,
} from "../tools";
import {
CollectionDeployment,
@@ -349,4 +352,25 @@ export class SolanaAgentKit {
async createTiplink(amount: number, splmintAddress?: PublicKey) {
return create_TipLink(this, amount, splmintAddress);
}
async tensorListNFT(
nftMint: PublicKey,
price: number,
expirySeconds?: number
): Promise<string> {
return listNFTForSale(this, nftMint, price, expirySeconds);
}
async tensorBuyNFT(
nftMint: PublicKey,
maxPrice: number
): Promise<string> {
return buyNFT(this, nftMint, maxPrice);
}
async tensorCancelListing(
nftMint: PublicKey
): Promise<string> {
return cancelListing(this, nftMint);
}
}