solmash-whitelist-sdk
Version:
A sdk for interacting Solmash Whitelist program
89 lines (78 loc) • 2.24 kB
text/typescript
import { BN, Program } from "@project-serum/anchor";
import { PublicKey, TransactionInstruction } from "@solana/web3.js";
import { SolmashWhitelist } from "../idl";
export interface ISolmashWhitelistInstructions {
readonly program: Program<SolmashWhitelist>;
getInitAuctionInstruction(
auction: PublicKey,
auctionVault: PublicKey,
owner: PublicKey,
initParams: {
name: string;
enabled: boolean;
preSaleStartTime: BN;
preSaleEndTime: BN;
ticketsInPool: BN;
tokenQuantityPerTicket: BN;
ticketPriceInSol: BN;
ticketPriceInSobb: BN;
auctionToken: PublicKey;
bidToken: PublicKey;
},
): Promise<TransactionInstruction>;
getAddTokenInstruction(
auction: PublicKey,
auctionToken: PublicKey,
auctionVault: PublicKey,
auctionVaultTokenAccount: PublicKey,
owner: PublicKey,
ownerAuctionTokenAccount: PublicKey,
): Promise<TransactionInstruction>;
getWithdrawFundsInstruction(
auction: PublicKey,
auctionBidTokenAccount: PublicKey,
auctionToken: PublicKey,
auctionVault: PublicKey,
auctionVaultTokenAccount: PublicKey,
bidToken: PublicKey,
creator: PublicKey,
creatorAuctionTokenAccount: PublicKey,
creatorBidTokenAccount: PublicKey,
): Promise<TransactionInstruction>;
getWhitelistInstruction(
auction: PublicKey,
buyerPda: PublicKey,
creator: PublicKey,
whitelistUser: PublicKey,
): Promise<TransactionInstruction>;
getPreSaleBuyUsingSplInstruction(
auction: PublicKey,
auctionVault: PublicKey,
auctionVaultBidTokenAccount: PublicKey,
bidToken: PublicKey,
buyer: PublicKey,
buyerBidTokenAccount: PublicKey,
buyerPda: PublicKey,
): Promise<TransactionInstruction>;
getPreSaleBuyUsingSolInstruction(
auction: PublicKey,
auctionVault: PublicKey,
buyer: PublicKey,
buyerPda: PublicKey,
): Promise<TransactionInstruction>;
getClaimTokensInstruction(
auction: PublicKey,
auctionToken: PublicKey,
auctionVault: PublicKey,
auctionVaultTokenAccount: PublicKey,
buyer: PublicKey,
buyerAuctionTokenAccount: PublicKey,
buyerPda: PublicKey,
): Promise<TransactionInstruction>;
getChangeTimeInstruction(
auction: PublicKey,
creator: PublicKey,
newStartTime: BN,
newEndTime: BN,
): Promise<TransactionInstruction>;
}