UNPKG

solana-dex-parser

Version:

Solana Dex Transaction Parser

24 lines (23 loc) 1.07 kB
import { DexInfo, TradeInfo, TradeType } from './types'; /** * Get instruction data */ export declare const getInstructionData: (instruction: any) => Buffer; /** * Get the name of a program by its ID * @param programId - The program ID to look up * @returns The name of the program or 'Unknown' if not found */ export declare const getProgramName: (programId: string) => string; /** * Convert a hex string to Uint8Array * @param hex - Hex string to convert * @returns Uint8Array representation of the hex string */ export declare const hexToUint8Array: (hex: string) => Uint8Array; export declare const absBigInt: (value: bigint) => bigint; export declare const getTradeType: (inMint: string, outMint: string) => TradeType; export declare const getAMMs: (transferActionKeys: string[]) => string[]; export declare const getTranferTokenMint: (token1?: string, token2?: string) => string | undefined; export declare const getPubkeyString: (value: any) => string; export declare const getFinalSwap: (trades: TradeInfo[], dexInfo?: DexInfo) => TradeInfo | null;