solana-presale-sdk
Version:
SDK for Solana Presale Program
46 lines (45 loc) • 1.14 kB
TypeScript
import { PublicKey } from "@solana/web3.js";
import * as anchor from "@coral-xyz/anchor";
export interface PresaleInfo {
tokenMintAddress: PublicKey;
softcapAmount: anchor.BN;
hardcapAmount: anchor.BN;
depositTokenAmount: anchor.BN;
soldTokenAmount: anchor.BN;
startTime: anchor.BN;
endTime: anchor.BN;
maxTokenAmountPerAddress: anchor.BN;
pricePerToken: anchor.BN;
isLive: boolean;
authority: PublicKey;
isSoftCapped: boolean;
isHardCapped: boolean;
}
export interface UserInfo {
buyQuoteAmount: anchor.BN;
buyTokenAmount: anchor.BN;
buyTime: anchor.BN;
claimTime: anchor.BN;
}
export interface PreSaleFormData {
tokenMintAddress: string;
softcapAmount: number;
hardcapAmount: number;
maxTokenAmountPerAddress: number;
pricePerToken: number;
startTime: Date;
endTime: Date;
}
export interface BuyTokenFormData {
amount: number;
}
export interface WithdrawTokenFormData {
amount: number;
}
export interface StartPresaleFormData {
startTime: Date;
endTime: Date;
}
export interface DepositTokenFormData {
amount: number;
}