@metamask-previews/perps-controller 3.0.0-preview-e61cfa5 → 3.1.0-preview-548bdd1d9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/dist/PerpsController-method-action-types.cjs.map +1 -1
- package/dist/PerpsController-method-action-types.d.cts +8 -0
- package/dist/PerpsController-method-action-types.d.cts.map +1 -1
- package/dist/PerpsController-method-action-types.d.mts +8 -0
- package/dist/PerpsController-method-action-types.d.mts.map +1 -1
- package/dist/PerpsController-method-action-types.mjs.map +1 -1
- package/dist/PerpsController.cjs +117 -29
- package/dist/PerpsController.cjs.map +1 -1
- package/dist/PerpsController.d.cts +14 -2
- package/dist/PerpsController.d.cts.map +1 -1
- package/dist/PerpsController.d.mts +14 -2
- package/dist/PerpsController.d.mts.map +1 -1
- package/dist/PerpsController.mjs +118 -30
- package/dist/PerpsController.mjs.map +1 -1
- package/dist/constants/eventNames.cjs +1 -0
- package/dist/constants/eventNames.cjs.map +1 -1
- package/dist/constants/eventNames.d.cts +1 -0
- package/dist/constants/eventNames.d.cts.map +1 -1
- package/dist/constants/eventNames.d.mts +1 -0
- package/dist/constants/eventNames.d.mts.map +1 -1
- package/dist/constants/eventNames.mjs +1 -0
- package/dist/constants/eventNames.mjs.map +1 -1
- package/dist/constants/perpsConfig.cjs +46 -1
- package/dist/constants/perpsConfig.cjs.map +1 -1
- package/dist/constants/perpsConfig.d.cts +35 -0
- package/dist/constants/perpsConfig.d.cts.map +1 -1
- package/dist/constants/perpsConfig.d.mts +35 -0
- package/dist/constants/perpsConfig.d.mts.map +1 -1
- package/dist/constants/perpsConfig.mjs +43 -0
- package/dist/constants/perpsConfig.mjs.map +1 -1
- package/dist/constants/transactionsHistoryConfig.cjs +23 -4
- package/dist/constants/transactionsHistoryConfig.cjs.map +1 -1
- package/dist/constants/transactionsHistoryConfig.d.cts +23 -4
- package/dist/constants/transactionsHistoryConfig.d.cts.map +1 -1
- package/dist/constants/transactionsHistoryConfig.d.mts +23 -4
- package/dist/constants/transactionsHistoryConfig.d.mts.map +1 -1
- package/dist/constants/transactionsHistoryConfig.mjs +23 -4
- package/dist/constants/transactionsHistoryConfig.mjs.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/HyperLiquidProvider.cjs +83 -27
- package/dist/providers/HyperLiquidProvider.cjs.map +1 -1
- package/dist/providers/HyperLiquidProvider.d.cts.map +1 -1
- package/dist/providers/HyperLiquidProvider.d.mts.map +1 -1
- package/dist/providers/HyperLiquidProvider.mjs +83 -27
- package/dist/providers/HyperLiquidProvider.mjs.map +1 -1
- package/dist/services/HyperLiquidSubscriptionService.cjs +6 -0
- package/dist/services/HyperLiquidSubscriptionService.cjs.map +1 -1
- package/dist/services/HyperLiquidSubscriptionService.d.cts.map +1 -1
- package/dist/services/HyperLiquidSubscriptionService.d.mts.map +1 -1
- package/dist/services/HyperLiquidSubscriptionService.mjs +6 -0
- package/dist/services/HyperLiquidSubscriptionService.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +6 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +6 -0
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.cts.map +1 -1
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.mts.map +1 -1
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/perpsDiskPersistence.cjs +252 -0
- package/dist/utils/perpsDiskPersistence.cjs.map +1 -0
- package/dist/utils/perpsDiskPersistence.d.cts +108 -0
- package/dist/utils/perpsDiskPersistence.d.cts.map +1 -0
- package/dist/utils/perpsDiskPersistence.d.mts +108 -0
- package/dist/utils/perpsDiskPersistence.d.mts.map +1 -0
- package/dist/utils/perpsDiskPersistence.mjs +244 -0
- package/dist/utils/perpsDiskPersistence.mjs.map +1 -0
- package/dist/utils/perpsFormatters.cjs +498 -0
- package/dist/utils/perpsFormatters.cjs.map +1 -0
- package/dist/utils/perpsFormatters.d.cts +202 -0
- package/dist/utils/perpsFormatters.d.cts.map +1 -0
- package/dist/utils/perpsFormatters.d.mts +202 -0
- package/dist/utils/perpsFormatters.d.mts.map +1 -0
- package/dist/utils/perpsFormatters.mjs +489 -0
- package/dist/utils/perpsFormatters.mjs.map +1 -0
- package/package.json +3 -3
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAA8C;AAW9C;;;;GAIG;AACH,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,yDAA6B,CAAA;IAC7B,qDAAyB,CAAA;IACzB,mDAAuB,CAAA;IACvB,2DAA+B,CAAA;AACjC,CAAC,EALW,wBAAwB,wCAAxB,wBAAwB,QAKnC;AA+oCD;;;;;;GAMG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,4EAAqD,CAAA;IACrD,kEAA2C,CAAA;IAC3C,mFAA4D,CAAA;IAC5D,+EAAwD,CAAA;IACxD,0DAAmC,CAAA;IACnC,4DAAqC,CAAA;IACrC,8DAAuC,CAAA;IACvC,gDAAyB,CAAA;AAC3B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAkDD;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,qBAAqB;IACrB,UAAU,EAAE,mBAAmB;IAC/B,SAAS,EAAE,kBAAkB;IAC7B,WAAW,EAA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C,cAAc,KAAK,QAAQ,CAC1E,CAAC;AACJ,CAAC;AAXD,8DAWC;AAQD,yDAAmC","sourcesContent":["import { hasProperty } from '@metamask/utils';\nimport type {\n CaipAccountId,\n CaipChainId,\n CaipAssetId,\n Hex,\n} from '@metamask/utils';\n\nimport type { CandlePeriod, TimeDuration } from '../constants/chartConfig';\nimport type { CandleData, OrderType } from './perps-types';\n\n/**\n * Connection states for WebSocket management.\n * Defined inline to avoid importing from Mobile-only services.\n * Must stay in sync with HyperLiquidClientService.WebSocketConnectionState.\n */\nexport enum WebSocketConnectionState {\n Disconnected = 'disconnected',\n Connecting = 'connecting',\n Connected = 'connected',\n Disconnecting = 'disconnecting',\n}\n\n/** Provider-agnostic raw ledger update. Fields match the common shape across providers. */\nexport type RawLedgerUpdate = {\n hash: string;\n time: number;\n delta: {\n type: string;\n usdc?: string;\n coin?: string;\n };\n};\n\n// User history item for deposits and withdrawals\nexport type UserHistoryItem = {\n id: string;\n timestamp: number;\n type: 'deposit' | 'withdrawal';\n amount: string;\n asset: string;\n txHash: string;\n status: 'completed' | 'failed' | 'pending';\n details: {\n source: string;\n bridgeContract?: string;\n recipient?: string;\n blockNumber?: string;\n chainId?: string;\n synthetic?: boolean;\n };\n};\n\n// Parameters for getting user history\nexport type GetUserHistoryParams = {\n startTime?: number;\n endTime?: number;\n accountId?: CaipAccountId;\n};\n\n// Trade configuration saved per market per network\nexport type TradeConfiguration = {\n leverage?: number; // Last used leverage for this market\n // Pending trade configuration (temporary, expires after 5 minutes)\n pendingConfig?: {\n amount?: string; // Order size in USD\n leverage?: number; // Leverage\n takeProfitPrice?: string; // Take profit price\n stopLossPrice?: string; // Stop loss price\n limitPrice?: string; // Limit price (for limit orders)\n orderType?: OrderType; // Market vs limit\n timestamp: number; // When the config was saved (for expiration check)\n };\n};\n\n// Market asset type classification (reusable across components)\nexport type MarketType = 'crypto' | 'equity' | 'commodity' | 'forex';\n\n// Market type filter for UI category badges\n// Note: 'stocks' maps to 'equity' and 'commodities' maps to 'commodity' in the data model\nexport type MarketTypeFilter =\n | 'all'\n | 'crypto'\n | 'stocks'\n | 'commodities'\n | 'forex'\n | 'new';\n\n// Input method for amount entry tracking\nexport type InputMethod =\n | 'default'\n | 'slider'\n | 'keypad'\n | 'percentage'\n | 'max';\n\n// Trade action type - differentiates first trade on a market from adding to existing position\nexport type TradeAction = 'create_position' | 'increase_exposure';\n\n// Unified tracking data interface for analytics events (never persisted in state)\n// Note: Numeric values are already parsed by hooks (usePerpsOrderFees, etc.) from API responses\nexport type TrackingData = {\n // Common to all operations\n totalFee: number; // Total fee for the operation (parsed by hooks)\n marketPrice: number; // Market price at operation time (parsed by hooks)\n metamaskFee?: number; // MetaMask fee amount (parsed by hooks)\n metamaskFeeRate?: number; // MetaMask fee rate (parsed by hooks)\n feeDiscountPercentage?: number; // Fee discount percentage (parsed by hooks)\n estimatedPoints?: number; // Estimated reward points (parsed by hooks)\n\n // Order-specific (used for trade operations)\n marginUsed?: number; // Margin required for this order (calculated by hooks)\n inputMethod?: InputMethod; // How user set the amount\n tradeAction?: TradeAction; // 'create_position' for first trade, 'increase_exposure' for adding to existing\n\n // Close-specific (used for position close operations)\n receivedAmount?: number; // Amount user receives after close (calculated by hooks)\n realizedPnl?: number; // Realized P&L from close (calculated by hooks)\n\n // Entry source for analytics (e.g., 'trending' for Trending page discovery)\n source?: string;\n\n // Pay with any token: true when user paid with a custom token (not Perps balance)\n tradeWithToken?: boolean;\n mmPayTokenSelected?: string; // Token symbol when tradeWithToken is true\n mmPayNetworkSelected?: string; // chainId when tradeWithToken is true\n\n // A/B test context to attribute trade events to specific experiments\n abTests?: Record<string, string>;\n};\n\n// TP/SL-specific tracking data for analytics events\nexport type TPSLTrackingData = {\n direction: 'long' | 'short'; // Position direction\n source: string; // Source of the TP/SL update (e.g., 'tp_sl_view', 'position_card')\n positionSize: number; // Unsigned position size for metrics\n takeProfitPercentage?: number; // Take profit percentage from entry\n stopLossPercentage?: number; // Stop loss percentage from entry\n isEditingExistingPosition?: boolean; // true = editing existing position, false = creating for new order\n entryPrice?: number; // Entry price for percentage calculations\n};\n\n// MetaMask Perps API order parameters for PerpsController\nexport type OrderParams = {\n symbol: string; // Asset identifier (e.g., 'ETH', 'BTC', 'xyz:TSLA')\n isBuy: boolean; // true = BUY order, false = SELL order\n size: string; // Order size as string (derived for validation, provider recalculates from usdAmount)\n orderType: OrderType; // Order type\n price?: string; // Limit price (required for limit orders)\n reduceOnly?: boolean; // Reduce-only flag\n isFullClose?: boolean; // Indicates closing 100% of position (skips $10 minimum validation)\n timeInForce?: 'GTC' | 'IOC' | 'ALO'; // Time in force\n\n // USD as source of truth (hybrid approach)\n usdAmount?: string; // USD amount (primary source of truth, provider calculates size from this)\n priceAtCalculation?: number; // Price snapshot when size was calculated (for slippage validation)\n maxSlippageBps?: number; // Slippage tolerance in basis points (e.g., 100 = 1%, default if not provided)\n\n // Advanced order features\n takeProfitPrice?: string; // Take profit price\n stopLossPrice?: string; // Stop loss price\n clientOrderId?: string; // Optional client-provided order ID\n slippage?: number; // Slippage tolerance for market orders (default: ORDER_SLIPPAGE_CONFIG.DefaultMarketSlippageBps / 10000 = 3%)\n grouping?: 'na' | 'normalTpsl' | 'positionTpsl'; // Override grouping (defaults: 'na' without TP/SL, 'normalTpsl' with TP/SL)\n currentPrice?: number; // Current market price (avoids extra API call if provided)\n leverage?: number; // Leverage to apply for the order (e.g., 10 for 10x leverage)\n existingPositionLeverage?: number; // Existing position leverage for validation (protocol constraint)\n\n // Optional tracking data for MetaMetrics events\n trackingData?: TrackingData;\n\n // Multi-provider routing (optional: defaults to active/default provider)\n providerId?: PerpsProviderType; // Optional: override active provider for routing\n};\n\nexport type OrderResult = {\n success?: boolean;\n orderId?: string; // Order ID from exchange\n error?: string;\n filledSize?: string; // Amount filled\n averagePrice?: string; // Average execution price\n providerId?: PerpsProviderType; // Multi-provider: which provider executed this order (injected by aggregator)\n};\n\nexport type Position = {\n symbol: string; // Asset identifier (e.g., 'ETH', 'BTC', 'xyz:TSLA')\n size: string; // Signed position size (+ = LONG, - = SHORT)\n entryPrice: string; // Average entry price\n positionValue: string; // Total position value in USD\n unrealizedPnl: string; // Unrealized profit/loss\n marginUsed: string; // Margin currently used for this position\n leverage: {\n type: 'isolated' | 'cross'; // Margin type\n value: number; // Leverage multiplier\n rawUsd?: string; // USD amount (for isolated margin)\n };\n liquidationPrice: string | null; // Liquidation price (null if no risk)\n maxLeverage: number; // Maximum allowed leverage for this asset\n returnOnEquity: string; // ROE percentage\n cumulativeFunding: {\n // Funding payments history\n allTime: string; // Total funding since account opening\n sinceOpen: string; // Funding since position opened\n sinceChange: string; // Funding since last size change\n };\n takeProfitPrice?: string; // Take profit price (if set)\n stopLossPrice?: string; // Stop loss price (if set)\n takeProfitCount: number; // Take profit count, how many tps can affect the position\n stopLossCount: number; // Stop loss count, how many sls can affect the position\n providerId?: PerpsProviderType; // Multi-provider: which provider holds this position (injected by aggregator)\n};\n\n// Using 'type' instead of 'interface' for BaseController Json compatibility\nexport type AccountState = {\n availableBalance: string; // Based on HyperLiquid: withdrawable\n totalBalance: string; // Based on HyperLiquid: accountValue\n marginUsed: string; // Based on HyperLiquid: marginUsed\n unrealizedPnl: string; // Based on HyperLiquid: unrealizedPnl\n returnOnEquity: string; // Based on HyperLiquid: returnOnEquity adjusted for weighted margin\n /**\n * Per-sub-account balance breakdown (protocol-specific, optional)\n * Maps sub-account identifier to its balance details.\n *\n * Protocol examples:\n * - HyperLiquid HIP-3: '' or 'main' (main DEX), 'xyz' (HIP-3 builder DEX)\n * - dYdX: Sub-account numbers (e.g., '0', '1', '2')\n * - Other protocols: Vault IDs, pool IDs, margin account IDs, etc.\n *\n * Key: Sub-account identifier (protocol-specific string)\n * Value: Balance details for that sub-account\n */\n subAccountBreakdown?: Record<\n string,\n {\n availableBalance: string;\n totalBalance: string;\n }\n >;\n providerId?: PerpsProviderType; // Multi-provider: which provider this account state is from (injected by aggregator)\n};\n\nexport type ClosePositionParams = {\n symbol: string; // Asset identifier to close (e.g., 'ETH', 'BTC', 'xyz:TSLA')\n size?: string; // Size to close (omit for full close)\n orderType?: OrderType; // Close order type (default: market)\n price?: string; // Limit price (required for limit close)\n currentPrice?: number; // Current market price for validation\n\n // USD as source of truth (hybrid approach - same as OrderParams)\n usdAmount?: string; // USD amount (primary source of truth, provider calculates size from this)\n priceAtCalculation?: number; // Price snapshot when size was calculated (for slippage validation)\n maxSlippageBps?: number; // Slippage tolerance in basis points (e.g., 100 = 1%, default if not provided)\n\n // Optional tracking data for MetaMetrics events\n trackingData?: TrackingData;\n\n // Multi-provider routing (optional: defaults to active/default provider)\n providerId?: PerpsProviderType; // Optional: override active provider for routing\n\n /**\n * Optional live position data from WebSocket.\n * If provided, skips the REST API position fetch (avoids rate limiting issues).\n * If not provided, falls back to fetching positions via REST API cache.\n */\n position?: Position;\n};\n\nexport type ClosePositionsParams = {\n symbols?: string[]; // Optional: specific symbols to close (omit or empty array to close all)\n closeAll?: boolean; // Explicitly close all positions\n};\n\nexport type ClosePositionsResult = {\n success: boolean; // Overall success (true if at least one position closed)\n successCount: number; // Number of positions closed successfully\n failureCount: number; // Number of positions that failed to close\n results: {\n symbol: string;\n success: boolean;\n error?: string;\n }[];\n};\n\nexport type UpdateMarginParams = {\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n amount: string; // Amount to adjust as string (positive = add, negative = remove)\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n};\n\nexport type MarginResult = {\n success: boolean;\n error?: string;\n};\n\nexport type FlipPositionParams = {\n symbol: string; // Asset identifier to flip (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n position: Position; // Current position to flip\n};\n\nexport type InitializeResult = {\n success: boolean;\n error?: string;\n chainId?: string;\n};\n\nexport type ReadyToTradeResult = {\n ready: boolean;\n error?: string;\n walletConnected?: boolean;\n networkSupported?: boolean;\n authenticatedAddress?: string;\n};\n\nexport type DisconnectResult = {\n success: boolean;\n error?: string;\n};\n\nexport type MarketInfo = {\n name: string; // HyperLiquid: universe name (asset symbol)\n szDecimals: number; // HyperLiquid: size decimals\n maxLeverage: number; // HyperLiquid: max leverage\n marginTableId: number; // HyperLiquid: margin requirements table ID\n onlyIsolated?: true; // HyperLiquid: isolated margin only (optional, only when true)\n isDelisted?: true; // HyperLiquid: delisted status (optional, only when true)\n minimumOrderSize?: number; // Minimum order size in USD (protocol-specific)\n providerId?: PerpsProviderType; // Multi-provider: which provider this market comes from (injected by aggregator)\n};\n\n/**\n * Market data with prices for UI display\n * Protocol-agnostic interface for market information with formatted values\n */\nexport type PerpsMarketData = {\n /**\n * Token symbol (e.g., 'BTC', 'ETH')\n */\n symbol: string;\n /**\n * Full token name (e.g., 'Bitcoin', 'Ethereum')\n */\n name: string;\n /**\n * Maximum leverage available as formatted string (e.g., '40x', '25x')\n */\n maxLeverage: string;\n /**\n * Current price as formatted string (e.g., '$50,000.00')\n */\n price: string;\n /**\n * 24h price change as formatted string (e.g., '+$1,250.00', '-$850.50')\n */\n change24h: string;\n /**\n * 24h price change percentage as formatted string (e.g., '+2.5%', '-1.8%')\n */\n change24hPercent: string;\n /**\n * Trading volume as formatted string (e.g., '$1.2B', '$850M')\n */\n volume: string;\n /**\n * Open interest as formatted string (e.g., '$24.5M', '$1.2B')\n */\n openInterest?: string;\n /**\n * Next funding time in milliseconds since epoch (optional, market-specific)\n */\n nextFundingTime?: number;\n /**\n * Funding interval in hours (optional, market-specific)\n */\n fundingIntervalHours?: number;\n /**\n * Current funding rate as decimal (optional, from predictedFundings API)\n */\n fundingRate?: number;\n /**\n * Market source DEX identifier (HIP-3 support)\n * - null or undefined: Main validator DEX\n * - \"xyz\", \"abc\", etc: HIP-3 builder-deployed DEX\n */\n marketSource?: string | null;\n /**\n * Market asset type classification (optional)\n * - crypto: Cryptocurrency (default for most markets)\n * - equity: Stock/equity markets (HIP-3)\n * - commodity: Commodity markets (HIP-3)\n * - forex: Foreign exchange pairs (HIP-3)\n */\n marketType?: MarketType;\n /**\n * Whether this is a HIP-3 market (has DEX prefix like xyz:, flx:)\n * Used to distinguish between crypto (isHip3=false) and non-crypto markets\n */\n isHip3?: boolean;\n /**\n * Whether this is a new/uncategorized market (HIP-3 markets not yet in explicit mapping)\n * Used for the \"New\" filter tab\n */\n isNewMarket?: boolean;\n /**\n * Multi-provider: which provider this market data comes from (injected by aggregator)\n */\n providerId?: PerpsProviderType;\n /**\n * Indicates this market snapshot came from the last known good cache after live fetch failure.\n */\n isStale?: boolean;\n};\n\nexport type ToggleTestnetResult = {\n success: boolean;\n isTestnet: boolean;\n error?: string;\n};\n\nexport type AssetRoute = {\n assetId: CaipAssetId; // CAIP asset ID (e.g., \"eip155:42161/erc20:0xaf88.../default\")\n chainId: CaipChainId; // CAIP-2 chain ID where the bridge contract is located\n contractAddress: Hex; // Bridge contract address for deposits/withdrawals\n constraints?: {\n minAmount?: string; // Minimum deposit/withdrawal amount\n maxAmount?: string; // Maximum deposit/withdrawal amount\n estimatedTime?: string; // Estimated processing time (formatted string - deprecated, use estimatedMinutes)\n estimatedMinutes?: number; // Estimated processing time in minutes (raw value for UI formatting)\n fees?: {\n fixed?: number; // Fixed fee amount (e.g., 1 for 1 token)\n percentage?: number; // Percentage fee (e.g., 0.05 for 0.05%)\n token?: string; // Fee token symbol (e.g., 'USDC', 'ETH')\n };\n };\n};\n\nexport type SwitchProviderResult = {\n success: boolean;\n providerId: PerpsActiveProviderMode;\n error?: string;\n};\n\nexport type CancelOrderParams = {\n orderId: string; // Order ID to cancel\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n};\n\nexport type CancelOrderResult = {\n success: boolean;\n orderId?: string; // Cancelled order ID\n error?: string;\n providerId?: PerpsProviderType; // Multi-provider: source provider identifier\n};\n\nexport type BatchCancelOrdersParams = {\n orderId: string;\n symbol: string;\n}[];\n\nexport type CancelOrdersParams = {\n symbols?: string[]; // Optional: specific symbols (omit to cancel all orders)\n orderIds?: string[]; // Optional: specific order IDs (omit to cancel all orders for specified coins)\n cancelAll?: boolean; // Explicitly cancel all orders\n};\n\nexport type CancelOrdersResult = {\n success: boolean; // Overall success (true if at least one order cancelled)\n successCount: number; // Number of orders cancelled successfully\n failureCount: number; // Number of orders that failed to cancel\n results: {\n orderId: string;\n symbol: string;\n success: boolean;\n error?: string;\n }[];\n};\n\nexport type EditOrderParams = {\n orderId: string | number; // Order ID or client order ID to modify\n newOrder: OrderParams; // New order parameters\n};\n\nexport type DepositParams = {\n amount: string; // Amount to deposit\n assetId: CaipAssetId; // Asset to deposit (required for validation)\n fromChainId?: CaipChainId; // Source chain (defaults to current network)\n toChainId?: CaipChainId; // Destination chain (defaults to HyperLiquid Arbitrum)\n recipient?: Hex; // Recipient address (defaults to selected account)\n};\n\n/** Params for depositWithConfirmation: prepares transaction for confirmation screen */\nexport type DepositWithConfirmationParams = {\n /** Optional deposit amount (display/tracking; actual amount comes from prepared transaction) */\n amount?: string;\n /** If true, uses addTransaction instead of submit to avoid navigation (e.g. deposit + place order flow) */\n placeOrder?: boolean;\n};\n\nexport type DepositResult = {\n success: boolean;\n txHash?: string;\n error?: string;\n};\n\n// Enhanced deposit flow state types for multi-step deposits\nexport type DepositStatus =\n | 'idle' // No deposit in progress\n | 'preparing' // Analyzing route & preparing transactions\n | 'swapping' // Converting token (e.g., ETH → USDC)\n | 'bridging' // Cross-chain transfer\n | 'depositing' // Final deposit to HyperLiquid\n | 'success' // Deposit completed successfully\n | 'error'; // Deposit failed at any step\n\nexport type DepositFlowType =\n | 'direct' // Same chain, same token (USDC on Arbitrum)\n | 'swap' // Same chain, different token (ETH → USDC)\n | 'bridge' // Different chain, same token (USDC on Ethereum → Arbitrum)\n | 'swap_bridge'; // Different chain, different token (ETH on Ethereum → USDC on Arbitrum)\n\nexport type DepositStepInfo = {\n totalSteps: number; // Total number of steps in this flow\n currentStep: number; // Current step (0-based index)\n stepNames: string[]; // Human-readable step names\n stepTxHashes?: string[]; // Transaction hashes for each completed step\n};\n\nexport type WithdrawParams = {\n amount: string; // Amount to withdraw\n destination?: Hex; // Destination address (optional, defaults to current account)\n assetId?: CaipAssetId; // Asset to withdraw (defaults to USDC)\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n};\n\nexport type WithdrawResult = {\n success: boolean;\n txHash?: string;\n error?: string;\n withdrawalId?: string; // Unique ID for tracking\n estimatedArrivalTime?: number; // Provider-specific arrival time\n};\n\nexport type TransferBetweenDexsParams = {\n sourceDex: string; // Source DEX name ('' = main DEX, 'xyz' = HIP-3 DEX)\n destinationDex: string; // Destination DEX name ('' = main DEX, 'xyz' = HIP-3 DEX)\n amount: string; // USDC amount to transfer\n};\n\nexport type TransferBetweenDexsResult = {\n success: boolean;\n txHash?: string;\n error?: string;\n};\n\nexport type GetHistoricalPortfolioParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n};\n\nexport type HistoricalPortfolioResult = {\n accountValue1dAgo: string;\n timestamp: number;\n};\n\nexport type LiveDataConfig = {\n priceThrottleMs?: number; // ms between price updates (default: 2000)\n positionThrottleMs?: number; // ms between position updates (default: 5000)\n maxUpdatesPerSecond?: number; // hard limit to prevent UI blocking\n};\n\nexport type PerpsControllerConfig = {\n /**\n * Fallback blocked regions to use when RemoteFeatureFlagController fails to fetch.\n * The fallback is set by default if defined and replaced with remote block list once available.\n */\n fallbackBlockedRegions?: string[];\n /**\n * Fallback HIP-3 equity perps master switch to use when RemoteFeatureFlagController fails to fetch.\n * Controls whether HIP-3 (builder-deployed) DEXs are enabled.\n * The fallback is set by default if defined and replaced with remote feature flag once available.\n */\n fallbackHip3Enabled?: boolean;\n /**\n * Fallback HIP-3 market allowlist to use when RemoteFeatureFlagController fails to fetch.\n * Empty array = enable all markets (discovery mode), non-empty = allowlist specific markets.\n * Supports wildcards: \"xyz:*\" (all xyz markets), \"xyz\" (shorthand for \"xyz:*\"), \"BTC\" (main DEX market).\n * Only applies when HIP-3 is enabled.\n * The fallback is set by default if defined and replaced with remote feature flag once available.\n */\n fallbackHip3AllowlistMarkets?: string[];\n /**\n * Fallback HIP-3 market blocklist to use when RemoteFeatureFlagController fails to fetch.\n * Empty array = no blocking, non-empty = block specific markets.\n * Supports wildcards: \"xyz:*\" (block all xyz markets), \"xyz\" (shorthand for \"xyz:*\"), \"BTC\" (block main DEX market).\n * Always applied regardless of HIP-3 enabled state.\n * The fallback is set by default if defined and replaced with remote feature flag once available.\n */\n fallbackHip3BlocklistMarkets?: string[];\n\n /**\n * Per-provider credentials and configuration.\n * Nested by provider name so each provider's settings are self-contained\n * and new protocols can be added without polluting the top-level config.\n * Passed from the init file where `process.env.X` is babel-transformed at build time.\n */\n providerCredentials?: PerpsProviderCredentials;\n};\n\nexport type HyperLiquidCredentials = {\n /** Builder fee wallet address for testnet. Empty/omitted = uses BUILDER_FEE_CONFIG default. */\n builderAddressTestnet?: string;\n /** Builder fee wallet address for mainnet. Empty/omitted = uses BUILDER_FEE_CONFIG default. */\n builderAddressMainnet?: string;\n};\n\nexport type MYXCredentials = {\n /** Whether MYX provider is enabled via local env var. */\n enabled?: boolean;\n appIdTestnet?: string;\n apiSecretTestnet?: string;\n brokerAddressTestnet?: string;\n appIdMainnet?: string;\n apiSecretMainnet?: string;\n brokerAddressMainnet?: string;\n};\n\nexport type PerpsProviderCredentials = {\n hyperliquid?: HyperLiquidCredentials;\n myx?: MYXCredentials;\n};\n\nexport type PriceUpdate = {\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n price: string; // Current mid price (average of best bid and ask)\n timestamp: number; // Update timestamp\n percentChange24h?: string; // 24h price change percentage\n // Order book data (only available when includeOrderBook is true)\n bestBid?: string; // Best bid price (highest price buyers are willing to pay)\n bestAsk?: string; // Best ask price (lowest price sellers are willing to accept)\n spread?: string; // Ask - Bid spread\n markPrice?: string; // Mark price from oracle (used for liquidations)\n // Market data (only available when includeMarketData is true)\n funding?: number; // Current funding rate\n openInterest?: number; // Open interest in USD\n volume24h?: number; // 24h trading volume in USD\n providerId?: PerpsProviderType; // Multi-provider: price source (injected by aggregator)\n};\n\nexport type OrderFill = {\n orderId: string; // Order ID that was filled\n symbol: string; // Asset symbol\n side: string; // Normalized order side ('buy' or 'sell')\n size: string; // Fill size\n price: string; // Fill price\n pnl: string; // PNL\n direction: string; // Direction of the fill\n fee: string; // Fee paid\n feeToken: string; // Fee token symbol\n timestamp: number; // Fill timestamp\n startPosition?: string; // Start position\n success?: boolean; // Whether the order was filled successfully\n liquidation?: {\n liquidatedUser: string; // Address of the liquidated user. liquidatedUser isn't always the current user. It can also mean the fill filled another user's liquidation.\n markPx: string; // Mark price at liquidation\n method: string; // Liquidation method (e.g., 'market')\n };\n orderType?: 'take_profit' | 'stop_loss' | 'liquidation' | 'regular';\n detailedOrderType?: string; // Original order type from exchange\n providerId?: PerpsProviderType; // Multi-provider: which provider this fill occurred on (injected by aggregator)\n};\n\n// Parameter interfaces - all fully optional for better UX\nexport type CheckEligibilityParams = {\n blockedRegions: string[]; // List of blocked region codes (e.g., ['US', 'CN'])\n geoLocation: string; // User's geolocation from GeolocationController\n};\n\nexport type GetPositionsParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n includeHistory?: boolean; // Optional: include historical positions\n skipCache?: boolean; // Optional: bypass WebSocket cache and force API call (default: false)\n standalone?: boolean; // Optional: lightweight mode - skip full initialization, use standalone HTTP client (no wallet/WebSocket needed)\n userAddress?: string; // Optional: required when standalone is true - user address to query positions for\n};\n\nexport type GetAccountStateParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n source?: string; // Optional: source of the call for tracing (e.g., 'health_check', 'initial_connection')\n standalone?: boolean; // Optional: lightweight mode - skip full initialization, use standalone HTTP client (no wallet/WebSocket needed)\n userAddress?: string; // Optional: required when standalone is true - user address to query account state for\n};\n\nexport type GetOrderFillsParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n user?: Hex; // Optional: user address (defaults to selected account)\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n endTime?: number; // Optional: end timestamp (Unix milliseconds)\n limit?: number; // Optional: max number of results for pagination\n aggregateByTime?: boolean; // Optional: aggregate by time\n};\n\n/**\n * Parameters for getOrFetchFills - optimized cache-first fill retrieval.\n * Subset of GetOrderFillsParams for cache filtering.\n */\nexport type GetOrFetchFillsParams = {\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n symbol?: string; // Optional: filter by symbol\n};\n\nexport type GetOrdersParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n endTime?: number; // Optional: end timestamp (Unix milliseconds)\n limit?: number; // Optional: max number of results for pagination\n offset?: number; // Optional: offset for pagination\n skipCache?: boolean; // Optional: bypass WebSocket cache and force API call (default: false)\n standalone?: boolean; // Optional: lightweight mode - skip full initialization, use standalone HTTP client (no wallet/WebSocket needed)\n userAddress?: string; // Optional: required when standalone is true - user address to query orders for\n};\n\nexport type GetFundingParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n endTime?: number; // Optional: end timestamp (Unix milliseconds)\n limit?: number; // Optional: max number of results for pagination\n offset?: number; // Optional: offset for pagination\n};\n\nexport type GetSupportedPathsParams = {\n isTestnet?: boolean; // Optional: override current testnet state\n assetId?: CaipAssetId; // Optional: filter by specific asset\n symbol?: string; // Optional: filter by asset symbol (e.g., 'USDC')\n chainId?: CaipChainId; // Optional: filter by chain (CAIP-2 format)\n};\n\n/** Placeholder for future filter/pagination params (e.g., validated, chain). Empty today so the API signature is stable. */\nexport type GetAvailableDexsParams = Record<string, never>;\n\nexport type GetMarketsParams = {\n symbols?: string[]; // Optional symbol filter (e.g., ['BTC', 'xyz:XYZ100'])\n dex?: string; // HyperLiquid HIP-3: DEX name (empty string '' or undefined for main DEX). Other protocols: ignored.\n skipFilters?: boolean; // Skip market filtering (both allowlist and blocklist, default: false). When true, returns all markets without filtering.\n standalone?: boolean; // Lightweight mode: skip full initialization, only fetch market metadata (no wallet/WebSocket needed). Only main DEX markets returned. Use for discovery use cases like checking if a perps market exists.\n};\n\nexport type SubscribePricesParams = {\n symbols: string[];\n callback: (prices: PriceUpdate[]) => void;\n throttleMs?: number; // Future: per-subscription throttling\n includeOrderBook?: boolean; // Optional: include bid/ask data from L2 book\n includeMarketData?: boolean; // Optional: include funding, open interest, volume data\n};\n\nexport type SubscribePositionsParams = {\n callback: (positions: Position[]) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n includeHistory?: boolean; // Future: include historical data\n};\n\nexport type SubscribeOrderFillsParams = {\n callback: (fills: OrderFill[], isSnapshot?: boolean) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n since?: number; // Future: only fills after timestamp\n};\n\nexport type SubscribeOrdersParams = {\n callback: (orders: Order[]) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n includeHistory?: boolean; // Optional: include filled/canceled orders\n};\n\nexport type SubscribeAccountParams = {\n callback: (account: AccountState | null) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n};\n\nexport type SubscribeOICapsParams = {\n callback: (caps: string[]) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n};\n\nexport type SubscribeCandlesParams = {\n symbol: string;\n interval: CandlePeriod;\n duration?: TimeDuration;\n callback: (data: CandleData) => void;\n onError?: (error: Error) => void;\n};\n\n/**\n * Single price level in the order book\n */\nexport type OrderBookLevel = {\n /** Price at this level */\n price: string;\n /** Size at this level (in base asset) */\n size: string;\n /** Cumulative size up to and including this level */\n total: string;\n /** Notional value in USD */\n notional: string;\n /** Cumulative notional up to and including this level */\n totalNotional: string;\n};\n\n/**\n * Full order book data with multiple price levels\n */\nexport type OrderBookData = {\n /** Bid levels (buy orders) - highest price first */\n bids: OrderBookLevel[];\n /** Ask levels (sell orders) - lowest price first */\n asks: OrderBookLevel[];\n /** Spread between best bid and best ask */\n spread: string;\n /** Spread as a percentage of mid price */\n spreadPercentage: string;\n /** Mid price (average of best bid and best ask) */\n midPrice: string;\n /** Timestamp of last update */\n lastUpdated: number;\n /** Maximum total size across all levels (for scaling depth bars) */\n maxTotal: string;\n};\n\nexport type SubscribeOrderBookParams = {\n /** Symbol to subscribe to (e.g., 'BTC', 'ETH') */\n symbol: string;\n /** Number of levels to return per side (default: 10) */\n levels?: number;\n /** Price aggregation significant figures (2-5, default: 5). Higher = finer granularity */\n nSigFigs?: 2 | 3 | 4 | 5;\n /** Mantissa for aggregation when nSigFigs is 5 (2 or 5). Controls finest price increments */\n mantissa?: 2 | 5;\n /** Callback function receiving order book updates */\n callback: (orderBook: OrderBookData) => void;\n /** Callback for errors */\n onError?: (error: Error) => void;\n};\n\nexport type LiquidationPriceParams = {\n entryPrice: number;\n leverage: number;\n direction: 'long' | 'short';\n positionSize?: number; // Optional: for more accurate calculations\n marginType?: 'isolated' | 'cross'; // Optional: defaults to isolated\n asset?: string; // Optional: for asset-specific maintenance margins\n};\n\nexport type MaintenanceMarginParams = {\n asset: string;\n positionSize?: number; // Optional: for tiered margin systems\n};\n\nexport type FeeCalculationParams = {\n orderType: 'market' | 'limit';\n isMaker?: boolean;\n amount?: string;\n symbol: string; // Required: Asset identifier for HIP-3 fee calculation (e.g., 'BTC', 'xyz:TSLA')\n};\n\nexport type FeeCalculationResult = {\n // Total fees (protocol + MetaMask)\n feeRate?: number; // Total fee rate as decimal (e.g., 0.00145 for 0.145%), undefined when unavailable\n feeAmount?: number; // Total fee amount in USD (when amount is provided)\n\n // Protocol-specific base fees\n protocolFeeRate?: number; // Protocol fee rate (e.g., 0.00045 for HyperLiquid taker), undefined when unavailable\n protocolFeeAmount?: number; // Protocol fee amount in USD\n\n // MetaMask builder/revenue fee\n metamaskFeeRate?: number; // MetaMask fee rate (e.g., 0.001 for 0.1%), undefined when unavailable\n metamaskFeeAmount?: number; // MetaMask fee amount in USD\n\n // Optional detailed breakdown for transparency\n breakdown?: {\n baseFeeRate: number;\n volumeTier?: string;\n volumeDiscount?: number;\n stakingDiscount?: number;\n };\n};\n\nexport type UpdatePositionTPSLParams = {\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n takeProfitPrice?: string; // Optional: undefined to remove\n stopLossPrice?: string; // Optional: undefined to remove\n // Optional tracking data for MetaMetrics events\n trackingData?: TPSLTrackingData;\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n /**\n * Optional live position data from WebSocket.\n * If provided, skips the REST API position fetch (avoids rate limiting issues).\n * If not provided, falls back to fetching positions via REST API.\n */\n position?: Position;\n};\n\nexport type Order = {\n orderId: string; // Order ID\n symbol: string; // Asset symbol (e.g., 'ETH', 'BTC')\n side: 'buy' | 'sell'; // Normalized order side\n orderType: OrderType; // Order type (market/limit)\n size: string; // Order size\n originalSize: string; // Original order size\n price: string; // Order price (for limit orders)\n filledSize: string; // Amount filled\n remainingSize: string; // Amount remaining\n status: 'open' | 'filled' | 'canceled' | 'rejected' | 'triggered' | 'queued'; // Normalized status\n timestamp: number; // Order timestamp\n lastUpdated?: number; // Last status update timestamp (optional - not provided by all APIs)\n // TODO: Consider creating separate type for OpenOrders (UI Orders) potentially if optional properties muddy up the original Order type\n takeProfitPrice?: string; // Take profit price (if set)\n stopLossPrice?: string; // Stop loss price (if set)\n stopLossOrderId?: string; // Stop loss order ID\n takeProfitOrderId?: string; // Take profit order ID\n detailedOrderType?: string; // Full order type from exchange (e.g., 'Take Profit Limit', 'Stop Market')\n isTrigger?: boolean; // Whether this is a trigger order (TP/SL)\n reduceOnly?: boolean; // Whether this is a reduce-only order\n isPositionTpsl?: boolean; // Whether this TP/SL is associated with the full position\n parentOrderId?: string; // Parent order ID for display-only synthetic TP/SL rows\n isSynthetic?: boolean; // Whether this order is synthetic (display-only, cancelable only when linked to a real child order ID)\n triggerPrice?: string; // Trigger condition price for trigger orders (e.g., TP/SL trigger level)\n providerId?: PerpsProviderType; // Multi-provider: which provider this order is on (injected by aggregator)\n};\n\nexport type Funding = {\n symbol: string; // Asset symbol (e.g., 'ETH', 'BTC')\n amountUsd: string; // Funding amount in USD (positive = received, negative = paid)\n rate?: string; // Funding rate applied (undefined when not available from provider)\n timestamp: number; // Funding payment timestamp\n transactionHash?: string; // Optional transaction hash\n};\n\nexport type PerpsProvider = {\n readonly protocolId: string;\n\n // Unified asset and route information\n getDepositRoutes(params?: GetSupportedPathsParams): AssetRoute[]; // Assets and their deposit routes\n getWithdrawalRoutes(params?: GetSupportedPathsParams): AssetRoute[]; // Assets and their withdrawal routes\n\n // Trading operations → Redux (persisted, optimistic updates)\n placeOrder(params: OrderParams): Promise<OrderResult>;\n editOrder(params: EditOrderParams): Promise<OrderResult>;\n cancelOrder(params: CancelOrderParams): Promise<CancelOrderResult>;\n cancelOrders?(params: BatchCancelOrdersParams): Promise<CancelOrdersResult>; // Optional: batch cancel for protocols that support it\n closePosition(params: ClosePositionParams): Promise<OrderResult>;\n closePositions?(params: ClosePositionsParams): Promise<ClosePositionsResult>; // Optional: batch close for protocols that support it\n updatePositionTPSL(params: UpdatePositionTPSLParams): Promise<OrderResult>;\n updateMargin(params: UpdateMarginParams): Promise<MarginResult>;\n getPositions(params?: GetPositionsParams): Promise<Position[]>;\n getAccountState(params?: GetAccountStateParams): Promise<AccountState>;\n getMarkets(params?: GetMarketsParams): Promise<MarketInfo[]>;\n getMarketDataWithPrices(): Promise<PerpsMarketData[]>;\n withdraw(params: WithdrawParams): Promise<WithdrawResult>; // API operation - stays in provider\n // Note: deposit() is handled by PerpsController routing (blockchain operation)\n validateDeposit(\n params: DepositParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific deposit validation\n validateOrder(\n params: OrderParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific order validation\n validateClosePosition(\n params: ClosePositionParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific position close validation\n validateWithdrawal(\n params: WithdrawParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific withdrawal validation\n\n // Historical data operations\n /**\n * Historical trade fills - actual executed trades with exact prices and fees.\n * Purpose: Track what actually happened when orders were executed.\n * Example: Market long 1 ETH @ $50,000 → OrderFill with exact execution price and fees\n */\n getOrderFills(params?: GetOrderFillsParams): Promise<OrderFill[]>;\n\n /**\n * Get fills using WebSocket cache first, falling back to REST API.\n * OPTIMIZATION: Uses cached fills when available (0 API weight), only calls REST on cache miss.\n * Purpose: Prevent 429 errors during rapid market switching by reusing cached fills.\n *\n * @param params - Optional filter parameters (startTime, symbol)\n */\n getOrFetchFills(params?: GetOrFetchFillsParams): Promise<OrderFill[]>;\n\n /**\n * Get historical portfolio data\n * Purpose: Retrieve account value from previous periods for PnL tracking\n * Example: Get account value from yesterday to calculate 24h percentage change\n *\n * @param params - Optional parameters for historical portfolio retrieval\n */\n getHistoricalPortfolio(\n params?: GetHistoricalPortfolioParams,\n ): Promise<HistoricalPortfolioResult>;\n\n /**\n * Historical order lifecycle - order placement, modifications, and status changes.\n * Purpose: Track the complete journey of orders from request to completion.\n * Example: Limit buy 1 ETH @ $48,000 → Order with status 'open' → 'filled' when executed\n */\n getOrders(params?: GetOrdersParams): Promise<Order[]>;\n\n /**\n * Currently active open orders (real-time status).\n * Purpose: Show orders that are currently open/pending execution (not historical states).\n * Different from getOrders() which returns complete historical order lifecycle.\n * Example: Shows only orders that are actually open right now in the exchange.\n */\n getOpenOrders(params?: GetOrdersParams): Promise<Order[]>;\n\n /**\n * Historical funding payments - periodic costs/rewards for holding positions.\n * Purpose: Track ongoing expenses and income from position maintenance.\n * Example: Holding long ETH position → Funding payment of -$5.00 (you pay the funding)\n */\n getFunding(params?: GetFundingParams): Promise<Funding[]>;\n\n /**\n * Get user non-funding ledger updates (deposits, transfers, withdrawals)\n */\n getUserNonFundingLedgerUpdates(params?: {\n accountId?: string;\n startTime?: number;\n endTime?: number;\n }): Promise<RawLedgerUpdate[]>;\n\n /**\n * Get user history (deposits, withdrawals, transfers)\n */\n getUserHistory(params?: {\n accountId?: CaipAccountId;\n startTime?: number;\n endTime?: number;\n }): Promise<UserHistoryItem[]>;\n\n // Protocol-specific calculations\n calculateLiquidationPrice(params: LiquidationPriceParams): Promise<string>;\n calculateMaintenanceMargin(params: MaintenanceMarginParams): Promise<number>;\n getMaxLeverage(asset: string): Promise<number>;\n calculateFees(params: FeeCalculationParams): Promise<FeeCalculationResult>;\n\n // Live data subscriptions → Direct UI (NO Redux, maximum speed)\n subscribeToPrices(params: SubscribePricesParams): () => void;\n subscribeToPositions(params: SubscribePositionsParams): () => void;\n subscribeToOrderFills(params: SubscribeOrderFillsParams): () => void;\n subscribeToOrders(params: SubscribeOrdersParams): () => void;\n subscribeToAccount(params: SubscribeAccountParams): () => void;\n subscribeToOICaps(params: SubscribeOICapsParams): () => void;\n subscribeToCandles(params: SubscribeCandlesParams): () => void;\n subscribeToOrderBook(params: SubscribeOrderBookParams): () => void;\n\n // Live data configuration\n setLiveDataConfig(config: Partial<LiveDataConfig>): void;\n\n // Connection management\n toggleTestnet(): Promise<ToggleTestnetResult>;\n initialize(): Promise<InitializeResult>;\n isReadyToTrade(): Promise<ReadyToTradeResult>;\n disconnect(): Promise<DisconnectResult>;\n ping(timeoutMs?: number): Promise<void>; // Lightweight WebSocket health check with configurable timeout\n getWebSocketConnectionState?(): WebSocketConnectionState; // Optional: get current WebSocket connection state\n subscribeToConnectionState?(\n listener: (\n state: WebSocketConnectionState,\n reconnectionAttempt: number,\n ) => void,\n ): () => void; // Optional: subscribe to WebSocket connection state changes\n reconnect?(): Promise<void>; // Optional: manually trigger WebSocket reconnection\n\n // Block explorer\n getBlockExplorerUrl(address?: string): string;\n\n // Fee discount context (optional - for MetaMask reward discounts)\n setUserFeeDiscount?(discountBips: number | undefined): void;\n\n // HIP-3 (Builder-deployed DEXs) operations - optional for backward compatibility\n /**\n * Get list of available HIP-3 builder-deployed DEXs\n *\n * @param params - Optional parameters (reserved for future filters/pagination)\n * @returns Array of DEX names (empty string '' represents main DEX)\n */\n getAvailableDexs?(params?: GetAvailableDexsParams): Promise<string[]>;\n\n /**\n * Fetch historical OHLCV candle data for a symbol.\n * Optional: only providers that support historical candles need to implement this.\n */\n fetchHistoricalCandles?(options: {\n symbol: string;\n interval: CandlePeriod;\n limit?: number;\n endTime?: number;\n }): Promise<CandleData>;\n};\n\n// ============================================================================\n// Multi-Provider Aggregation Types (Phase 1)\n// ============================================================================\n\n/**\n * Provider identifier type for multi-provider support.\n * Add new providers here as they are implemented.\n */\nexport type PerpsProviderType = 'hyperliquid' | 'myx';\n\n/**\n * Active provider mode for PerpsController state.\n * - Direct providers: 'hyperliquid', 'myx'\n * - 'aggregated': Multi-provider aggregation mode\n */\nexport type PerpsActiveProviderMode = PerpsProviderType | 'aggregated';\n\n/**\n * Aggregation mode for read operations.\n * - 'all': Aggregate data from all registered providers\n * - 'active': Only aggregate from providers with active connections\n * - 'specific': Aggregate from a specific subset of providers\n */\nexport type AggregationMode = 'all' | 'active' | 'specific';\n\n/**\n * Routing strategy for write operations.\n * Phase 1 only supports 'default_provider' - advanced strategies deferred to Phase 3.\n */\nexport type RoutingStrategy = 'default_provider';\n\n/**\n * Configuration for AggregatedPerpsProvider\n */\nexport type AggregatedProviderConfig = {\n /** Map of provider ID to provider instance */\n providers: Map<PerpsProviderType, PerpsProvider>;\n /** Default provider for write operations when providerId not specified */\n defaultProvider: PerpsProviderType;\n /** Aggregation mode for read operations (default: 'all') */\n aggregationMode?: AggregationMode;\n /** Platform dependencies for logging, metrics, etc. */\n infrastructure: PerpsPlatformDependencies;\n};\n\n/**\n * Provider-specific error with context for multi-provider error handling\n */\nexport type ProviderError = {\n /** Which provider the error originated from */\n providerId: PerpsProviderType;\n /** Human-readable error message */\n message: string;\n /** Original error object if available */\n originalError?: Error;\n /** Whether the operation can be retried */\n isRetryable?: boolean;\n};\n\n/**\n * Aggregated account state combining data from multiple providers\n */\nexport type AggregatedAccountState = {\n /** Combined totals across all providers */\n total: AccountState;\n /** Per-provider breakdown */\n byProvider: Map<PerpsProviderType, AccountState>;\n};\n\n// ============================================================================\n// Injectable Dependency Interfaces\n// These interfaces enable dependency injection for platform-specific services,\n// allowing PerpsController to be moved to core without mobile-specific imports.\n// ============================================================================\n\n/**\n * Injectable logger interface for error reporting.\n * Allows core package to be platform-agnostic (mobile: Sentry, extension: different impl)\n */\nexport type PerpsLogger = {\n error(\n error: Error,\n options?: {\n tags?: Record<string, string | number>;\n context?: { name: string; data: Record<string, unknown> };\n extras?: Record<string, unknown>;\n },\n ): void;\n};\n\n/**\n * Analytics events specific to Perps feature.\n * These are the actual event names sent to analytics backend.\n * Values must match the corresponding MetaMetricsEvents values in mobile for compatibility.\n *\n * When migrating to core monorepo, this enum travels with PerpsController.\n */\nexport enum PerpsAnalyticsEvent {\n WithdrawalTransaction = 'Perp Withdrawal Transaction',\n TradeTransaction = 'Perp Trade Transaction',\n PositionCloseTransaction = 'Perp Position Close Transaction',\n OrderCancelTransaction = 'Perp Order Cancel Transaction',\n ScreenViewed = 'Perp Screen Viewed',\n UiInteraction = 'Perp UI Interaction',\n RiskManagement = 'Perp Risk Management',\n PerpsError = 'Perp Error',\n}\n\n/**\n * Perps-specific trace names. These must match TraceName enum values in mobile.\n * When in core monorepo, this defines the valid trace names for Perps operations.\n */\nexport type PerpsTraceName =\n | 'Perps Open Position'\n | 'Perps Close Position'\n | 'Perps Deposit'\n | 'Perps Withdraw'\n | 'Perps Place Order'\n | 'Perps Edit Order'\n | 'Perps Cancel Order'\n | 'Perps Update TP/SL'\n | 'Perps Update Margin'\n | 'Perps Flip Position'\n | 'Perps Order Submission Toast'\n | 'Perps Market Data Update'\n | 'Perps Order View'\n | 'Perps Tab View'\n | 'Perps Market List View'\n | 'Perps Position Details View'\n | 'Perps Adjust Margin View'\n | 'Perps Order Details View'\n | 'Perps Order Book View'\n | 'Perps Flip Position Sheet'\n | 'Perps Transactions View'\n | 'Perps Order Fills Fetch'\n | 'Perps Orders Fetch'\n | 'Perps Funding Fetch'\n | 'Perps Get Positions'\n | 'Perps Get Account State'\n | 'Perps Get Historical Portfolio'\n | 'Perps Get Markets'\n | 'Perps Fetch Historical Candles'\n | 'Perps WebSocket Connected'\n | 'Perps WebSocket Disconnected'\n | 'Perps WebSocket First Positions'\n | 'Perps WebSocket First Orders'\n | 'Perps WebSocket First Account'\n | 'Perps Data Lake Report'\n | 'Perps Rewards API Call'\n | 'Perps Close Position View'\n | 'Perps Withdraw View'\n | 'Perps Connection Establishment'\n | 'Perps Account Switch Reconnection'\n | 'Perps Market Data Preload'\n | 'Perps User Data Preload';\n\n/**\n * Perps trace name constants. Values match TraceName enum in mobile.\n * When in core, these ARE the source of truth - mobile will re-export from core.\n */\nexport const PerpsTraceNames = {\n // Trading operations\n PlaceOrder: 'Perps Place Order',\n EditOrder: 'Perps Edit Order',\n CancelOrder: 'Perps Cancel Order',\n ClosePosition: 'Perps Close Position',\n UpdateTpsl: 'Perps Update TP/SL',\n UpdateMargin: 'Perps Update Margin',\n FlipPosition: 'Perps Flip Position',\n\n // Account operations\n Withdraw: 'Perps Withdraw',\n Deposit: 'Perps Deposit',\n\n // Market data\n GetPositions: 'Perps Get Positions',\n GetAccountState: 'Perps Get Account State',\n GetMarkets: 'Perps Get Markets',\n OrderFillsFetch: 'Perps Order Fills Fetch',\n OrdersFetch: 'Perps Orders Fetch',\n FundingFetch: 'Perps Funding Fetch',\n GetHistoricalPortfolio: 'Perps Get Historical Portfolio',\n FetchHistoricalCandles: 'Perps Fetch Historical Candles',\n\n // Data lake\n DataLakeReport: 'Perps Data Lake Report',\n\n // WebSocket\n WebsocketConnected: 'Perps WebSocket Connected',\n WebsocketDisconnected: 'Perps WebSocket Disconnected',\n WebsocketFirstPositions: 'Perps WebSocket First Positions',\n WebsocketFirstOrders: 'Perps WebSocket First Orders',\n WebsocketFirstAccount: 'Perps WebSocket First Account',\n\n // Other\n RewardsApiCall: 'Perps Rewards API Call',\n ConnectionEstablishment: 'Perps Connection Establishment',\n AccountSwitchReconnection: 'Perps Account Switch Reconnection',\n MarketDataPreload: 'Perps Market Data Preload',\n UserDataPreload: 'Perps User Data Preload',\n} as const satisfies Record<string, PerpsTraceName>;\n\n/**\n * Perps trace operation constants. Values match TraceOperation enum in mobile.\n * These categorize traces by type of operation for Sentry/observability filtering.\n */\nexport const PerpsTraceOperations = {\n Operation: 'perps.operation',\n OrderSubmission: 'perps.order_submission',\n PositionManagement: 'perps.position_management',\n MarketData: 'perps.market_data',\n} as const;\n\n/**\n * Values allowed in trace data/tags. Matches Sentry's TraceValue type.\n */\nexport type PerpsTraceValue = string | number | boolean;\n\n/**\n * Properties allowed in analytics events. More constrained than unknown.\n * Named PerpsAnalyticsProperties to avoid conflict with PERPS_EVENT_PROPERTY\n * constant object from eventNames.ts (which contains property key names).\n */\nexport type PerpsAnalyticsProperties = Record<\n string,\n string | number | boolean | Record<string, string> | null | undefined\n>;\n\n/**\n * Injectable metrics interface for analytics.\n * Allows core package to work with different analytics backends.\n */\nexport type PerpsMetrics = {\n isEnabled(): boolean;\n\n /**\n * Track a Perps-specific analytics event with properties.\n * This abstracts away the MetricsEventBuilder pattern used in mobile.\n *\n * @param event - The Perps analytics event type (enum with actual event name values)\n * @param properties - Type-safe key-value properties to attach to the event\n */\n trackPerpsEvent(\n event: PerpsAnalyticsEvent,\n properties: PerpsAnalyticsProperties,\n ): void;\n};\n\n/**\n * Injectable debug logger for development logging.\n * Only logs in development mode.\n * Accepts `unknown` to allow logging error objects from catch blocks.\n */\nexport type PerpsDebugLogger = {\n log(...args: unknown[]): void;\n};\n\n/**\n * Injectable stream manager interface for pause/resume during critical operations.\n *\n * WHY THIS IS NEEDED:\n * PerpsStreamManager is a React-based mobile-specific singleton that:\n * - Uses React Context for subscription management\n * - Uses react-native-performance for tracing\n * - Directly accesses Engine.context (mobile singleton pattern)\n * - Manages WebSocket connections with throttling/caching\n *\n * PerpsController only needs pause/resume during critical operations (withStreamPause method)\n * to prevent stale UI updates during batch operations. The minimal interface allows:\n * - Mobile: Wrap existing singleton (streamManager[channel].pause())\n * - Extension: Implement with whatever streaming solution they use\n */\n/**\n * Injectable stream manager interface for pause/resume during critical operations.\n *\n * WHY THIS IS NEEDED:\n * PerpsStreamManager is a React-based mobile-specific singleton that:\n * - Uses React Context for subscription management\n * - Uses react-native-performance for tracing\n * - Directly accesses Engine.context (mobile singleton pattern)\n * - Manages WebSocket connections with throttling/caching\n *\n * PerpsController only needs pause/resume during critical operations (withStreamPause method)\n * to prevent stale UI updates during batch operations. The minimal interface allows:\n * - Mobile: Wrap existing singleton (streamManager[channel].pause())\n * - Extension: Implement with whatever streaming solution they use\n */\nexport type PerpsStreamManager = {\n pauseChannel(channel: string): void;\n resumeChannel(channel: string): void;\n clearAllChannels(): void;\n};\n\n/**\n * Injectable performance monitor interface.\n * Wraps react-native-performance or browser Performance API.\n */\nexport type PerpsPerformance = {\n now(): number;\n};\n\n/**\n * Injectable tracer interface for Sentry/observability tracing.\n * Services use this to create spans and measure operation durations.\n *\n * Note: trace() returns void because services use name/id pairs to identify traces.\n * The actual span management is handled internally by the platform adapter.\n */\nexport type PerpsTracer = {\n trace(params: {\n name: PerpsTraceName;\n id: string;\n op: string;\n tags?: Record<string, PerpsTraceValue>;\n data?: Record<string, PerpsTraceValue>;\n }): void;\n\n endTrace(params: {\n name: PerpsTraceName;\n id: string;\n data?: Record<string, PerpsTraceValue>;\n }): void;\n\n setMeasurement(name: string, value: number, unit: string): void;\n\n addBreadcrumb(breadcrumb: {\n category: string;\n message: string;\n level: 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';\n data?: Record<string, unknown>;\n }): void;\n};\n\n// ============================================================================\n// Minimal local types for cross-controller DI (no external controller imports)\n// ============================================================================\n\n/**\n * Minimal typed-message params passed to keyring for EIP-712 signing.\n * Structurally matches KeyringController's TypedMessageParams.\n */\nexport type PerpsTypedMessageParams = {\n from: string;\n data: unknown;\n};\n\n/**\n * Minimal transaction params passed to TransactionController.addTransaction.\n * Only the fields PerpsController actually sets.\n */\nexport type PerpsTransactionParams = {\n from: string;\n to?: string;\n value?: string;\n data?: string;\n gas?: string;\n};\n\n/**\n * Options passed to TransactionController.addTransaction.\n */\nexport type PerpsAddTransactionOptions = {\n networkClientId: string;\n origin?: string;\n type?: string;\n skipInitialGasEstimate?: boolean;\n};\n\n/**\n * Minimal account shape read from AccountTreeController.\n * Only the fields PerpsController and its services actually use.\n */\nexport type PerpsInternalAccount = {\n address: string;\n type: string;\n id: string;\n};\n\n/**\n * Minimal remote feature flag state shape.\n * Only the remoteFeatureFlags record is needed by PerpsController.\n */\nexport type PerpsRemoteFeatureFlagState = {\n remoteFeatureFlags: Record<string, unknown>;\n};\n\n/**\n * Platform dependencies for PerpsController and services.\n *\n * Architecture:\n * - Observability: logger, debugLogger, metrics, performance, tracer\n * - Platform: streamManager (mobile/extension specific)\n * - Cache: cache invalidation for standalone queries\n * - Rewards: delegated rewards interaction (DI — no RewardsController in Core yet)\n *\n * Cross-controller communication uses the messenger pattern (messenger.call).\n * Only rewards remains as DI because RewardsController is not yet in Core.\n */\nexport type PerpsPlatformDependencies = {\n // === Observability (stateless utilities) ===\n logger: PerpsLogger;\n debugLogger: PerpsDebugLogger;\n metrics: PerpsMetrics;\n performance: PerpsPerformance;\n tracer: PerpsTracer;\n\n // === Platform Services (mobile/extension specific) ===\n streamManager: PerpsStreamManager;\n\n // === Feature Flags (platform-specific version gating) ===\n featureFlags: {\n /**\n * Validate a version-gated feature flag against current app version.\n * Returns true if flag is enabled AND app meets minimum version,\n * false if flag is disabled, or undefined if flag is misconfigured/overridden.\n *\n * Platform-specific because it uses react-native-device-info (mobile)\n * or browser APIs (extension) to get the app version.\n */\n validateVersionGated(flag: VersionGatedFeatureFlag): boolean | undefined;\n };\n\n // === Market Data Formatting (platform-specific number formatting) ===\n marketDataFormatters: MarketDataFormatters;\n\n // === Cache Invalidation (for standalone query caches) ===\n cacheInvalidator: PerpsCacheInvalidator;\n\n // === Rewards (DI — no RewardsController in Core yet) ===\n rewards: {\n /**\n * Get fee discount for an account from the RewardsController.\n * Returns discount in basis points (e.g., 6500 = 65% discount)\n */\n getPerpsDiscountForAccount(\n caipAccountId: `${string}:${string}:${string}`,\n ): Promise<number>;\n };\n};\n\n/**\n * Cache types that can be invalidated.\n * Used by standalone query caches (e.g., usePerpsPositionForAsset).\n */\nexport type PerpsCacheType = 'positions' | 'accountState' | 'markets';\n\n/**\n * Parameters for invalidating a specific cache type.\n */\nexport type InvalidateCacheParams = {\n /** The type of cache to invalidate */\n cacheType: PerpsCacheType;\n};\n\n/**\n * Cache invalidation interface for standalone query caches.\n * Allows services to signal when data has changed without depending on\n * mobile-specific implementations.\n */\nexport type PerpsCacheInvalidator = {\n /**\n * Invalidate a specific cache type.\n * Notifies all subscribers that cached data is stale.\n */\n invalidate(params: InvalidateCacheParams): void;\n\n /**\n * Invalidate all cache types.\n */\n invalidateAll(): void;\n};\n\n// ============================================================================\n// Market Data Formatting\n// ============================================================================\n\n/**\n * Injectable formatters for market data transformation.\n * Decouples marketDataTransform from mobile-specific intl/formatUtils imports.\n *\n * Range configs are opaque (unknown[]) because the concrete type\n * (FiatRangeConfig on mobile) is platform-specific. The formatter\n * implementation casts internally.\n */\nexport type MarketDataFormatters = {\n /** Format a number as a USD volume string (e.g., '$1.2B', '$850M') */\n formatVolume(value: number): string;\n /** Format a number as a USD fiat string with adaptive precision */\n formatPerpsFiat(value: number, options?: { ranges?: unknown[] }): string;\n /** Format a number as a percentage string (e.g., '2.50%', '-1.80%') */\n formatPercentage(percent: number): string;\n /** Universal price ranges for formatting (opaque to portable code) */\n priceRangesUniversal: unknown[];\n};\n\n// ============================================================================\n// Payment Token (portable replacement for mobile-only AssetType)\n// ============================================================================\n\n/**\n * Minimal payment token for deposit flow.\n * Only the fields actually used by PerpsController are included.\n * Replaces the mobile-only AssetType (which extends TokenI and uses ImageSourcePropType).\n */\nexport type PaymentToken = {\n description?: string;\n address: string;\n chainId?: string;\n symbol?: string;\n};\n\n/**\n * Selected pay-with token shape used in PerpsController state, pending trade config,\n * selectors, and UI hooks. Use this type everywhere this shape is needed.\n */\nexport type PerpsSelectedPaymentToken = {\n description?: string;\n address: string;\n chainId: string;\n symbol?: string;\n};\n\n// ============================================================================\n// Version-gated Feature Flag (portable)\n// ============================================================================\n\n/**\n * Structure for a version-gated feature flag from LaunchDarkly.\n * Portable: no platform-specific imports.\n */\nexport type VersionGatedFeatureFlag = {\n enabled: boolean;\n minimumVersion: string;\n};\n\n/**\n * Type guard for VersionGatedFeatureFlag.\n * Pure logic, no platform dependencies.\n *\n * @param value - The value to check.\n * @returns True if the value is a VersionGatedFeatureFlag.\n */\nexport function isVersionGatedFeatureFlag(\n value: unknown,\n): value is VersionGatedFeatureFlag {\n return (\n typeof value === 'object' &&\n value !== null &&\n hasProperty(value, 'enabled') &&\n hasProperty(value, 'minimumVersion') &&\n typeof (value as { enabled: unknown }).enabled === 'boolean' &&\n typeof (value as { minimumVersion: unknown }).minimumVersion === 'string'\n );\n}\n\n// ============================================================================\n// Sub-module type re-exports\n// These types live in separate files within types/ and need to be accessible\n// from the root barrel via `export * from './types'`.\n// ============================================================================\nexport type * from './perps-types';\nexport * from './transactionTypes';\n// hyperliquid-types: selective export to avoid OrderType clash with main types\nexport type {\n AssetPosition,\n SpotBalance,\n PerpsUniverse,\n PerpsAssetCtx,\n PredictedFunding,\n FrontendOrder,\n SDKOrderParams,\n ClearinghouseStateResponse,\n SpotClearinghouseStateResponse,\n MetaResponse,\n FrontendOpenOrdersResponse,\n AllMidsResponse,\n MetaAndAssetCtxsResponse,\n PredictedFundingsResponse,\n SpotMetaResponse,\n} from './hyperliquid-types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAA8C;AAW9C;;;;GAIG;AACH,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,yDAA6B,CAAA;IAC7B,qDAAyB,CAAA;IACzB,mDAAuB,CAAA;IACvB,2DAA+B,CAAA;AACjC,CAAC,EALW,wBAAwB,wCAAxB,wBAAwB,QAKnC;AA+o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,iBAAiB;IAC5B,eAAe,EAAE,wBAAwB;IACzC,kBAAkB,EAAE,2BAA2B;IAC/C,UAAU,EAAE,mBAAmB;CACvB,CAAC;AA4UX;;;;;;GAMG;AACH,SAAgB,yBAAyB,CACvC,KAAc;IAEd,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,IAAA,mBAAW,EAAC,KAAK,EAAE,SAAS,CAAC;QAC7B,IAAA,mBAAW,EAAC,KAAK,EAAE,gBAAgB,CAAC;QACpC,OAAQ,KAA8B,CAAC,OAAO,KAAK,SAAS;QAC5D,OAAQ,KAAqC,CAAC,cAAc,KAAK,QAAQ,CAC1E,CAAC;AACJ,CAAC;AAXD,8DAWC;AAQD,yDAAmC","sourcesContent":["import { hasProperty } from '@metamask/utils';\nimport type {\n CaipAccountId,\n CaipChainId,\n CaipAssetId,\n Hex,\n} from '@metamask/utils';\n\nimport type { CandlePeriod, TimeDuration } from '../constants/chartConfig';\nimport type { CandleData, OrderType } from './perps-types';\n\n/**\n * Connection states for WebSocket management.\n * Defined inline to avoid importing from Mobile-only services.\n * Must stay in sync with HyperLiquidClientService.WebSocketConnectionState.\n */\nexport enum WebSocketConnectionState {\n Disconnected = 'disconnected',\n Connecting = 'connecting',\n Connected = 'connected',\n Disconnecting = 'disconnecting',\n}\n\n/** Provider-agnostic raw ledger update. Fields match the common shape across providers. */\nexport type RawLedgerUpdate = {\n hash: string;\n time: number;\n delta: {\n type: string;\n usdc?: string;\n coin?: string;\n };\n};\n\n// User history item for deposits and withdrawals\nexport type UserHistoryItem = {\n id: string;\n timestamp: number;\n type: 'deposit' | 'withdrawal';\n amount: string;\n asset: string;\n txHash: string;\n status: 'completed' | 'failed' | 'pending';\n details: {\n source: string;\n bridgeContract?: string;\n recipient?: string;\n blockNumber?: string;\n chainId?: string;\n synthetic?: boolean;\n };\n};\n\n// Parameters for getting user history\nexport type GetUserHistoryParams = {\n startTime?: number;\n endTime?: number;\n accountId?: CaipAccountId;\n};\n\n// Trade configuration saved per market per network\nexport type TradeConfiguration = {\n leverage?: number; // Last used leverage for this market\n // Pending trade configuration (temporary, expires after 5 minutes)\n pendingConfig?: {\n amount?: string; // Order size in USD\n leverage?: number; // Leverage\n takeProfitPrice?: string; // Take profit price\n stopLossPrice?: string; // Stop loss price\n limitPrice?: string; // Limit price (for limit orders)\n orderType?: OrderType; // Market vs limit\n timestamp: number; // When the config was saved (for expiration check)\n };\n};\n\n// Market asset type classification (reusable across components)\nexport type MarketType = 'crypto' | 'equity' | 'commodity' | 'forex';\n\n// Market type filter for UI category badges\n// Note: 'stocks' maps to 'equity' and 'commodities' maps to 'commodity' in the data model\nexport type MarketTypeFilter =\n | 'all'\n | 'crypto'\n | 'stocks'\n | 'commodities'\n | 'forex'\n | 'new';\n\n// Input method for amount entry tracking\nexport type InputMethod =\n | 'default'\n | 'slider'\n | 'keypad'\n | 'percentage'\n | 'max';\n\n// Trade action type - differentiates first trade on a market from adding to existing position\nexport type TradeAction = 'create_position' | 'increase_exposure';\n\n// Unified tracking data interface for analytics events (never persisted in state)\n// Note: Numeric values are already parsed by hooks (usePerpsOrderFees, etc.) from API responses\nexport type TrackingData = {\n // Common to all operations\n totalFee: number; // Total fee for the operation (parsed by hooks)\n marketPrice: number; // Market price at operation time (parsed by hooks)\n metamaskFee?: number; // MetaMask fee amount (parsed by hooks)\n metamaskFeeRate?: number; // MetaMask fee rate (parsed by hooks)\n feeDiscountPercentage?: number; // Fee discount percentage (parsed by hooks)\n estimatedPoints?: number; // Estimated reward points (parsed by hooks)\n\n // Order-specific (used for trade operations)\n marginUsed?: number; // Margin required for this order (calculated by hooks)\n inputMethod?: InputMethod; // How user set the amount\n tradeAction?: TradeAction; // 'create_position' for first trade, 'increase_exposure' for adding to existing\n\n // Close-specific (used for position close operations)\n receivedAmount?: number; // Amount user receives after close (calculated by hooks)\n realizedPnl?: number; // Realized P&L from close (calculated by hooks)\n\n // Entry source for analytics (e.g., 'trending' for Trending page discovery)\n source?: string;\n\n // Pay with any token: true when user paid with a custom token (not Perps balance)\n tradeWithToken?: boolean;\n mmPayTokenSelected?: string; // Token symbol when tradeWithToken is true\n mmPayNetworkSelected?: string; // chainId when tradeWithToken is true\n\n // A/B test context to attribute trade events to specific experiments\n abTests?: Record<string, string>;\n};\n\n// TP/SL-specific tracking data for analytics events\nexport type TPSLTrackingData = {\n direction: 'long' | 'short'; // Position direction\n source: string; // Source of the TP/SL update (e.g., 'tp_sl_view', 'position_card')\n positionSize: number; // Unsigned position size for metrics\n takeProfitPercentage?: number; // Take profit percentage from entry\n stopLossPercentage?: number; // Stop loss percentage from entry\n isEditingExistingPosition?: boolean; // true = editing existing position, false = creating for new order\n entryPrice?: number; // Entry price for percentage calculations\n};\n\n// MetaMask Perps API order parameters for PerpsController\nexport type OrderParams = {\n symbol: string; // Asset identifier (e.g., 'ETH', 'BTC', 'xyz:TSLA')\n isBuy: boolean; // true = BUY order, false = SELL order\n size: string; // Order size as string (derived for validation, provider recalculates from usdAmount)\n orderType: OrderType; // Order type\n price?: string; // Limit price (required for limit orders)\n reduceOnly?: boolean; // Reduce-only flag\n isFullClose?: boolean; // Indicates closing 100% of position (skips $10 minimum validation)\n timeInForce?: 'GTC' | 'IOC' | 'ALO'; // Time in force\n\n // USD as source of truth (hybrid approach)\n usdAmount?: string; // USD amount (primary source of truth, provider calculates size from this)\n priceAtCalculation?: number; // Price snapshot when size was calculated (for slippage validation)\n maxSlippageBps?: number; // Slippage tolerance in basis points (e.g., 100 = 1%, default if not provided)\n\n // Advanced order features\n takeProfitPrice?: string; // Take profit price\n stopLossPrice?: string; // Stop loss price\n clientOrderId?: string; // Optional client-provided order ID\n slippage?: number; // Slippage tolerance for market orders (default: ORDER_SLIPPAGE_CONFIG.DefaultMarketSlippageBps / 10000 = 3%)\n grouping?: 'na' | 'normalTpsl' | 'positionTpsl'; // Override grouping (defaults: 'na' without TP/SL, 'normalTpsl' with TP/SL)\n currentPrice?: number; // Current market price (avoids extra API call if provided)\n leverage?: number; // Leverage to apply for the order (e.g., 10 for 10x leverage)\n existingPositionLeverage?: number; // Existing position leverage for validation (protocol constraint)\n\n // Optional tracking data for MetaMetrics events\n trackingData?: TrackingData;\n\n // Multi-provider routing (optional: defaults to active/default provider)\n providerId?: PerpsProviderType; // Optional: override active provider for routing\n};\n\nexport type OrderResult = {\n success?: boolean;\n orderId?: string; // Order ID from exchange\n error?: string;\n filledSize?: string; // Amount filled\n averagePrice?: string; // Average execution price\n providerId?: PerpsProviderType; // Multi-provider: which provider executed this order (injected by aggregator)\n};\n\nexport type Position = {\n symbol: string; // Asset identifier (e.g., 'ETH', 'BTC', 'xyz:TSLA')\n size: string; // Signed position size (+ = LONG, - = SHORT)\n entryPrice: string; // Average entry price\n positionValue: string; // Total position value in USD\n unrealizedPnl: string; // Unrealized profit/loss\n marginUsed: string; // Margin currently used for this position\n leverage: {\n type: 'isolated' | 'cross'; // Margin type\n value: number; // Leverage multiplier\n rawUsd?: string; // USD amount (for isolated margin)\n };\n liquidationPrice: string | null; // Liquidation price (null if no risk)\n maxLeverage: number; // Maximum allowed leverage for this asset\n returnOnEquity: string; // ROE percentage\n cumulativeFunding: {\n // Funding payments history\n allTime: string; // Total funding since account opening\n sinceOpen: string; // Funding since position opened\n sinceChange: string; // Funding since last size change\n };\n takeProfitPrice?: string; // Take profit price (if set)\n stopLossPrice?: string; // Stop loss price (if set)\n takeProfitCount: number; // Take profit count, how many tps can affect the position\n stopLossCount: number; // Stop loss count, how many sls can affect the position\n providerId?: PerpsProviderType; // Multi-provider: which provider holds this position (injected by aggregator)\n};\n\n// Using 'type' instead of 'interface' for BaseController Json compatibility\nexport type AccountState = {\n availableBalance: string; // Based on HyperLiquid: withdrawable\n totalBalance: string; // Based on HyperLiquid: accountValue\n marginUsed: string; // Based on HyperLiquid: marginUsed\n unrealizedPnl: string; // Based on HyperLiquid: unrealizedPnl\n returnOnEquity: string; // Based on HyperLiquid: returnOnEquity adjusted for weighted margin\n /**\n * Per-sub-account balance breakdown (protocol-specific, optional)\n * Maps sub-account identifier to its balance details.\n *\n * Protocol examples:\n * - HyperLiquid HIP-3: '' or 'main' (main DEX), 'xyz' (HIP-3 builder DEX)\n * - dYdX: Sub-account numbers (e.g., '0', '1', '2')\n * - Other protocols: Vault IDs, pool IDs, margin account IDs, etc.\n *\n * Key: Sub-account identifier (protocol-specific string)\n * Value: Balance details for that sub-account\n */\n subAccountBreakdown?: Record<\n string,\n {\n availableBalance: string;\n totalBalance: string;\n }\n >;\n providerId?: PerpsProviderType; // Multi-provider: which provider this account state is from (injected by aggregator)\n};\n\nexport type ClosePositionParams = {\n symbol: string; // Asset identifier to close (e.g., 'ETH', 'BTC', 'xyz:TSLA')\n size?: string; // Size to close (omit for full close)\n orderType?: OrderType; // Close order type (default: market)\n price?: string; // Limit price (required for limit close)\n currentPrice?: number; // Current market price for validation\n\n // USD as source of truth (hybrid approach - same as OrderParams)\n usdAmount?: string; // USD amount (primary source of truth, provider calculates size from this)\n priceAtCalculation?: number; // Price snapshot when size was calculated (for slippage validation)\n maxSlippageBps?: number; // Slippage tolerance in basis points (e.g., 100 = 1%, default if not provided)\n\n // Optional tracking data for MetaMetrics events\n trackingData?: TrackingData;\n\n // Multi-provider routing (optional: defaults to active/default provider)\n providerId?: PerpsProviderType; // Optional: override active provider for routing\n\n /**\n * Optional live position data from WebSocket.\n * If provided, skips the REST API position fetch (avoids rate limiting issues).\n * If not provided, falls back to fetching positions via REST API cache.\n */\n position?: Position;\n};\n\nexport type ClosePositionsParams = {\n symbols?: string[]; // Optional: specific symbols to close (omit or empty array to close all)\n closeAll?: boolean; // Explicitly close all positions\n};\n\nexport type ClosePositionsResult = {\n success: boolean; // Overall success (true if at least one position closed)\n successCount: number; // Number of positions closed successfully\n failureCount: number; // Number of positions that failed to close\n results: {\n symbol: string;\n success: boolean;\n error?: string;\n }[];\n};\n\nexport type UpdateMarginParams = {\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n amount: string; // Amount to adjust as string (positive = add, negative = remove)\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n};\n\nexport type MarginResult = {\n success: boolean;\n error?: string;\n};\n\nexport type FlipPositionParams = {\n symbol: string; // Asset identifier to flip (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n position: Position; // Current position to flip\n};\n\nexport type InitializeResult = {\n success: boolean;\n error?: string;\n chainId?: string;\n};\n\nexport type ReadyToTradeResult = {\n ready: boolean;\n error?: string;\n walletConnected?: boolean;\n networkSupported?: boolean;\n authenticatedAddress?: string;\n};\n\nexport type DisconnectResult = {\n success: boolean;\n error?: string;\n};\n\nexport type MarketInfo = {\n name: string; // HyperLiquid: universe name (asset symbol)\n szDecimals: number; // HyperLiquid: size decimals\n maxLeverage: number; // HyperLiquid: max leverage\n marginTableId: number; // HyperLiquid: margin requirements table ID\n onlyIsolated?: true; // HyperLiquid: isolated margin only (optional, only when true)\n isDelisted?: true; // HyperLiquid: delisted status (optional, only when true)\n minimumOrderSize?: number; // Minimum order size in USD (protocol-specific)\n providerId?: PerpsProviderType; // Multi-provider: which provider this market comes from (injected by aggregator)\n};\n\n/**\n * Market data with prices for UI display\n * Protocol-agnostic interface for market information with formatted values\n */\nexport type PerpsMarketData = {\n /**\n * Token symbol (e.g., 'BTC', 'ETH')\n */\n symbol: string;\n /**\n * Full token name (e.g., 'Bitcoin', 'Ethereum')\n */\n name: string;\n /**\n * Maximum leverage available as formatted string (e.g., '40x', '25x')\n */\n maxLeverage: string;\n /**\n * Current price as formatted string (e.g., '$50,000.00')\n */\n price: string;\n /**\n * 24h price change as formatted string (e.g., '+$1,250.00', '-$850.50')\n */\n change24h: string;\n /**\n * 24h price change percentage as formatted string (e.g., '+2.5%', '-1.8%')\n */\n change24hPercent: string;\n /**\n * Trading volume as formatted string (e.g., '$1.2B', '$850M')\n */\n volume: string;\n /**\n * Open interest as formatted string (e.g., '$24.5M', '$1.2B')\n */\n openInterest?: string;\n /**\n * Next funding time in milliseconds since epoch (optional, market-specific)\n */\n nextFundingTime?: number;\n /**\n * Funding interval in hours (optional, market-specific)\n */\n fundingIntervalHours?: number;\n /**\n * Current funding rate as decimal (optional, from predictedFundings API)\n */\n fundingRate?: number;\n /**\n * Market source DEX identifier (HIP-3 support)\n * - null or undefined: Main validator DEX\n * - \"xyz\", \"abc\", etc: HIP-3 builder-deployed DEX\n */\n marketSource?: string | null;\n /**\n * Market asset type classification (optional)\n * - crypto: Cryptocurrency (default for most markets)\n * - equity: Stock/equity markets (HIP-3)\n * - commodity: Commodity markets (HIP-3)\n * - forex: Foreign exchange pairs (HIP-3)\n */\n marketType?: MarketType;\n /**\n * Whether this is a HIP-3 market (has DEX prefix like xyz:, flx:)\n * Used to distinguish between crypto (isHip3=false) and non-crypto markets\n */\n isHip3?: boolean;\n /**\n * Whether this is a new/uncategorized market (HIP-3 markets not yet in explicit mapping)\n * Used for the \"New\" filter tab\n */\n isNewMarket?: boolean;\n /**\n * Multi-provider: which provider this market data comes from (injected by aggregator)\n */\n providerId?: PerpsProviderType;\n /**\n * Indicates this market snapshot came from the last known good cache after live fetch failure.\n */\n isStale?: boolean;\n};\n\nexport type ToggleTestnetResult = {\n success: boolean;\n isTestnet: boolean;\n error?: string;\n};\n\nexport type AssetRoute = {\n assetId: CaipAssetId; // CAIP asset ID (e.g., \"eip155:42161/erc20:0xaf88.../default\")\n chainId: CaipChainId; // CAIP-2 chain ID where the bridge contract is located\n contractAddress: Hex; // Bridge contract address for deposits/withdrawals\n constraints?: {\n minAmount?: string; // Minimum deposit/withdrawal amount\n maxAmount?: string; // Maximum deposit/withdrawal amount\n estimatedTime?: string; // Estimated processing time (formatted string - deprecated, use estimatedMinutes)\n estimatedMinutes?: number; // Estimated processing time in minutes (raw value for UI formatting)\n fees?: {\n fixed?: number; // Fixed fee amount (e.g., 1 for 1 token)\n percentage?: number; // Percentage fee (e.g., 0.05 for 0.05%)\n token?: string; // Fee token symbol (e.g., 'USDC', 'ETH')\n };\n };\n};\n\nexport type SwitchProviderResult = {\n success: boolean;\n providerId: PerpsActiveProviderMode;\n error?: string;\n};\n\nexport type CancelOrderParams = {\n orderId: string; // Order ID to cancel\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n};\n\nexport type CancelOrderResult = {\n success: boolean;\n orderId?: string; // Cancelled order ID\n error?: string;\n providerId?: PerpsProviderType; // Multi-provider: source provider identifier\n};\n\nexport type BatchCancelOrdersParams = {\n orderId: string;\n symbol: string;\n}[];\n\nexport type CancelOrdersParams = {\n symbols?: string[]; // Optional: specific symbols (omit to cancel all orders)\n orderIds?: string[]; // Optional: specific order IDs (omit to cancel all orders for specified coins)\n cancelAll?: boolean; // Explicitly cancel all orders\n};\n\nexport type CancelOrdersResult = {\n success: boolean; // Overall success (true if at least one order cancelled)\n successCount: number; // Number of orders cancelled successfully\n failureCount: number; // Number of orders that failed to cancel\n results: {\n orderId: string;\n symbol: string;\n success: boolean;\n error?: string;\n }[];\n};\n\nexport type EditOrderParams = {\n orderId: string | number; // Order ID or client order ID to modify\n newOrder: OrderParams; // New order parameters\n};\n\nexport type DepositParams = {\n amount: string; // Amount to deposit\n assetId: CaipAssetId; // Asset to deposit (required for validation)\n fromChainId?: CaipChainId; // Source chain (defaults to current network)\n toChainId?: CaipChainId; // Destination chain (defaults to HyperLiquid Arbitrum)\n recipient?: Hex; // Recipient address (defaults to selected account)\n};\n\n/** Params for depositWithConfirmation: prepares transaction for confirmation screen */\nexport type DepositWithConfirmationParams = {\n /** Optional deposit amount (display/tracking; actual amount comes from prepared transaction) */\n amount?: string;\n /** If true, uses addTransaction instead of submit to avoid navigation (e.g. deposit + place order flow) */\n placeOrder?: boolean;\n};\n\nexport type DepositResult = {\n success: boolean;\n txHash?: string;\n error?: string;\n};\n\n// Enhanced deposit flow state types for multi-step deposits\nexport type DepositStatus =\n | 'idle' // No deposit in progress\n | 'preparing' // Analyzing route & preparing transactions\n | 'swapping' // Converting token (e.g., ETH → USDC)\n | 'bridging' // Cross-chain transfer\n | 'depositing' // Final deposit to HyperLiquid\n | 'success' // Deposit completed successfully\n | 'error'; // Deposit failed at any step\n\nexport type DepositFlowType =\n | 'direct' // Same chain, same token (USDC on Arbitrum)\n | 'swap' // Same chain, different token (ETH → USDC)\n | 'bridge' // Different chain, same token (USDC on Ethereum → Arbitrum)\n | 'swap_bridge'; // Different chain, different token (ETH on Ethereum → USDC on Arbitrum)\n\nexport type DepositStepInfo = {\n totalSteps: number; // Total number of steps in this flow\n currentStep: number; // Current step (0-based index)\n stepNames: string[]; // Human-readable step names\n stepTxHashes?: string[]; // Transaction hashes for each completed step\n};\n\nexport type WithdrawParams = {\n amount: string; // Amount to withdraw\n destination?: Hex; // Destination address (optional, defaults to current account)\n assetId?: CaipAssetId; // Asset to withdraw (defaults to USDC)\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n};\n\nexport type WithdrawResult = {\n success: boolean;\n txHash?: string;\n error?: string;\n withdrawalId?: string; // Unique ID for tracking\n estimatedArrivalTime?: number; // Provider-specific arrival time\n};\n\nexport type TransferBetweenDexsParams = {\n sourceDex: string; // Source DEX name ('' = main DEX, 'xyz' = HIP-3 DEX)\n destinationDex: string; // Destination DEX name ('' = main DEX, 'xyz' = HIP-3 DEX)\n amount: string; // USDC amount to transfer\n};\n\nexport type TransferBetweenDexsResult = {\n success: boolean;\n txHash?: string;\n error?: string;\n};\n\nexport type GetHistoricalPortfolioParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n};\n\nexport type HistoricalPortfolioResult = {\n accountValue1dAgo: string;\n timestamp: number;\n};\n\nexport type LiveDataConfig = {\n priceThrottleMs?: number; // ms between price updates (default: 2000)\n positionThrottleMs?: number; // ms between position updates (default: 5000)\n maxUpdatesPerSecond?: number; // hard limit to prevent UI blocking\n};\n\nexport type PerpsControllerConfig = {\n /**\n * Fallback blocked regions to use when RemoteFeatureFlagController fails to fetch.\n * The fallback is set by default if defined and replaced with remote block list once available.\n */\n fallbackBlockedRegions?: string[];\n /**\n * Fallback HIP-3 equity perps master switch to use when RemoteFeatureFlagController fails to fetch.\n * Controls whether HIP-3 (builder-deployed) DEXs are enabled.\n * The fallback is set by default if defined and replaced with remote feature flag once available.\n */\n fallbackHip3Enabled?: boolean;\n /**\n * Fallback HIP-3 market allowlist to use when RemoteFeatureFlagController fails to fetch.\n * Empty array = enable all markets (discovery mode), non-empty = allowlist specific markets.\n * Supports wildcards: \"xyz:*\" (all xyz markets), \"xyz\" (shorthand for \"xyz:*\"), \"BTC\" (main DEX market).\n * Only applies when HIP-3 is enabled.\n * The fallback is set by default if defined and replaced with remote feature flag once available.\n */\n fallbackHip3AllowlistMarkets?: string[];\n /**\n * Fallback HIP-3 market blocklist to use when RemoteFeatureFlagController fails to fetch.\n * Empty array = no blocking, non-empty = block specific markets.\n * Supports wildcards: \"xyz:*\" (block all xyz markets), \"xyz\" (shorthand for \"xyz:*\"), \"BTC\" (block main DEX market).\n * Always applied regardless of HIP-3 enabled state.\n * The fallback is set by default if defined and replaced with remote feature flag once available.\n */\n fallbackHip3BlocklistMarkets?: string[];\n\n /**\n * Per-provider credentials and configuration.\n * Nested by provider name so each provider's settings are self-contained\n * and new protocols can be added without polluting the top-level config.\n * Passed from the init file where `process.env.X` is babel-transformed at build time.\n */\n providerCredentials?: PerpsProviderCredentials;\n};\n\nexport type HyperLiquidCredentials = {\n /** Builder fee wallet address for testnet. Empty/omitted = uses BUILDER_FEE_CONFIG default. */\n builderAddressTestnet?: string;\n /** Builder fee wallet address for mainnet. Empty/omitted = uses BUILDER_FEE_CONFIG default. */\n builderAddressMainnet?: string;\n};\n\nexport type MYXCredentials = {\n /** Whether MYX provider is enabled via local env var. */\n enabled?: boolean;\n appIdTestnet?: string;\n apiSecretTestnet?: string;\n brokerAddressTestnet?: string;\n appIdMainnet?: string;\n apiSecretMainnet?: string;\n brokerAddressMainnet?: string;\n};\n\nexport type PerpsProviderCredentials = {\n hyperliquid?: HyperLiquidCredentials;\n myx?: MYXCredentials;\n};\n\nexport type PriceUpdate = {\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n price: string; // Current mid price (average of best bid and ask)\n timestamp: number; // Update timestamp\n percentChange24h?: string; // 24h price change percentage\n // Order book data (only available when includeOrderBook is true)\n bestBid?: string; // Best bid price (highest price buyers are willing to pay)\n bestAsk?: string; // Best ask price (lowest price sellers are willing to accept)\n spread?: string; // Ask - Bid spread\n markPrice?: string; // Mark price from oracle (used for liquidations)\n // Market data (only available when includeMarketData is true)\n funding?: number; // Current funding rate\n openInterest?: number; // Open interest in USD\n volume24h?: number; // 24h trading volume in USD\n providerId?: PerpsProviderType; // Multi-provider: price source (injected by aggregator)\n};\n\nexport type OrderFill = {\n orderId: string; // Order ID that was filled\n symbol: string; // Asset symbol\n side: string; // Normalized order side ('buy' or 'sell')\n size: string; // Fill size\n price: string; // Fill price\n pnl: string; // PNL\n direction: string; // Direction of the fill\n fee: string; // Fee paid\n feeToken: string; // Fee token symbol\n timestamp: number; // Fill timestamp\n startPosition?: string; // Start position\n success?: boolean; // Whether the order was filled successfully\n liquidation?: {\n liquidatedUser: string; // Address of the liquidated user. liquidatedUser isn't always the current user. It can also mean the fill filled another user's liquidation.\n markPx: string; // Mark price at liquidation\n method: string; // Liquidation method (e.g., 'market')\n };\n orderType?: 'take_profit' | 'stop_loss' | 'liquidation' | 'regular';\n detailedOrderType?: string; // Original order type from exchange\n providerId?: PerpsProviderType; // Multi-provider: which provider this fill occurred on (injected by aggregator)\n};\n\n// Parameter interfaces - all fully optional for better UX\nexport type CheckEligibilityParams = {\n blockedRegions: string[]; // List of blocked region codes (e.g., ['US', 'CN'])\n geoLocation: string; // User's geolocation from GeolocationController\n};\n\nexport type GetPositionsParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n includeHistory?: boolean; // Optional: include historical positions\n skipCache?: boolean; // Optional: bypass WebSocket cache and force API call (default: false)\n standalone?: boolean; // Optional: lightweight mode - skip full initialization, use standalone HTTP client (no wallet/WebSocket needed)\n userAddress?: string; // Optional: required when standalone is true - user address to query positions for\n};\n\nexport type GetAccountStateParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n source?: string; // Optional: source of the call for tracing (e.g., 'health_check', 'initial_connection')\n standalone?: boolean; // Optional: lightweight mode - skip full initialization, use standalone HTTP client (no wallet/WebSocket needed)\n userAddress?: string; // Optional: required when standalone is true - user address to query account state for\n};\n\nexport type GetOrderFillsParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n user?: Hex; // Optional: user address (defaults to selected account)\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n endTime?: number; // Optional: end timestamp (Unix milliseconds)\n limit?: number; // Optional: max number of results for pagination\n aggregateByTime?: boolean; // Optional: aggregate by time\n};\n\n/**\n * Parameters for getOrFetchFills - optimized cache-first fill retrieval.\n * Subset of GetOrderFillsParams for cache filtering.\n */\nexport type GetOrFetchFillsParams = {\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n symbol?: string; // Optional: filter by symbol\n};\n\nexport type GetOrdersParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n endTime?: number; // Optional: end timestamp (Unix milliseconds)\n limit?: number; // Optional: max number of results for pagination\n offset?: number; // Optional: offset for pagination\n skipCache?: boolean; // Optional: bypass WebSocket cache and force API call (default: false)\n standalone?: boolean; // Optional: lightweight mode - skip full initialization, use standalone HTTP client (no wallet/WebSocket needed)\n userAddress?: string; // Optional: required when standalone is true - user address to query orders for\n};\n\nexport type GetFundingParams = {\n accountId?: CaipAccountId; // Optional: defaults to selected account\n startTime?: number; // Optional: start timestamp (Unix milliseconds)\n endTime?: number; // Optional: end timestamp (Unix milliseconds)\n limit?: number; // Optional: max number of results for pagination\n offset?: number; // Optional: offset for pagination\n};\n\nexport type GetSupportedPathsParams = {\n isTestnet?: boolean; // Optional: override current testnet state\n assetId?: CaipAssetId; // Optional: filter by specific asset\n symbol?: string; // Optional: filter by asset symbol (e.g., 'USDC')\n chainId?: CaipChainId; // Optional: filter by chain (CAIP-2 format)\n};\n\n/** Placeholder for future filter/pagination params (e.g., validated, chain). Empty today so the API signature is stable. */\nexport type GetAvailableDexsParams = Record<string, never>;\n\nexport type GetMarketsParams = {\n symbols?: string[]; // Optional symbol filter (e.g., ['BTC', 'xyz:XYZ100'])\n dex?: string; // HyperLiquid HIP-3: DEX name (empty string '' or undefined for main DEX). Other protocols: ignored.\n skipFilters?: boolean; // Skip market filtering (both allowlist and blocklist, default: false). When true, returns all markets without filtering.\n standalone?: boolean; // Lightweight mode: skip full initialization, only fetch market metadata (no wallet/WebSocket needed). Only main DEX markets returned. Use for discovery use cases like checking if a perps market exists.\n};\n\nexport type SubscribePricesParams = {\n symbols: string[];\n callback: (prices: PriceUpdate[]) => void;\n throttleMs?: number; // Future: per-subscription throttling\n includeOrderBook?: boolean; // Optional: include bid/ask data from L2 book\n includeMarketData?: boolean; // Optional: include funding, open interest, volume data\n};\n\nexport type SubscribePositionsParams = {\n callback: (positions: Position[]) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n includeHistory?: boolean; // Future: include historical data\n};\n\nexport type SubscribeOrderFillsParams = {\n callback: (fills: OrderFill[], isSnapshot?: boolean) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n since?: number; // Future: only fills after timestamp\n};\n\nexport type SubscribeOrdersParams = {\n callback: (orders: Order[]) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n includeHistory?: boolean; // Optional: include filled/canceled orders\n};\n\nexport type SubscribeAccountParams = {\n callback: (account: AccountState | null) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n};\n\nexport type SubscribeOICapsParams = {\n callback: (caps: string[]) => void;\n accountId?: CaipAccountId; // Optional: defaults to selected account\n};\n\nexport type SubscribeCandlesParams = {\n symbol: string;\n interval: CandlePeriod;\n duration?: TimeDuration;\n callback: (data: CandleData) => void;\n onError?: (error: Error) => void;\n};\n\n/**\n * Single price level in the order book\n */\nexport type OrderBookLevel = {\n /** Price at this level */\n price: string;\n /** Size at this level (in base asset) */\n size: string;\n /** Cumulative size up to and including this level */\n total: string;\n /** Notional value in USD */\n notional: string;\n /** Cumulative notional up to and including this level */\n totalNotional: string;\n};\n\n/**\n * Full order book data with multiple price levels\n */\nexport type OrderBookData = {\n /** Bid levels (buy orders) - highest price first */\n bids: OrderBookLevel[];\n /** Ask levels (sell orders) - lowest price first */\n asks: OrderBookLevel[];\n /** Spread between best bid and best ask */\n spread: string;\n /** Spread as a percentage of mid price */\n spreadPercentage: string;\n /** Mid price (average of best bid and best ask) */\n midPrice: string;\n /** Timestamp of last update */\n lastUpdated: number;\n /** Maximum total size across all levels (for scaling depth bars) */\n maxTotal: string;\n};\n\nexport type SubscribeOrderBookParams = {\n /** Symbol to subscribe to (e.g., 'BTC', 'ETH') */\n symbol: string;\n /** Number of levels to return per side (default: 10) */\n levels?: number;\n /** Price aggregation significant figures (2-5, default: 5). Higher = finer granularity */\n nSigFigs?: 2 | 3 | 4 | 5;\n /** Mantissa for aggregation when nSigFigs is 5 (2 or 5). Controls finest price increments */\n mantissa?: 2 | 5;\n /** Callback function receiving order book updates */\n callback: (orderBook: OrderBookData) => void;\n /** Callback for errors */\n onError?: (error: Error) => void;\n};\n\nexport type LiquidationPriceParams = {\n entryPrice: number;\n leverage: number;\n direction: 'long' | 'short';\n positionSize?: number; // Optional: for more accurate calculations\n marginType?: 'isolated' | 'cross'; // Optional: defaults to isolated\n asset?: string; // Optional: for asset-specific maintenance margins\n};\n\nexport type MaintenanceMarginParams = {\n asset: string;\n positionSize?: number; // Optional: for tiered margin systems\n};\n\nexport type FeeCalculationParams = {\n orderType: 'market' | 'limit';\n isMaker?: boolean;\n amount?: string;\n symbol: string; // Required: Asset identifier for HIP-3 fee calculation (e.g., 'BTC', 'xyz:TSLA')\n};\n\nexport type FeeCalculationResult = {\n // Total fees (protocol + MetaMask)\n feeRate?: number; // Total fee rate as decimal (e.g., 0.00145 for 0.145%), undefined when unavailable\n feeAmount?: number; // Total fee amount in USD (when amount is provided)\n\n // Protocol-specific base fees\n protocolFeeRate?: number; // Protocol fee rate (e.g., 0.00045 for HyperLiquid taker), undefined when unavailable\n protocolFeeAmount?: number; // Protocol fee amount in USD\n\n // MetaMask builder/revenue fee\n metamaskFeeRate?: number; // MetaMask fee rate (e.g., 0.001 for 0.1%), undefined when unavailable\n metamaskFeeAmount?: number; // MetaMask fee amount in USD\n\n // Optional detailed breakdown for transparency\n breakdown?: {\n baseFeeRate: number;\n volumeTier?: string;\n volumeDiscount?: number;\n stakingDiscount?: number;\n };\n};\n\nexport type UpdatePositionTPSLParams = {\n symbol: string; // Asset identifier (e.g., 'BTC', 'ETH', 'xyz:TSLA')\n takeProfitPrice?: string; // Optional: undefined to remove\n stopLossPrice?: string; // Optional: undefined to remove\n // Optional tracking data for MetaMetrics events\n trackingData?: TPSLTrackingData;\n providerId?: PerpsProviderType; // Multi-provider: optional provider override for routing\n /**\n * Optional live position data from WebSocket.\n * If provided, skips the REST API position fetch (avoids rate limiting issues).\n * If not provided, falls back to fetching positions via REST API.\n */\n position?: Position;\n};\n\nexport type Order = {\n orderId: string; // Order ID\n symbol: string; // Asset symbol (e.g., 'ETH', 'BTC')\n side: 'buy' | 'sell'; // Normalized order side\n orderType: OrderType; // Order type (market/limit)\n size: string; // Order size\n originalSize: string; // Original order size\n price: string; // Order price (for limit orders)\n filledSize: string; // Amount filled\n remainingSize: string; // Amount remaining\n status: 'open' | 'filled' | 'canceled' | 'rejected' | 'triggered' | 'queued'; // Normalized status\n timestamp: number; // Order timestamp\n lastUpdated?: number; // Last status update timestamp (optional - not provided by all APIs)\n // TODO: Consider creating separate type for OpenOrders (UI Orders) potentially if optional properties muddy up the original Order type\n takeProfitPrice?: string; // Take profit price (if set)\n stopLossPrice?: string; // Stop loss price (if set)\n stopLossOrderId?: string; // Stop loss order ID\n takeProfitOrderId?: string; // Take profit order ID\n detailedOrderType?: string; // Full order type from exchange (e.g., 'Take Profit Limit', 'Stop Market')\n isTrigger?: boolean; // Whether this is a trigger order (TP/SL)\n reduceOnly?: boolean; // Whether this is a reduce-only order\n isPositionTpsl?: boolean; // Whether this TP/SL is associated with the full position\n parentOrderId?: string; // Parent order ID for display-only synthetic TP/SL rows\n isSynthetic?: boolean; // Whether this order is synthetic (display-only, cancelable only when linked to a real child order ID)\n triggerPrice?: string; // Trigger condition price for trigger orders (e.g., TP/SL trigger level)\n providerId?: PerpsProviderType; // Multi-provider: which provider this order is on (injected by aggregator)\n};\n\nexport type Funding = {\n symbol: string; // Asset symbol (e.g., 'ETH', 'BTC')\n amountUsd: string; // Funding amount in USD (positive = received, negative = paid)\n rate?: string; // Funding rate applied (undefined when not available from provider)\n timestamp: number; // Funding payment timestamp\n transactionHash?: string; // Optional transaction hash\n};\n\nexport type PerpsProvider = {\n readonly protocolId: string;\n\n // Unified asset and route information\n getDepositRoutes(params?: GetSupportedPathsParams): AssetRoute[]; // Assets and their deposit routes\n getWithdrawalRoutes(params?: GetSupportedPathsParams): AssetRoute[]; // Assets and their withdrawal routes\n\n // Trading operations → Redux (persisted, optimistic updates)\n placeOrder(params: OrderParams): Promise<OrderResult>;\n editOrder(params: EditOrderParams): Promise<OrderResult>;\n cancelOrder(params: CancelOrderParams): Promise<CancelOrderResult>;\n cancelOrders?(params: BatchCancelOrdersParams): Promise<CancelOrdersResult>; // Optional: batch cancel for protocols that support it\n closePosition(params: ClosePositionParams): Promise<OrderResult>;\n closePositions?(params: ClosePositionsParams): Promise<ClosePositionsResult>; // Optional: batch close for protocols that support it\n updatePositionTPSL(params: UpdatePositionTPSLParams): Promise<OrderResult>;\n updateMargin(params: UpdateMarginParams): Promise<MarginResult>;\n getPositions(params?: GetPositionsParams): Promise<Position[]>;\n getAccountState(params?: GetAccountStateParams): Promise<AccountState>;\n getMarkets(params?: GetMarketsParams): Promise<MarketInfo[]>;\n getMarketDataWithPrices(): Promise<PerpsMarketData[]>;\n withdraw(params: WithdrawParams): Promise<WithdrawResult>; // API operation - stays in provider\n // Note: deposit() is handled by PerpsController routing (blockchain operation)\n validateDeposit(\n params: DepositParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific deposit validation\n validateOrder(\n params: OrderParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific order validation\n validateClosePosition(\n params: ClosePositionParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific position close validation\n validateWithdrawal(\n params: WithdrawParams,\n ): Promise<{ isValid: boolean; error?: string }>; // Protocol-specific withdrawal validation\n\n // Historical data operations\n /**\n * Historical trade fills - actual executed trades with exact prices and fees.\n * Purpose: Track what actually happened when orders were executed.\n * Example: Market long 1 ETH @ $50,000 → OrderFill with exact execution price and fees\n */\n getOrderFills(params?: GetOrderFillsParams): Promise<OrderFill[]>;\n\n /**\n * Get fills using WebSocket cache first, falling back to REST API.\n * OPTIMIZATION: Uses cached fills when available (0 API weight), only calls REST on cache miss.\n * Purpose: Prevent 429 errors during rapid market switching by reusing cached fills.\n *\n * @param params - Optional filter parameters (startTime, symbol)\n */\n getOrFetchFills(params?: GetOrFetchFillsParams): Promise<OrderFill[]>;\n\n /**\n * Get historical portfolio data\n * Purpose: Retrieve account value from previous periods for PnL tracking\n * Example: Get account value from yesterday to calculate 24h percentage change\n *\n * @param params - Optional parameters for historical portfolio retrieval\n */\n getHistoricalPortfolio(\n params?: GetHistoricalPortfolioParams,\n ): Promise<HistoricalPortfolioResult>;\n\n /**\n * Historical order lifecycle - order placement, modifications, and status changes.\n * Purpose: Track the complete journey of orders from request to completion.\n * Example: Limit buy 1 ETH @ $48,000 → Order with status 'open' → 'filled' when executed\n */\n getOrders(params?: GetOrdersParams): Promise<Order[]>;\n\n /**\n * Currently active open orders (real-time status).\n * Purpose: Show orders that are currently open/pending execution (not historical states).\n * Different from getOrders() which returns complete historical order lifecycle.\n * Example: Shows only orders that are actually open right now in the exchange.\n */\n getOpenOrders(params?: GetOrdersParams): Promise<Order[]>;\n\n /**\n * Historical funding payments - periodic costs/rewards for holding positions.\n * Purpose: Track ongoing expenses and income from position maintenance.\n * Example: Holding long ETH position → Funding payment of -$5.00 (you pay the funding)\n */\n getFunding(params?: GetFundingParams): Promise<Funding[]>;\n\n /**\n * Get user non-funding ledger updates (deposits, transfers, withdrawals)\n */\n getUserNonFundingLedgerUpdates(params?: {\n accountId?: string;\n startTime?: number;\n endTime?: number;\n }): Promise<RawLedgerUpdate[]>;\n\n /**\n * Get user history (deposits, withdrawals, transfers)\n */\n getUserHistory(params?: {\n accountId?: CaipAccountId;\n startTime?: number;\n endTime?: number;\n }): Promise<UserHistoryItem[]>;\n\n // Protocol-specific calculations\n calculateLiquidationPrice(params: LiquidationPriceParams): Promise<string>;\n calculateMaintenanceMargin(params: MaintenanceMarginParams): Promise<number>;\n getMaxLeverage(asset: string): Promise<number>;\n calculateFees(params: FeeCalculationParams): Promise<FeeCalculationResult>;\n\n // Live data subscriptions → Direct UI (NO Redux, maximum speed)\n subscribeToPrices(params: SubscribePricesParams): () => void;\n subscribeToPositions(params: SubscribePositionsParams): () => void;\n subscribeToOrderFills(params: SubscribeOrderFillsParams): () => void;\n subscribeToOrders(params: SubscribeOrdersParams): () => void;\n subscribeToAccount(params: SubscribeAccountParams): () => void;\n subscribeToOICaps(params: SubscribeOICapsParams): () => void;\n subscribeToCandles(params: SubscribeCandlesParams): () => void;\n subscribeToOrderBook(params: SubscribeOrderBookParams): () => void;\n\n // Live data configuration\n setLiveDataConfig(config: Partial<LiveDataConfig>): void;\n\n // Connection management\n toggleTestnet(): Promise<ToggleTestnetResult>;\n initialize(): Promise<InitializeResult>;\n isReadyToTrade(): Promise<ReadyToTradeResult>;\n disconnect(): Promise<DisconnectResult>;\n ping(timeoutMs?: number): Promise<void>; // Lightweight WebSocket health check with configurable timeout\n getWebSocketConnectionState?(): WebSocketConnectionState; // Optional: get current WebSocket connection state\n subscribeToConnectionState?(\n listener: (\n state: WebSocketConnectionState,\n reconnectionAttempt: number,\n ) => void,\n ): () => void; // Optional: subscribe to WebSocket connection state changes\n reconnect?(): Promise<void>; // Optional: manually trigger WebSocket reconnection\n\n // Block explorer\n getBlockExplorerUrl(address?: string): string;\n\n // Fee discount context (optional - for MetaMask reward discounts)\n setUserFeeDiscount?(discountBips: number | undefined): void;\n\n // HIP-3 (Builder-deployed DEXs) operations - optional for backward compatibility\n /**\n * Get list of available HIP-3 builder-deployed DEXs\n *\n * @param params - Optional parameters (reserved for future filters/pagination)\n * @returns Array of DEX names (empty string '' represents main DEX)\n */\n getAvailableDexs?(params?: GetAvailableDexsParams): Promise<string[]>;\n\n /**\n * Fetch historical OHLCV candle data for a symbol.\n * Optional: only providers that support historical candles need to implement this.\n */\n fetchHistoricalCandles?(options: {\n symbol: string;\n interval: CandlePeriod;\n limit?: number;\n endTime?: number;\n }): Promise<CandleData>;\n};\n\n// ============================================================================\n// Multi-Provider Aggregation Types (Phase 1)\n// ============================================================================\n\n/**\n * Provider identifier type for multi-provider support.\n * Add new providers here as they are implemented.\n */\nexport type PerpsProviderType = 'hyperliquid' | 'myx';\n\n/**\n * Active provider mode for PerpsController state.\n * - Direct providers: 'hyperliquid', 'myx'\n * - 'aggregated': Multi-provider aggregation mode\n */\nexport type PerpsActiveProviderMode = PerpsProviderType | 'aggregated';\n\n/**\n * Aggregation mode for read operations.\n * - 'all': Aggregate data from all registered providers\n * - 'active': Only aggregate from providers with active connections\n * - 'specific': Aggregate from a specific subset of providers\n */\nexport type AggregationMode = 'all' | 'active' | 'specific';\n\n/**\n * Routing strategy for write operations.\n * Phase 1 only supports 'default_provider' - advanced strategies deferred to Phase 3.\n */\nexport type RoutingStrategy = 'default_provider';\n\n/**\n * Configuration for AggregatedPerpsProvider\n */\nexport type AggregatedProviderConfig = {\n /** Map of provider ID to provider instance */\n providers: Map<PerpsProviderType, PerpsProvider>;\n /** Default provider for write operations when providerId not specified */\n defaultProvider: PerpsProviderType;\n /** Aggregation mode for read operations (default: 'all') */\n aggregationMode?: AggregationMode;\n /** Platform dependencies for logging, metrics, etc. */\n infrastructure: PerpsPlatformDependencies;\n};\n\n/**\n * Provider-specific error with context for multi-provider error handling\n */\nexport type ProviderError = {\n /** Which provider the error originated from */\n providerId: PerpsProviderType;\n /** Human-readable error message */\n message: string;\n /** Original error object if available */\n originalError?: Error;\n /** Whether the operation can be retried */\n isRetryable?: boolean;\n};\n\n/**\n * Aggregated account state combining data from multiple providers\n */\nexport type AggregatedAccountState = {\n /** Combined totals across all providers */\n total: AccountState;\n /** Per-provider breakdown */\n byProvider: Map<PerpsProviderType, AccountState>;\n};\n\n// ============================================================================\n// Injectable Dependency Interfaces\n// These interfaces enable dependency injection for platform-specific services,\n// allowing PerpsController to be moved to core without mobile-specific imports.\n// ============================================================================\n\n/**\n * Injectable logger interface for error reporting.\n * Allows core package to be platform-agnostic (mobile: Sentry, extension: different impl)\n */\nexport type PerpsLogger = {\n error(\n error: Error,\n options?: {\n tags?: Record<string, string | number>;\n context?: { name: string; data: Record<string, unknown> };\n extras?: Record<string, unknown>;\n },\n ): void;\n};\n\n/**\n * Analytics events specific to Perps feature.\n * These are the actual event names sent to analytics backend.\n * Values must match the corresponding MetaMetricsEvents values in mobile for compatibility.\n *\n * When migrating to core monorepo, this enum travels with PerpsController.\n */\nexport enum PerpsAnalyticsEvent {\n WithdrawalTransaction = 'Perp Withdrawal Transaction',\n TradeTransaction = 'Perp Trade Transaction',\n PositionCloseTransaction = 'Perp Position Close Transaction',\n OrderCancelTransaction = 'Perp Order Cancel Transaction',\n ScreenViewed = 'Perp Screen Viewed',\n UiInteraction = 'Perp UI Interaction',\n RiskManagement = 'Perp Risk Management',\n PerpsError = 'Perp Error',\n}\n\n/**\n * Perps-specific trace names. These must match TraceName enum values in mobile.\n * When in core monorepo, this defines the valid trace names for Perps operations.\n */\nexport type PerpsTraceName =\n | 'Perps Open Position'\n | 'Perps Close Position'\n | 'Perps Deposit'\n | 'Perps Withdraw'\n | 'Perps Place Order'\n | 'Perps Edit Order'\n | 'Perps Cancel Order'\n | 'Perps Update TP/SL'\n | 'Perps Update Margin'\n | 'Perps Flip Position'\n | 'Perps Order Submission Toast'\n | 'Perps Market Data Update'\n | 'Perps Order View'\n | 'Perps Tab View'\n | 'Perps Market List View'\n | 'Perps Position Details View'\n | 'Perps Adjust Margin View'\n | 'Perps Order Details View'\n | 'Perps Order Book View'\n | 'Perps Flip Position Sheet'\n | 'Perps Transactions View'\n | 'Perps Order Fills Fetch'\n | 'Perps Orders Fetch'\n | 'Perps Funding Fetch'\n | 'Perps Get Positions'\n | 'Perps Get Account State'\n | 'Perps Get Historical Portfolio'\n | 'Perps Get Markets'\n | 'Perps Fetch Historical Candles'\n | 'Perps WebSocket Connected'\n | 'Perps WebSocket Disconnected'\n | 'Perps WebSocket First Positions'\n | 'Perps WebSocket First Orders'\n | 'Perps WebSocket First Account'\n | 'Perps Data Lake Report'\n | 'Perps Rewards API Call'\n | 'Perps Close Position View'\n | 'Perps Withdraw View'\n | 'Perps Connection Establishment'\n | 'Perps Account Switch Reconnection'\n | 'Perps Market Data Preload'\n | 'Perps User Data Preload';\n\n/**\n * Perps trace name constants. Values match TraceName enum in mobile.\n * When in core, these ARE the source of truth - mobile will re-export from core.\n */\nexport const PerpsTraceNames = {\n // Trading operations\n PlaceOrder: 'Perps Place Order',\n EditOrder: 'Perps Edit Order',\n CancelOrder: 'Perps Cancel Order',\n ClosePosition: 'Perps Close Position',\n UpdateTpsl: 'Perps Update TP/SL',\n UpdateMargin: 'Perps Update Margin',\n FlipPosition: 'Perps Flip Position',\n\n // Account operations\n Withdraw: 'Perps Withdraw',\n Deposit: 'Perps Deposit',\n\n // Market data\n GetPositions: 'Perps Get Positions',\n GetAccountState: 'Perps Get Account State',\n GetMarkets: 'Perps Get Markets',\n OrderFillsFetch: 'Perps Order Fills Fetch',\n OrdersFetch: 'Perps Orders Fetch',\n FundingFetch: 'Perps Funding Fetch',\n GetHistoricalPortfolio: 'Perps Get Historical Portfolio',\n FetchHistoricalCandles: 'Perps Fetch Historical Candles',\n\n // Data lake\n DataLakeReport: 'Perps Data Lake Report',\n\n // WebSocket\n WebsocketConnected: 'Perps WebSocket Connected',\n WebsocketDisconnected: 'Perps WebSocket Disconnected',\n WebsocketFirstPositions: 'Perps WebSocket First Positions',\n WebsocketFirstOrders: 'Perps WebSocket First Orders',\n WebsocketFirstAccount: 'Perps WebSocket First Account',\n\n // Other\n RewardsApiCall: 'Perps Rewards API Call',\n ConnectionEstablishment: 'Perps Connection Establishment',\n AccountSwitchReconnection: 'Perps Account Switch Reconnection',\n MarketDataPreload: 'Perps Market Data Preload',\n UserDataPreload: 'Perps User Data Preload',\n} as const satisfies Record<string, PerpsTraceName>;\n\n/**\n * Perps trace operation constants. Values match TraceOperation enum in mobile.\n * These categorize traces by type of operation for Sentry/observability filtering.\n */\nexport const PerpsTraceOperations = {\n Operation: 'perps.operation',\n OrderSubmission: 'perps.order_submission',\n PositionManagement: 'perps.position_management',\n MarketData: 'perps.market_data',\n} as const;\n\n/**\n * Values allowed in trace data/tags. Matches Sentry's TraceValue type.\n */\nexport type PerpsTraceValue = string | number | boolean;\n\n/**\n * Properties allowed in analytics events. More constrained than unknown.\n * Named PerpsAnalyticsProperties to avoid conflict with PERPS_EVENT_PROPERTY\n * constant object from eventNames.ts (which contains property key names).\n */\nexport type PerpsAnalyticsProperties = Record<\n string,\n string | number | boolean | Record<string, string> | null | undefined\n>;\n\n/**\n * Injectable metrics interface for analytics.\n * Allows core package to work with different analytics backends.\n */\nexport type PerpsMetrics = {\n isEnabled(): boolean;\n\n /**\n * Track a Perps-specific analytics event with properties.\n * This abstracts away the MetricsEventBuilder pattern used in mobile.\n *\n * @param event - The Perps analytics event type (enum with actual event name values)\n * @param properties - Type-safe key-value properties to attach to the event\n */\n trackPerpsEvent(\n event: PerpsAnalyticsEvent,\n properties: PerpsAnalyticsProperties,\n ): void;\n};\n\n/**\n * Injectable debug logger for development logging.\n * Only logs in development mode.\n * Accepts `unknown` to allow logging error objects from catch blocks.\n */\nexport type PerpsDebugLogger = {\n log(...args: unknown[]): void;\n};\n\n/**\n * Injectable stream manager interface for pause/resume during critical operations.\n *\n * WHY THIS IS NEEDED:\n * PerpsStreamManager is a React-based mobile-specific singleton that:\n * - Uses React Context for subscription management\n * - Uses react-native-performance for tracing\n * - Directly accesses Engine.context (mobile singleton pattern)\n * - Manages WebSocket connections with throttling/caching\n *\n * PerpsController only needs pause/resume during critical operations (withStreamPause method)\n * to prevent stale UI updates during batch operations. The minimal interface allows:\n * - Mobile: Wrap existing singleton (streamManager[channel].pause())\n * - Extension: Implement with whatever streaming solution they use\n */\n/**\n * Injectable stream manager interface for pause/resume during critical operations.\n *\n * WHY THIS IS NEEDED:\n * PerpsStreamManager is a React-based mobile-specific singleton that:\n * - Uses React Context for subscription management\n * - Uses react-native-performance for tracing\n * - Directly accesses Engine.context (mobile singleton pattern)\n * - Manages WebSocket connections with throttling/caching\n *\n * PerpsController only needs pause/resume during critical operations (withStreamPause method)\n * to prevent stale UI updates during batch operations. The minimal interface allows:\n * - Mobile: Wrap existing singleton (streamManager[channel].pause())\n * - Extension: Implement with whatever streaming solution they use\n */\nexport type PerpsStreamManager = {\n pauseChannel(channel: string): void;\n resumeChannel(channel: string): void;\n clearAllChannels(): void;\n};\n\n/**\n * Injectable performance monitor interface.\n * Wraps react-native-performance or browser Performance API.\n */\nexport type PerpsPerformance = {\n now(): number;\n};\n\n/**\n * Injectable tracer interface for Sentry/observability tracing.\n * Services use this to create spans and measure operation durations.\n *\n * Note: trace() returns void because services use name/id pairs to identify traces.\n * The actual span management is handled internally by the platform adapter.\n */\nexport type PerpsTracer = {\n trace(params: {\n name: PerpsTraceName;\n id: string;\n op: string;\n tags?: Record<string, PerpsTraceValue>;\n data?: Record<string, PerpsTraceValue>;\n }): void;\n\n endTrace(params: {\n name: PerpsTraceName;\n id: string;\n data?: Record<string, PerpsTraceValue>;\n }): void;\n\n setMeasurement(name: string, value: number, unit: string): void;\n\n addBreadcrumb(breadcrumb: {\n category: string;\n message: string;\n level: 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';\n data?: Record<string, unknown>;\n }): void;\n};\n\n// ============================================================================\n// Minimal local types for cross-controller DI (no external controller imports)\n// ============================================================================\n\n/**\n * Minimal typed-message params passed to keyring for EIP-712 signing.\n * Structurally matches KeyringController's TypedMessageParams.\n */\nexport type PerpsTypedMessageParams = {\n from: string;\n data: unknown;\n};\n\n/**\n * Minimal transaction params passed to TransactionController.addTransaction.\n * Only the fields PerpsController actually sets.\n */\nexport type PerpsTransactionParams = {\n from: string;\n to?: string;\n value?: string;\n data?: string;\n gas?: string;\n};\n\n/**\n * Options passed to TransactionController.addTransaction.\n */\nexport type PerpsAddTransactionOptions = {\n networkClientId: string;\n origin?: string;\n type?: string;\n skipInitialGasEstimate?: boolean;\n};\n\n/**\n * Minimal account shape read from AccountTreeController.\n * Only the fields PerpsController and its services actually use.\n */\nexport type PerpsInternalAccount = {\n address: string;\n type: string;\n id: string;\n};\n\n/**\n * Minimal remote feature flag state shape.\n * Only the remoteFeatureFlags record is needed by PerpsController.\n */\nexport type PerpsRemoteFeatureFlagState = {\n remoteFeatureFlags: Record<string, unknown>;\n};\n\n/**\n * Platform dependencies for PerpsController and services.\n *\n * Architecture:\n * - Observability: logger, debugLogger, metrics, performance, tracer\n * - Platform: streamManager (mobile/extension specific)\n * - Cache: cache invalidation for standalone queries\n * - Rewards: delegated rewards interaction (DI — no RewardsController in Core yet)\n *\n * Cross-controller communication uses the messenger pattern (messenger.call).\n * Only rewards remains as DI because RewardsController is not yet in Core.\n */\nexport type PerpsPlatformDependencies = {\n // === Observability (stateless utilities) ===\n logger: PerpsLogger;\n debugLogger: PerpsDebugLogger;\n metrics: PerpsMetrics;\n performance: PerpsPerformance;\n tracer: PerpsTracer;\n\n // === Platform Services (mobile/extension specific) ===\n streamManager: PerpsStreamManager;\n\n // === Feature Flags (platform-specific version gating) ===\n featureFlags: {\n /**\n * Validate a version-gated feature flag against current app version.\n * Returns true if flag is enabled AND app meets minimum version,\n * false if flag is disabled, or undefined if flag is misconfigured/overridden.\n *\n * Platform-specific because it uses react-native-device-info (mobile)\n * or browser APIs (extension) to get the app version.\n */\n validateVersionGated(flag: VersionGatedFeatureFlag): boolean | undefined;\n };\n\n // === Market Data Formatting (platform-specific number formatting) ===\n marketDataFormatters: MarketDataFormatters;\n\n // === Cache Invalidation (for standalone query caches) ===\n cacheInvalidator: PerpsCacheInvalidator;\n\n // === Disk Cache (cold-start persistence) ===\n diskCache: {\n getItem(key: string): Promise<string | null>;\n getItemSync?(key: string): string | null;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n };\n\n // === Rewards (DI — no RewardsController in Core yet) ===\n rewards: {\n /**\n * Get fee discount for an account from the RewardsController.\n * Returns discount in basis points (e.g., 6500 = 65% discount)\n */\n getPerpsDiscountForAccount(\n caipAccountId: `${string}:${string}:${string}`,\n ): Promise<number>;\n };\n};\n\n/**\n * Cache types that can be invalidated.\n * Used by standalone query caches (e.g., usePerpsPositionForAsset).\n */\nexport type PerpsCacheType = 'positions' | 'accountState' | 'markets';\n\n/**\n * Parameters for invalidating a specific cache type.\n */\nexport type InvalidateCacheParams = {\n /** The type of cache to invalidate */\n cacheType: PerpsCacheType;\n};\n\n/**\n * Cache invalidation interface for standalone query caches.\n * Allows services to signal when data has changed without depending on\n * mobile-specific implementations.\n */\nexport type PerpsCacheInvalidator = {\n /**\n * Invalidate a specific cache type.\n * Notifies all subscribers that cached data is stale.\n */\n invalidate(params: InvalidateCacheParams): void;\n\n /**\n * Invalidate all cache types.\n */\n invalidateAll(): void;\n};\n\n// ============================================================================\n// Market Data Formatting\n// ============================================================================\n\n/**\n * Injectable formatters for market data transformation.\n * Decouples marketDataTransform from mobile-specific intl/formatUtils imports.\n *\n * Range configs are opaque (unknown[]) because the concrete type\n * (FiatRangeConfig on mobile) is platform-specific. The formatter\n * implementation casts internally.\n */\nexport type MarketDataFormatters = {\n /** Format a number as a USD volume string (e.g., '$1.2B', '$850M') */\n formatVolume(value: number): string;\n /** Format a number as a USD fiat string with adaptive precision */\n formatPerpsFiat(value: number, options?: { ranges?: unknown[] }): string;\n /** Format a number as a percentage string (e.g., '2.50%', '-1.80%') */\n formatPercentage(percent: number): string;\n /** Universal price ranges for formatting (opaque to portable code) */\n priceRangesUniversal: unknown[];\n};\n\n// ============================================================================\n// Payment Token (portable replacement for mobile-only AssetType)\n// ============================================================================\n\n/**\n * Minimal payment token for deposit flow.\n * Only the fields actually used by PerpsController are included.\n * Replaces the mobile-only AssetType (which extends TokenI and uses ImageSourcePropType).\n */\nexport type PaymentToken = {\n description?: string;\n address: string;\n chainId?: string;\n symbol?: string;\n};\n\n/**\n * Selected pay-with token shape used in PerpsController state, pending trade config,\n * selectors, and UI hooks. Use this type everywhere this shape is needed.\n */\nexport type PerpsSelectedPaymentToken = {\n description?: string;\n address: string;\n chainId: string;\n symbol?: string;\n};\n\n// ============================================================================\n// Version-gated Feature Flag (portable)\n// ============================================================================\n\n/**\n * Structure for a version-gated feature flag from LaunchDarkly.\n * Portable: no platform-specific imports.\n */\nexport type VersionGatedFeatureFlag = {\n enabled: boolean;\n minimumVersion: string;\n};\n\n/**\n * Type guard for VersionGatedFeatureFlag.\n * Pure logic, no platform dependencies.\n *\n * @param value - The value to check.\n * @returns True if the value is a VersionGatedFeatureFlag.\n */\nexport function isVersionGatedFeatureFlag(\n value: unknown,\n): value is VersionGatedFeatureFlag {\n return (\n typeof value === 'object' &&\n value !== null &&\n hasProperty(value, 'enabled') &&\n hasProperty(value, 'minimumVersion') &&\n typeof (value as { enabled: unknown }).enabled === 'boolean' &&\n typeof (value as { minimumVersion: unknown }).minimumVersion === 'string'\n );\n}\n\n// ============================================================================\n// Sub-module type re-exports\n// These types live in separate files within types/ and need to be accessible\n// from the root barrel via `export * from './types'`.\n// ============================================================================\nexport type * from './perps-types';\nexport * from './transactionTypes';\n// hyperliquid-types: selective export to avoid OrderType clash with main types\nexport type {\n AssetPosition,\n SpotBalance,\n PerpsUniverse,\n PerpsAssetCtx,\n PredictedFunding,\n FrontendOrder,\n SDKOrderParams,\n ClearinghouseStateResponse,\n SpotClearinghouseStateResponse,\n MetaResponse,\n FrontendOpenOrdersResponse,\n AllMidsResponse,\n MetaAndAssetCtxsResponse,\n PredictedFundingsResponse,\n SpotMetaResponse,\n} from './hyperliquid-types';\n"]}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1211,6 +1211,12 @@ export type PerpsPlatformDependencies = {
|
|
|
1211
1211
|
};
|
|
1212
1212
|
marketDataFormatters: MarketDataFormatters;
|
|
1213
1213
|
cacheInvalidator: PerpsCacheInvalidator;
|
|
1214
|
+
diskCache: {
|
|
1215
|
+
getItem(key: string): Promise<string | null>;
|
|
1216
|
+
getItemSync?(key: string): string | null;
|
|
1217
|
+
setItem(key: string, value: string): Promise<void>;
|
|
1218
|
+
removeItem(key: string): Promise<void>;
|
|
1219
|
+
};
|
|
1214
1220
|
rewards: {
|
|
1215
1221
|
/**
|
|
1216
1222
|
* Get fee discount for an account from the RewardsController.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,GAAG,EACJ,wBAAwB;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,qCAAiC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,0BAAsB;AAE3D;;;;GAIG;AACH,oBAAY,wBAAwB;IAClC,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,aAAa,kBAAkB;CAChC;AAED,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,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;IACnE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,GAAG,MAAM,CAAC;IACzE,uEAAuE;IACvE,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,sEAAsE;IACtE,oBAAoB,EAAE,OAAO,EAAE,CAAC;CACjC,CAAC;AAMF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,uBAAuB,CASlC;AAOD,uCAAmC;AACnC,uCAAmC;AAEnC,YAAY,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,0BAA0B,EAC1B,8BAA8B,EAC9B,YAAY,EACZ,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,GACjB,gCAA4B"}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1211,6 +1211,12 @@ export type PerpsPlatformDependencies = {
|
|
|
1211
1211
|
};
|
|
1212
1212
|
marketDataFormatters: MarketDataFormatters;
|
|
1213
1213
|
cacheInvalidator: PerpsCacheInvalidator;
|
|
1214
|
+
diskCache: {
|
|
1215
|
+
getItem(key: string): Promise<string | null>;
|
|
1216
|
+
getItemSync?(key: string): string | null;
|
|
1217
|
+
setItem(key: string, value: string): Promise<void>;
|
|
1218
|
+
removeItem(key: string): Promise<void>;
|
|
1219
|
+
};
|
|
1214
1220
|
rewards: {
|
|
1215
1221
|
/**
|
|
1216
1222
|
* Get fee discount for an account from the RewardsController.
|