import { AddressLookupTableAccount, Connection, PublicKey, TransactionInstruction } from "@solana/web3.js"; export type LookupTableInput = string | PublicKey | AddressLookupTableAccount; /** * Returns the public key for an address lookup table input. * * @param lookupTable Lookup table account, public key, or base58 address * @returns Lookup table public key */ export declare function getLookupTableKey(lookupTable: LookupTableInput): PublicKey; /** * Merges lookup table inputs while preserving the first occurrence of each key. * * Accepts one or more lookup table arrays as separate arguments. Passing a * single array merges and deduplicates that one group. * * @param lookupTableGroups Lookup table arrays to merge, in priority order * @returns Deduplicated lookup table inputs */ export declare function mergeLookupTables(...lookupTableGroups: LookupTableInput[][]): LookupTableInput[]; /** * Fetches multiple address lookup table accounts * * @param connection Solana connection * @param pubkeys Array of lookup table public keys * @returns Array of address lookup table accounts */ export declare function fetchAddressLookupTableAccounts(connection: Connection, pubkeys: string[] | PublicKey[]): Promise; /** * Resolves lookup table inputs to address lookup table accounts. * * Already-resolved accounts are preserved, while public keys and base58 * addresses are fetched from the provided connection. Missing accounts are * omitted from the result. * * @param connection Solana connection * @param lookupTables Lookup table accounts, public keys, or base58 addresses * @returns Resolved address lookup table accounts */ export declare function resolveAddressLookupTableAccounts(connection: Connection, lookupTables: LookupTableInput[]): Promise; export interface VaultAccountsInfo { statePda: PublicKey; vaultPda: PublicKey; mintPda: PublicKey; escrowPda: PublicKey; requestQueuePda: PublicKey; extraMetasPda: PublicKey; protocolProgramId: PublicKey; mintProgramId: PublicKey; connection: Connection; stateAccount: { mint: PublicKey; baseAssetMint: PublicKey; assets: PublicKey[]; externalPositions: PublicKey[]; integrationAcls: { integrationProgram: PublicKey; }[]; }; borrowable?: PublicKey[]; } /** * Collects all pubkeys that should be included in a vault's Address Lookup Table. * * The first 3 entries are fixed (statePda, vaultPda, GLAM_CONFIG_PROGRAM) to * match the ALT discovery filter offsets used by findGlamLookupTables(). */ export declare function collectVaultLookupTableAddresses(info: VaultAccountsInfo): Promise; export interface CreateAltResult { createIx: TransactionInstruction; lookupTableAddress: PublicKey; extendIxBatches: TransactionInstruction[]; } /** * Builds instructions to create an ALT and extend it with the given addresses. * Returns the create instruction, the derived lookup table address, and batched * extend instructions (each batch fits within a single transaction). */ export declare function buildCreateAltInstructions(addresses: PublicKey[], authority: PublicKey, payer: PublicKey, recentSlot: number): CreateAltResult; /** * Builds batched extend instructions for an existing ALT. * Each instruction extends the table with up to 20 addresses. */ export declare function buildExtendAltInstructions(lookupTableAddress: PublicKey, newAddresses: PublicKey[], authority: PublicKey, payer: PublicKey): TransactionInstruction[];