import Decimal from 'decimal.js'; import { Address, Instruction, Rpc, GetMultipleAccountsApi, Account } from '@solana/kit'; import { AddressLookupTable } from '@solana-program/address-lookup-table'; import type { SwapIxsProvider, SwapQuoteProvider } from '../leverage/types'; export declare function buildComputeBudgetIx(units: number): Instruction; export declare function getLookupTableAccounts(rpc: Rpc, addresses: Address[]): Promise[]>; export declare const getComputeBudgetAndPriorityFeeIxs: (units: number, priorityFeeLamports?: Decimal) => Instruction[]; export declare function notEmpty(value: TValue | null | undefined): value is TValue; export declare function uniqueAccountsWithProgramIds(ixs: Instruction[], addressLookupTables?: Address[] | Account[]): Array
; /** * The set of unique accounts (including program ids) the klend instructions of a flash-loan + swap operation * consume, plus their count. This is the exact footprint the operation reserves for its klend side, so an * external swap provider knows how many accounts remain available within the transaction's account limit. * * Returned by the light `get*KlendAccounts` helpers (one per operation family) so the FE can size an operation's * klend footprint without running the quoter/swapper. The count is accurate and final: the operations compute * `klendAccounts` from their klend ixs *before* quoting and pass that same set to the quoter, and the set is * invariant to the (still-unknown) swap amounts — it depends only on the routing, reserves and obligation. * * Note: "routing" includes the flash-borrow side where that changes which reserve is flashed. For * repay-with-collateral the debt-flash and coll-flash routes flash different reserves (and so reference a * different fee vault), so its helper takes `flashBorrowType`; pass the same value the operation will use. */ export type KlendAccountsResult = { /** `klendAccounts.length`, surfaced explicitly for convenience. */ count: number; /** The unique klend accounts (and program ids) the operation uses. */ klendAccounts: Array
; }; /** Wraps a unique-accounts list into the {@link KlendAccountsResult} the light `get*KlendAccounts` helpers return. */ export declare function toKlendAccountsResult(klendAccounts: Array
): KlendAccountsResult; export declare const ACCOUNT_DISCOVERY_QUOTER: SwapQuoteProvider; export declare const ACCOUNT_DISCOVERY_SWAPPER: SwapIxsProvider; export declare function removeBudgetIxs(ixs: Instruction[]): Instruction[]; //# sourceMappingURL=instruction.d.ts.map