UNPKG

@exodus/solana-web3.js

Version:
63 lines (62 loc) 3.07 kB
import { PublicKey } from '../../publickey.js'; import { TransactionInstruction } from '../../transaction/index.js'; export * from './state.js'; export declare type CreateLookupTableParams = { /** Account used to derive and control the new address lookup table. */ authority: PublicKey; /** Account that will fund the new address lookup table. */ payer: PublicKey; /** A recent slot must be used in the derivation path for each initialized table. */ recentSlot: bigint | number; }; export declare type FreezeLookupTableParams = { /** Address lookup table account to freeze. */ lookupTable: PublicKey; /** Account which is the current authority. */ authority: PublicKey; }; export declare type ExtendLookupTableParams = { /** Address lookup table account to extend. */ lookupTable: PublicKey; /** Account which is the current authority. */ authority: PublicKey; /** Account that will fund the table reallocation. * Not required if the reallocation has already been funded. */ payer?: PublicKey; /** List of Public Keys to be added to the lookup table. */ addresses: Array<PublicKey>; }; export declare type DeactivateLookupTableParams = { /** Address lookup table account to deactivate. */ lookupTable: PublicKey; /** Account which is the current authority. */ authority: PublicKey; }; export declare type CloseLookupTableParams = { /** Address lookup table account to close. */ lookupTable: PublicKey; /** Account which is the current authority. */ authority: PublicKey; /** Recipient of closed account lamports. */ recipient: PublicKey; }; /** * An enumeration of valid LookupTableInstructionType's */ export declare type LookupTableInstructionType = 'CreateLookupTable' | 'ExtendLookupTable' | 'CloseLookupTable' | 'FreezeLookupTable' | 'DeactivateLookupTable'; export declare class AddressLookupTableInstruction { static decodeInstructionType(instruction: TransactionInstruction): LookupTableInstructionType; static decodeCreateLookupTable(instruction: TransactionInstruction): CreateLookupTableParams; static decodeExtendLookupTable(instruction: TransactionInstruction): ExtendLookupTableParams; static decodeCloseLookupTable(instruction: TransactionInstruction): CloseLookupTableParams; static decodeFreezeLookupTable(instruction: TransactionInstruction): FreezeLookupTableParams; static decodeDeactivateLookupTable(instruction: TransactionInstruction): DeactivateLookupTableParams; } export declare class AddressLookupTableProgram { static programId: PublicKey; static createLookupTable(params: CreateLookupTableParams): [TransactionInstruction, PublicKey]; static freezeLookupTable(params: FreezeLookupTableParams): TransactionInstruction; static extendLookupTable(params: ExtendLookupTableParams): TransactionInstruction; static deactivateLookupTable(params: DeactivateLookupTableParams): TransactionInstruction; static closeLookupTable(params: CloseLookupTableParams): TransactionInstruction; }