import { Contract, Provider } from 'ethers'; import { TradeInput, LossProtectionInfo } from '../types'; import { PairsCache } from './pairs_cache'; /** * RPC module for trading-related parameters */ export declare class TradingParametersRPC { private provider; private pairInfosContract; private pairsCache; constructor(provider: Provider, pairInfosContract: Contract, pairsCache: PairsCache); /** * Get loss protection tier for a trade * @param tradeInput - Trade input parameters * @returns Loss protection tier */ getLossProtectionTier(tradeInput: TradeInput): Promise; /** * Get loss protection percentage for a tier * @param tier - Loss protection tier * @param pairIndex - Pair index * @returns Loss protection percentage */ getLossProtectionPercentage(tier: number, pairIndex: number): Promise; /** * Calculate loss protection amount * @param tier - Loss protection tier * @param pairIndex - Pair index * @param collateral - Collateral amount * @param openingFee - Opening fee amount * @returns Loss protection amount */ getLossProtectionAmount(tier: number, pairIndex: number, collateral: number, openingFee: number): Promise; /** * Get complete loss protection info for a trade * @param tradeInput - Trade input parameters * @param openingFee - Opening fee amount * @returns Loss protection info */ getLossProtectionInfo(tradeInput: TradeInput, openingFee: number): Promise; /** * Get referral rebate for a trader * @param trader - Trader address * @param referrer - Referrer address * @param openingFee - Opening fee amount * @returns Rebate amount */ getTradeReferralRebate(trader: string, referrer: string, openingFee: number): Promise; }