import type { Axios } from 'axios'; import type { BaseTxMetadata, Dex, StandardTx } from '../types.js'; type LiquidityType = 'Savers' | 'LP' | 'RUNEPool'; type SwapType = 'Standard' | 'Streaming'; interface Liquidity { type: LiquidityType; } export interface Swap { type: SwapType; } interface Coin { amount: string; asset: string; } interface InOut { txID: string; address: string; coins: Coin[]; height?: string; } interface StreamingSwapMeta { count: string; depositedCoin: Coin; inCoin: Coin; interval: string; lastHeight: string; outCoin: Coin; quantity: string; } interface Metadata { addLiquidity?: { liquidityUnits: string; }; refund?: { affiliateAddress: string; affiliateFee: string; memo: string; networkFees: Coin[]; reason: string; }; swap?: { affiliateAddress: string; affiliateFee: string; isStreamingSwap: boolean; liquidityFee: string; memo: string; networkFees: Coin[]; streamingSwapMeta?: StreamingSwapMeta; swapSlip: string; swapTarget: string; }; withdraw?: { asymmetry: string; basisPoints: string; impermanentLossProtection: string; liquidityUnits: string; memo: string; networkFees: Coin[]; }; } interface Actions { date: string; height: string; in: InOut[]; out: InOut[]; metadata?: Metadata; pools: string[]; status: 'success' | 'pending'; type: 'swap' | 'addLiquidity' | 'withdraw' | 'refund' | 'send'; } export interface ActionsResponse { actions: Actions[]; count: string; meta: { nextPageToken: string; prevPageToken: string; }; } type DexName = Dex.Thor | Dex.Maya; type ParserName = 'thorchain' | 'mayachain'; export interface TxMetadata extends BaseTxMetadata { parser: ParserName; memo: string; liquidity?: Liquidity; swap?: Swap; originMemo?: string; } interface ParsedTx extends StandardTx { data?: TxMetadata; } export type TxSpecific = Partial>; interface ParserArgs { dexName: DexName; parserName: ParserName; midgardUrl: string; } export declare const getAffiliateName: (memo: string) => string; export declare class Parser { protected readonly axiosMidgard: Axios; dexName: Dex; parserName: ParserName; constructor(args: ParserArgs); protected _parse(memo: string): Promise; private getExtraMetadata; } export {};