import { Connection, PublicKey, Signer, Transaction, TransactionInstruction } from "@solana/web3.js"; import { BigNumberish } from "../entity"; import { SplAccount } from "../spl"; import { InstructionType } from "./type"; export interface TokenAccount { pubkey: PublicKey; accountInfo: SplAccount; } export interface SelectTokenAccountParams { tokenAccounts: TokenAccount[]; mint: PublicKey; owner: PublicKey; config?: { associatedOnly?: boolean; }; } export interface HandleTokenAccountParams { connection: Connection; side: "in" | "out"; amount: BigNumberish; mint: PublicKey; tokenAccount: PublicKey | null; owner: PublicKey; payer?: PublicKey; frontInstructions: TransactionInstruction[]; endInstructions?: TransactionInstruction[]; frontInstructionsType: InstructionType[]; endInstructionsType?: InstructionType[]; signers: Signer[]; bypassAssociatedCheck: boolean; } export interface SelectOrCreateTokenAccountParams { mint: PublicKey; tokenAccounts: TokenAccount[]; owner: PublicKey; createInfo?: { connection: Connection; payer: PublicKey; amount?: BigNumberish; frontInstructions: TransactionInstruction[]; endInstructions?: TransactionInstruction[]; signers: Signer[]; frontInstructionsType: InstructionType[]; endInstructionsType?: InstructionType[]; }; associatedOnly: boolean; } export interface UnsignedTransactionAndSigners { transaction: Transaction; signers: Signer[]; } export declare class Base { static _selectTokenAccount(params: SelectTokenAccountParams): PublicKey; static _handleTokenAccount(params: HandleTokenAccountParams): Promise; static _selectOrCreateTokenAccount(params: T): Promise; }