UNPKG

@wuwei-labs/srsly

Version:
30 lines 1.12 kB
/** * Address Lookup Table (ALT) derivation utilities * @module pda/lookupTable */ import { Address } from '@solana/kit'; import { type UniversalSigner } from '../utils/signer'; /** * Derive an Address Lookup Table (ALT) address * * ALT addresses are deterministically derived from an authority and a recent slot. * The slot is typically obtained from getSlot() RPC call. * * @param authority - The authority that will own the lookup table * @param recentSlot - A recent slot number (from getSlot RPC) * @param altProgramAddress - Optional ALT program address (defaults to mainnet) * @returns The derived lookup table address * * @example * ```typescript * import { deriveLookupTable } from './lookupTable'; * * // Get recent slot from RPC * const slot = await rpc.getSlot().send(); * * // Derive the lookup table address * const lookupTable = await deriveLookupTable(authorityAddress, slot); * ``` */ export declare function deriveLookupTable(authority: UniversalSigner, recentSlot: bigint | number, altProgramAddress?: UniversalSigner): Promise<Address>; //# sourceMappingURL=lookupTable.d.ts.map