import { Decimal } from 'decimal.js'; import { Account, Address, Instruction, KeyPairSigner, Rpc, RpcSubscriptions, SolanaRpcApi, SolanaRpcSubscriptionsApi, Transaction, TransactionSigner, TransactionWithLifetime } from '@solana/kit'; import BN from 'bn.js'; import { AddressLookupTable } from '@solana-program/address-lookup-table'; import { Logger } from './Logger'; import { BlockhashWithExpiry } from '../swap_api_utils'; import { CompilableTransactionMessage } from '@solana/transaction-messages'; export declare function removeComputeBudgetProgram(ixs: Instruction[]): Instruction[]; export declare function removeSetupIxs(ixs: Instruction[]): Instruction[]; export declare function parseKeypairFile(file: string): Promise; export declare function amountToLamportsBN(amount: Decimal, decimals: number): BN; export declare function amountToLamportsDecimal(amount: Decimal, decimals: number): Decimal; export declare function lamportsToAmountDecimal(amount: Decimal, decimals: number): Decimal; export declare function getMintDecimals(connection: Rpc, mint: Address): Promise; export declare function getAssociatedTokenAddress(ownerAddress: Address, tokenMintAddress: Address, tokenProgramAddress?: Address): Promise
; export declare function createAssociatedTokenAccountIdempotentInstruction(owner: Address, mint: Address, payer: TransactionSigner, tokenProgramAddress?: Address, ata?: Address): Promise<[Address, Instruction]>; export declare function createAtaIdempotent(user: Address, payer: TransactionSigner, mint: Address, mintTokenProgramAddress?: Address): Promise<{ ata: Address; createAtaIx: Instruction; }>; export declare function buildTransactionMessage(ixns: Instruction[], payer: Address, blockhash: BlockhashWithExpiry, addressLookupTables?: Account[]): CompilableTransactionMessage; export declare function buildCompiledTransaction(ixns: Instruction[], payer: Address, blockhash: BlockhashWithExpiry, addressLookupTables?: Account[]): Transaction & TransactionWithLifetime; export declare function executeTransaction(rpc: Rpc, rpcWs: RpcSubscriptions, ixns: Instruction[], signer: TransactionSigner, extraSigners?: TransactionSigner[]): Promise; export declare function sleep(ms: number): Promise; export declare const getEnvOrDefault: (envVarName: string, defaultValue: string) => string; export declare function getMintTokenProgram(connection: Rpc, mint: Address): Promise
; export declare function getAllMintTokenPrograms(connection: Rpc, mints: Address[]): Promise; export declare function withTimeout(promise: Promise, timeoutMs: number, loggerCallback: () => any): Promise; export declare function withAtLeastOneTimeout(promises: PromiseWithName[], atLeastOneNoMoreThanTimeoutMS: number, initialTimeoutMs: number, logger: Logger, timeoutCallback?: (name: string) => undefined): Promise<(T | null)[]>; export interface PromiseWithName { promise: Promise; name: string; } export declare function generateUniqueMockAddress(): Address; export declare function getLookupTablesFromLutApi(mintAddresses: Address[]): Promise; export declare function getAccountsNotInLookupTables(lookupTables: Account[], instructions: Instruction[]): Address[]; export declare function pick(obj: T, keys: K[]): Pick; //# sourceMappingURL=utils.d.ts.map