@one_deploy/sdk 1.0.7 → 1.2.0

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.
Files changed (106) hide show
  1. package/README.md +339 -0
  2. package/dist/ForexPoolDataGenerator--__twRwl.d.mts +76 -0
  3. package/dist/ForexPoolDataGenerator-eUgwsU_B.d.ts +76 -0
  4. package/dist/OneForexTradeHistory-TlKxjbFF.d.ts +250 -0
  5. package/dist/OneForexTradeHistory-iDySMcw0.d.mts +250 -0
  6. package/dist/components/index.d.mts +539 -0
  7. package/dist/components/index.d.ts +539 -0
  8. package/dist/components/index.js +7295 -0
  9. package/dist/components/index.js.map +1 -0
  10. package/dist/components/index.mjs +7243 -0
  11. package/dist/components/index.mjs.map +1 -0
  12. package/dist/config/index.d.mts +1 -0
  13. package/dist/config/index.d.ts +1 -0
  14. package/dist/console-BfTMA7ah.d.mts +504 -0
  15. package/dist/console-BfTMA7ah.d.ts +504 -0
  16. package/dist/hooks/index.d.mts +323 -1
  17. package/dist/hooks/index.d.ts +323 -1
  18. package/dist/hooks/index.js +3223 -0
  19. package/dist/hooks/index.js.map +1 -1
  20. package/dist/hooks/index.mjs +3204 -1
  21. package/dist/hooks/index.mjs.map +1 -1
  22. package/dist/index.d.mts +18 -352
  23. package/dist/index.d.ts +18 -352
  24. package/dist/index.js +8646 -574
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +8449 -432
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/providers/index.d.mts +31 -31
  29. package/dist/providers/index.d.ts +31 -31
  30. package/dist/providers/index.js +140 -153
  31. package/dist/providers/index.js.map +1 -1
  32. package/dist/providers/index.mjs +100 -109
  33. package/dist/providers/index.mjs.map +1 -1
  34. package/dist/react-native.d.mts +8 -144
  35. package/dist/react-native.d.ts +8 -144
  36. package/dist/react-native.js +2640 -689
  37. package/dist/react-native.js.map +1 -1
  38. package/dist/react-native.mjs +2610 -691
  39. package/dist/react-native.mjs.map +1 -1
  40. package/dist/services/index.d.mts +85 -4
  41. package/dist/services/index.d.ts +85 -4
  42. package/dist/services/index.js +1621 -0
  43. package/dist/services/index.js.map +1 -1
  44. package/dist/services/index.mjs +1619 -1
  45. package/dist/services/index.mjs.map +1 -1
  46. package/dist/types/index.d.mts +203 -1
  47. package/dist/types/index.d.ts +203 -1
  48. package/dist/types/index.js +275 -0
  49. package/dist/types/index.js.map +1 -1
  50. package/dist/types/index.mjs +251 -0
  51. package/dist/types/index.mjs.map +1 -1
  52. package/dist/useForexTrading-BleeSor8.d.mts +80 -0
  53. package/dist/useForexTrading-ZgW_G40Q.d.ts +80 -0
  54. package/package.json +9 -2
  55. package/src/components/OneConnectButton.tsx +24 -1
  56. package/src/components/OneNFTGallery.tsx +13 -7
  57. package/src/components/OneOfframpWidget.tsx +4 -3
  58. package/src/components/OnePayWidget.tsx +10 -1
  59. package/src/components/OneSendWidget.tsx +3 -3
  60. package/src/components/OneSwapWidget.tsx +4 -4
  61. package/src/components/OneTransactionButton.tsx +28 -3
  62. package/src/components/OneWalletBalance.tsx +1 -1
  63. package/src/components/ai/OneChainSelector.tsx +63 -336
  64. package/src/components/ai/OneForexCapitalSplit.tsx +112 -0
  65. package/src/components/ai/OneForexConsoleView.tsx +90 -0
  66. package/src/components/ai/OneForexPairSelector.tsx +101 -0
  67. package/src/components/ai/OneForexPoolCard.tsx +105 -0
  68. package/src/components/ai/OneForexTradeHistory.tsx +107 -0
  69. package/src/components/ai/OnePairSelector.tsx +77 -434
  70. package/src/components/ai/console/OneAIQuantConsole.tsx +423 -0
  71. package/src/components/ai/console/OneAgentCard.tsx +383 -0
  72. package/src/components/ai/console/OneAgentConsole.tsx +469 -0
  73. package/src/components/ai/console/OneDecisionTimeline.tsx +433 -0
  74. package/src/components/ai/console/OneMetricsDashboard.tsx +493 -0
  75. package/src/components/ai/console/OnePositionCard.tsx +406 -0
  76. package/src/components/ai/console/OnePositionDetail.tsx +600 -0
  77. package/src/components/ai/console/OneRiskIndicator.tsx +464 -0
  78. package/src/components/ai/console/OneTradingConsole.tsx +660 -0
  79. package/src/components/ai/console/index.ts +17 -0
  80. package/src/components/ai/index.ts +10 -0
  81. package/src/hooks/index.ts +46 -0
  82. package/src/hooks/useAIDecisions.ts +280 -0
  83. package/src/hooks/useAIPositions.ts +349 -0
  84. package/src/hooks/useAIQuantConsole.ts +283 -0
  85. package/src/hooks/useAIRiskStatus.ts +276 -0
  86. package/src/hooks/useAITrading.ts +190 -0
  87. package/src/hooks/useBotSimulation.ts +201 -0
  88. package/src/hooks/useForexTrading.ts +430 -0
  89. package/src/hooks/useTradingConsole.ts +243 -0
  90. package/src/index.ts +123 -5
  91. package/src/providers/OneProvider.tsx +181 -5
  92. package/src/providers/index.ts +22 -8
  93. package/src/react-native.ts +41 -0
  94. package/src/services/forex/BotSimulationEngine.ts +968 -0
  95. package/src/services/forex/ForexPoolDataGenerator.ts +542 -0
  96. package/src/services/forex/ForexSimulationEngine.ts +482 -0
  97. package/src/services/forex/index.ts +21 -0
  98. package/src/services/index.ts +16 -0
  99. package/src/types/aiTrading.ts +151 -0
  100. package/src/types/console.ts +380 -0
  101. package/src/types/forex.ts +282 -0
  102. package/src/types/index.ts +106 -0
  103. package/dist/price-CgqXPnT3.d.ts +0 -13
  104. package/dist/price-ClbLHHjv.d.mts +0 -13
  105. package/dist/supabase-BT0c7q9e.d.mts +0 -82
  106. package/dist/supabase-BT0c7q9e.d.ts +0 -82
@@ -1,3 +1,116 @@
1
+ export { M as AGENT_STATUS_COLORS, G as AIDecision, A as AILogType, D as AIPosition, U as AIQuantConsoleOptions, y as AI_LOG_COLORS, V as AgentConsoleOptions, L as AgentStatus, a as BotLogEntry, B as BotLogType, c as BotState, N as CombinedLogEntry, K as ConsoleMetrics, Y as DEFAULT_CONSOLE_METRICS, W as DEFAULT_CONSOLE_OPTIONS, X as DEFAULT_RISK_STATUS, E as DecisionAction, v as FOREX_AGENT, F as FOREX_CAPITAL_SPLIT, h as FOREX_CURRENCY_PAIRS, f as FOREX_CYCLE_OPTIONS, z as FOREX_LOG_COLORS, k as FOREX_POOL_DEFAULTS, u as ForexAgent, g as ForexCurrencyPair, e as ForexCycleOption, p as ForexInvestment, t as ForexLogEntry, s as ForexLogType, j as ForexPool, n as ForexPoolDailySnapshot, m as ForexPoolTransaction, l as ForexPoolTransactionType, i as ForexPoolType, o as ForexPosition, r as ForexTradeRecord, q as ForexTradeStatus, I as IndicatorSnapshot, P as PositionSide, C as PositionStatus, H as RISK_LEVEL_COLORS, R as RiskStatus, S as StrategyPersonality, J as TRADING_STATUS_COLORS, Q as TradingConsoleOptions, O as TradingConsoleState, T as TradingStatus, w as calculateForexNetProfit, Z as calculateRiskLevel, d as computePoolAllocations, x as estimateForexProfit, $ as formatPercent, _ as formatPnl } from '../console-BfTMA7ah.mjs';
2
+
3
+ type StrategyCategory$1 = 'conservative' | 'balanced' | 'aggressive' | 'hedge' | 'arbitrage' | 'trend' | 'grid' | 'dca';
4
+ type OrderStatus = 'pending' | 'active' | 'paused' | 'completed' | 'cancelled' | 'pending_redemption' | 'redeemed';
5
+ type TradeAction$1 = 'buy' | 'sell' | 'long' | 'short' | 'close_long' | 'close_short';
6
+ type TradeStatus = 'open' | 'closed' | 'liquidated' | 'cancelled';
7
+ type FeeType = 'management' | 'performance' | 'withdrawal' | 'early_redemption_penalty';
8
+ type OrderEventType = 'created' | 'activated' | 'paused' | 'resumed' | 'redemption_requested' | 'redeemed' | 'cancelled' | 'fee_deducted' | 'profit_realized';
9
+ interface AIStrategyConfig {
10
+ id: string;
11
+ name: string;
12
+ description: string | null;
13
+ category: StrategyCategory$1;
14
+ riskLevel: 1 | 2 | 3 | 4 | 5;
15
+ minInvestment: number;
16
+ maxInvestment: number | null;
17
+ lockPeriodDays: number;
18
+ expectedApyMin: number | null;
19
+ expectedApyMax: number | null;
20
+ managementFeeRate: number;
21
+ performanceFeeRate: number;
22
+ supportedPairs: string[];
23
+ supportedChains: string[];
24
+ supportedCurrencies: string[];
25
+ leverageMin: number;
26
+ leverageMax: number;
27
+ isActive: boolean;
28
+ }
29
+ interface AIOrderCreateInput {
30
+ strategyId: string;
31
+ amount: number;
32
+ currency: string;
33
+ chain: string;
34
+ lockPeriodDays: number;
35
+ }
36
+ interface AIOrderSummary {
37
+ orderId: string;
38
+ strategyId: string;
39
+ strategyName: string;
40
+ amount: number;
41
+ currentValue: number;
42
+ profit: number;
43
+ profitPercent: number;
44
+ status: OrderStatus;
45
+ daysRemaining: number;
46
+ lockProgress: number;
47
+ }
48
+ interface AITradeLog {
49
+ id: string;
50
+ timestamp: string;
51
+ action: TradeAction$1;
52
+ pair: string;
53
+ entryPrice: number;
54
+ exitPrice: number | null;
55
+ amount: number;
56
+ pnl: number;
57
+ pnlPercent: number;
58
+ leverage: number;
59
+ status: TradeStatus;
60
+ aiConfidence: number | null;
61
+ aiReasoning: string | null;
62
+ }
63
+ interface AIPenaltyCalculation {
64
+ completionRate: number;
65
+ penaltyRate: number;
66
+ estimatedPenalty: number;
67
+ estimatedRedemption: number;
68
+ isEarlyWithdrawal: boolean;
69
+ }
70
+ interface AIPerformanceChart {
71
+ date: string;
72
+ nav: number;
73
+ dailyPnl: number;
74
+ cumulativePnl: number;
75
+ }
76
+ declare const PENALTY_TIERS: readonly [{
77
+ readonly minProgress: 0.75;
78
+ readonly maxProgress: 1;
79
+ readonly rate: 0.5;
80
+ readonly label: "50%";
81
+ }, {
82
+ readonly minProgress: 0.5;
83
+ readonly maxProgress: 0.75;
84
+ readonly rate: 0.6;
85
+ readonly label: "60%";
86
+ }, {
87
+ readonly minProgress: 0.25;
88
+ readonly maxProgress: 0.5;
89
+ readonly rate: 0.7;
90
+ readonly label: "70%";
91
+ }, {
92
+ readonly minProgress: 0;
93
+ readonly maxProgress: 0.25;
94
+ readonly rate: 0.8;
95
+ readonly label: "80%";
96
+ }];
97
+ declare function calculateEarlyWithdrawalPenalty(investedAmount: number, profit: number, lockProgress: number): AIPenaltyCalculation;
98
+ declare const STRATEGY_CATEGORIES: Record<StrategyCategory$1, {
99
+ labelKey: string;
100
+ color: string;
101
+ icon: string;
102
+ }>;
103
+ declare const RISK_LEVELS: Record<number, {
104
+ labelKey: string;
105
+ color: string;
106
+ bgColor: string;
107
+ }>;
108
+ declare const ORDER_STATUS_CONFIG: Record<OrderStatus, {
109
+ labelKey: string;
110
+ color: string;
111
+ bgColor: string;
112
+ }>;
113
+
1
114
  interface User {
2
115
  id: string;
3
116
  email: string;
@@ -755,5 +868,94 @@ interface RateLimitInfo {
755
868
  windowStart: string;
756
869
  windowEnd: string;
757
870
  }
871
+ interface AIAgentTier {
872
+ tier: number;
873
+ amount: number;
874
+ label: string;
875
+ label_zh?: string;
876
+ }
877
+ interface AIAgentCycleParams {
878
+ cycle: number;
879
+ lockDays: number;
880
+ shareRate: number;
881
+ expectedApy: number;
882
+ managementFee: number;
883
+ performanceFee: number;
884
+ }
885
+ interface AIAgent {
886
+ id: string;
887
+ name: string;
888
+ name_zh?: string;
889
+ description: string;
890
+ description_zh?: string;
891
+ category: StrategyCategory;
892
+ risk_level: 1 | 2 | 3 | 4 | 5;
893
+ icon: string;
894
+ color: string;
895
+ tiers: AIAgentTier[];
896
+ supported_cycles: number[];
897
+ default_cycle: number;
898
+ supported_pairs: string[];
899
+ supported_chains: string[];
900
+ is_active: boolean;
901
+ preview?: {
902
+ tier: AIAgentTier;
903
+ cycle: number;
904
+ lockDays: number;
905
+ shareRate: number;
906
+ expectedApy: number;
907
+ managementFee: number;
908
+ performanceFee: number;
909
+ };
910
+ tierParams?: Array<{
911
+ tier: number;
912
+ amount: number;
913
+ label: string;
914
+ label_zh?: string;
915
+ cycles: AIAgentCycleParams[];
916
+ }>;
917
+ }
918
+ interface AIAgentPerformance {
919
+ agentId: string;
920
+ date: string;
921
+ nav: number;
922
+ dailyPnl: number;
923
+ dailyPnlPct: number;
924
+ cumulativePnl: number;
925
+ cumulativePnlPct: number;
926
+ tradesOpened: number;
927
+ tradesClosed: number;
928
+ winRate: number;
929
+ sharpeRatio: number;
930
+ }
931
+ interface AIAgentTrade {
932
+ id: string;
933
+ agentId: string;
934
+ symbol: string;
935
+ side: 'long' | 'short';
936
+ entryPrice: number;
937
+ exitPrice?: number;
938
+ quantity: number;
939
+ leverage: number;
940
+ pnl: number;
941
+ pnlPct: number;
942
+ status: 'open' | 'closed';
943
+ entryReason: string;
944
+ exitReason?: string;
945
+ confidence: number;
946
+ openedAt: string;
947
+ closedAt?: string;
948
+ }
949
+ interface AIAgentSubscriptionParams {
950
+ agentId: string;
951
+ tier: number;
952
+ cycle: number;
953
+ amount: number;
954
+ lockDays: number;
955
+ shareRate: number;
956
+ expectedApy: number;
957
+ managementFee: number;
958
+ performanceFee: number;
959
+ }
758
960
 
759
- export type { AIMarketData, AINavSnapshot, AIOrder, AIOrderStatus, AIPortfolioSummary, AIRedemptionResult, AIStrategy, AITradeAllocation, AITradeExecution, AdminListOptions, AdminProject, AdminUser, ApiResponse, AssetAllocation, BillCategory, BillPayment, BillProvider, BridgeQuote, BridgeRoute, BridgeTransaction, Card, CardStatus, CardTier, CardTransaction, ChainConfig, Contract, ContractDeployParams, ContractReadParams, ContractType, ContractWriteParams, CreateAIOrderRequest, CreateWebhookInput, GasEstimate, GasPrice, KycLevel, KycStatus, LimitOrder, MembershipTier, NFT, NFTAttribute, NFTCollection, NFTTransfer, Notification, NotificationSettings, OfframpQuote, OfframpRequest, OfframpTransaction, OnChainBalance, PaginatedResult, Permission, PermissionScope, PortfolioAnalytics, PortfolioHistory, Position, RateLimitInfo, Referral, ReferralInfo, RiskLevel, SDKEvent, SDKEventType, Session, StakingPool, StakingPosition, StrategyCategory, SystemLog, SystemStats, Token, TokenPrice, TradeAction, TradingCondition, Transaction, TransactionStatus, TransactionType, UpdateWebhookInput, User, UserProfile, UserSettings, WalletBalance, WalletExport, WalletImportRequest, Webhook, WebhookDelivery, WebhookEventType };
961
+ export { type AIAgent, type AIAgentCycleParams, type AIAgentPerformance, type AIAgentSubscriptionParams, type AIAgentTier, type AIAgentTrade, type AIMarketData, type AINavSnapshot, type AIOrder, type AIOrderCreateInput, type AIOrderStatus, type AIOrderSummary, type AIPenaltyCalculation, type AIPerformanceChart, type AIPortfolioSummary, type AIRedemptionResult, type AIStrategy, type AIStrategyConfig, type AITradeAllocation, type AITradeExecution, type AITradeLog, type AdminListOptions, type AdminProject, type AdminUser, type ApiResponse, type AssetAllocation, type BillCategory, type BillPayment, type BillProvider, type BridgeQuote, type BridgeRoute, type BridgeTransaction, type Card, type CardStatus, type CardTier, type CardTransaction, type ChainConfig, type Contract, type ContractDeployParams, type ContractReadParams, type ContractType, type ContractWriteParams, type CreateAIOrderRequest, type CreateWebhookInput, type FeeType, type GasEstimate, type GasPrice, type KycLevel, type KycStatus, type LimitOrder, type MembershipTier, type NFT, type NFTAttribute, type NFTCollection, type NFTTransfer, type Notification, type NotificationSettings, ORDER_STATUS_CONFIG, type OfframpQuote, type OfframpRequest, type OfframpTransaction, type OnChainBalance, type OrderEventType, type OrderStatus, PENALTY_TIERS, type PaginatedResult, type Permission, type PermissionScope, type PortfolioAnalytics, type PortfolioHistory, type Position, RISK_LEVELS, type RateLimitInfo, type Referral, type ReferralInfo, type RiskLevel, type SDKEvent, type SDKEventType, STRATEGY_CATEGORIES, type Session, type StakingPool, type StakingPosition, type StrategyCategory, type SystemLog, type SystemStats, type Token, type TokenPrice, type TradeAction, type TradeStatus, type TradingCondition, type Transaction, type TransactionStatus, type TransactionType, type UpdateWebhookInput, type User, type UserProfile, type UserSettings, type WalletBalance, type WalletExport, type WalletImportRequest, type Webhook, type WebhookDelivery, type WebhookEventType, calculateEarlyWithdrawalPenalty };
@@ -1,3 +1,116 @@
1
+ export { M as AGENT_STATUS_COLORS, G as AIDecision, A as AILogType, D as AIPosition, U as AIQuantConsoleOptions, y as AI_LOG_COLORS, V as AgentConsoleOptions, L as AgentStatus, a as BotLogEntry, B as BotLogType, c as BotState, N as CombinedLogEntry, K as ConsoleMetrics, Y as DEFAULT_CONSOLE_METRICS, W as DEFAULT_CONSOLE_OPTIONS, X as DEFAULT_RISK_STATUS, E as DecisionAction, v as FOREX_AGENT, F as FOREX_CAPITAL_SPLIT, h as FOREX_CURRENCY_PAIRS, f as FOREX_CYCLE_OPTIONS, z as FOREX_LOG_COLORS, k as FOREX_POOL_DEFAULTS, u as ForexAgent, g as ForexCurrencyPair, e as ForexCycleOption, p as ForexInvestment, t as ForexLogEntry, s as ForexLogType, j as ForexPool, n as ForexPoolDailySnapshot, m as ForexPoolTransaction, l as ForexPoolTransactionType, i as ForexPoolType, o as ForexPosition, r as ForexTradeRecord, q as ForexTradeStatus, I as IndicatorSnapshot, P as PositionSide, C as PositionStatus, H as RISK_LEVEL_COLORS, R as RiskStatus, S as StrategyPersonality, J as TRADING_STATUS_COLORS, Q as TradingConsoleOptions, O as TradingConsoleState, T as TradingStatus, w as calculateForexNetProfit, Z as calculateRiskLevel, d as computePoolAllocations, x as estimateForexProfit, $ as formatPercent, _ as formatPnl } from '../console-BfTMA7ah.js';
2
+
3
+ type StrategyCategory$1 = 'conservative' | 'balanced' | 'aggressive' | 'hedge' | 'arbitrage' | 'trend' | 'grid' | 'dca';
4
+ type OrderStatus = 'pending' | 'active' | 'paused' | 'completed' | 'cancelled' | 'pending_redemption' | 'redeemed';
5
+ type TradeAction$1 = 'buy' | 'sell' | 'long' | 'short' | 'close_long' | 'close_short';
6
+ type TradeStatus = 'open' | 'closed' | 'liquidated' | 'cancelled';
7
+ type FeeType = 'management' | 'performance' | 'withdrawal' | 'early_redemption_penalty';
8
+ type OrderEventType = 'created' | 'activated' | 'paused' | 'resumed' | 'redemption_requested' | 'redeemed' | 'cancelled' | 'fee_deducted' | 'profit_realized';
9
+ interface AIStrategyConfig {
10
+ id: string;
11
+ name: string;
12
+ description: string | null;
13
+ category: StrategyCategory$1;
14
+ riskLevel: 1 | 2 | 3 | 4 | 5;
15
+ minInvestment: number;
16
+ maxInvestment: number | null;
17
+ lockPeriodDays: number;
18
+ expectedApyMin: number | null;
19
+ expectedApyMax: number | null;
20
+ managementFeeRate: number;
21
+ performanceFeeRate: number;
22
+ supportedPairs: string[];
23
+ supportedChains: string[];
24
+ supportedCurrencies: string[];
25
+ leverageMin: number;
26
+ leverageMax: number;
27
+ isActive: boolean;
28
+ }
29
+ interface AIOrderCreateInput {
30
+ strategyId: string;
31
+ amount: number;
32
+ currency: string;
33
+ chain: string;
34
+ lockPeriodDays: number;
35
+ }
36
+ interface AIOrderSummary {
37
+ orderId: string;
38
+ strategyId: string;
39
+ strategyName: string;
40
+ amount: number;
41
+ currentValue: number;
42
+ profit: number;
43
+ profitPercent: number;
44
+ status: OrderStatus;
45
+ daysRemaining: number;
46
+ lockProgress: number;
47
+ }
48
+ interface AITradeLog {
49
+ id: string;
50
+ timestamp: string;
51
+ action: TradeAction$1;
52
+ pair: string;
53
+ entryPrice: number;
54
+ exitPrice: number | null;
55
+ amount: number;
56
+ pnl: number;
57
+ pnlPercent: number;
58
+ leverage: number;
59
+ status: TradeStatus;
60
+ aiConfidence: number | null;
61
+ aiReasoning: string | null;
62
+ }
63
+ interface AIPenaltyCalculation {
64
+ completionRate: number;
65
+ penaltyRate: number;
66
+ estimatedPenalty: number;
67
+ estimatedRedemption: number;
68
+ isEarlyWithdrawal: boolean;
69
+ }
70
+ interface AIPerformanceChart {
71
+ date: string;
72
+ nav: number;
73
+ dailyPnl: number;
74
+ cumulativePnl: number;
75
+ }
76
+ declare const PENALTY_TIERS: readonly [{
77
+ readonly minProgress: 0.75;
78
+ readonly maxProgress: 1;
79
+ readonly rate: 0.5;
80
+ readonly label: "50%";
81
+ }, {
82
+ readonly minProgress: 0.5;
83
+ readonly maxProgress: 0.75;
84
+ readonly rate: 0.6;
85
+ readonly label: "60%";
86
+ }, {
87
+ readonly minProgress: 0.25;
88
+ readonly maxProgress: 0.5;
89
+ readonly rate: 0.7;
90
+ readonly label: "70%";
91
+ }, {
92
+ readonly minProgress: 0;
93
+ readonly maxProgress: 0.25;
94
+ readonly rate: 0.8;
95
+ readonly label: "80%";
96
+ }];
97
+ declare function calculateEarlyWithdrawalPenalty(investedAmount: number, profit: number, lockProgress: number): AIPenaltyCalculation;
98
+ declare const STRATEGY_CATEGORIES: Record<StrategyCategory$1, {
99
+ labelKey: string;
100
+ color: string;
101
+ icon: string;
102
+ }>;
103
+ declare const RISK_LEVELS: Record<number, {
104
+ labelKey: string;
105
+ color: string;
106
+ bgColor: string;
107
+ }>;
108
+ declare const ORDER_STATUS_CONFIG: Record<OrderStatus, {
109
+ labelKey: string;
110
+ color: string;
111
+ bgColor: string;
112
+ }>;
113
+
1
114
  interface User {
2
115
  id: string;
3
116
  email: string;
@@ -755,5 +868,94 @@ interface RateLimitInfo {
755
868
  windowStart: string;
756
869
  windowEnd: string;
757
870
  }
871
+ interface AIAgentTier {
872
+ tier: number;
873
+ amount: number;
874
+ label: string;
875
+ label_zh?: string;
876
+ }
877
+ interface AIAgentCycleParams {
878
+ cycle: number;
879
+ lockDays: number;
880
+ shareRate: number;
881
+ expectedApy: number;
882
+ managementFee: number;
883
+ performanceFee: number;
884
+ }
885
+ interface AIAgent {
886
+ id: string;
887
+ name: string;
888
+ name_zh?: string;
889
+ description: string;
890
+ description_zh?: string;
891
+ category: StrategyCategory;
892
+ risk_level: 1 | 2 | 3 | 4 | 5;
893
+ icon: string;
894
+ color: string;
895
+ tiers: AIAgentTier[];
896
+ supported_cycles: number[];
897
+ default_cycle: number;
898
+ supported_pairs: string[];
899
+ supported_chains: string[];
900
+ is_active: boolean;
901
+ preview?: {
902
+ tier: AIAgentTier;
903
+ cycle: number;
904
+ lockDays: number;
905
+ shareRate: number;
906
+ expectedApy: number;
907
+ managementFee: number;
908
+ performanceFee: number;
909
+ };
910
+ tierParams?: Array<{
911
+ tier: number;
912
+ amount: number;
913
+ label: string;
914
+ label_zh?: string;
915
+ cycles: AIAgentCycleParams[];
916
+ }>;
917
+ }
918
+ interface AIAgentPerformance {
919
+ agentId: string;
920
+ date: string;
921
+ nav: number;
922
+ dailyPnl: number;
923
+ dailyPnlPct: number;
924
+ cumulativePnl: number;
925
+ cumulativePnlPct: number;
926
+ tradesOpened: number;
927
+ tradesClosed: number;
928
+ winRate: number;
929
+ sharpeRatio: number;
930
+ }
931
+ interface AIAgentTrade {
932
+ id: string;
933
+ agentId: string;
934
+ symbol: string;
935
+ side: 'long' | 'short';
936
+ entryPrice: number;
937
+ exitPrice?: number;
938
+ quantity: number;
939
+ leverage: number;
940
+ pnl: number;
941
+ pnlPct: number;
942
+ status: 'open' | 'closed';
943
+ entryReason: string;
944
+ exitReason?: string;
945
+ confidence: number;
946
+ openedAt: string;
947
+ closedAt?: string;
948
+ }
949
+ interface AIAgentSubscriptionParams {
950
+ agentId: string;
951
+ tier: number;
952
+ cycle: number;
953
+ amount: number;
954
+ lockDays: number;
955
+ shareRate: number;
956
+ expectedApy: number;
957
+ managementFee: number;
958
+ performanceFee: number;
959
+ }
758
960
 
759
- export type { AIMarketData, AINavSnapshot, AIOrder, AIOrderStatus, AIPortfolioSummary, AIRedemptionResult, AIStrategy, AITradeAllocation, AITradeExecution, AdminListOptions, AdminProject, AdminUser, ApiResponse, AssetAllocation, BillCategory, BillPayment, BillProvider, BridgeQuote, BridgeRoute, BridgeTransaction, Card, CardStatus, CardTier, CardTransaction, ChainConfig, Contract, ContractDeployParams, ContractReadParams, ContractType, ContractWriteParams, CreateAIOrderRequest, CreateWebhookInput, GasEstimate, GasPrice, KycLevel, KycStatus, LimitOrder, MembershipTier, NFT, NFTAttribute, NFTCollection, NFTTransfer, Notification, NotificationSettings, OfframpQuote, OfframpRequest, OfframpTransaction, OnChainBalance, PaginatedResult, Permission, PermissionScope, PortfolioAnalytics, PortfolioHistory, Position, RateLimitInfo, Referral, ReferralInfo, RiskLevel, SDKEvent, SDKEventType, Session, StakingPool, StakingPosition, StrategyCategory, SystemLog, SystemStats, Token, TokenPrice, TradeAction, TradingCondition, Transaction, TransactionStatus, TransactionType, UpdateWebhookInput, User, UserProfile, UserSettings, WalletBalance, WalletExport, WalletImportRequest, Webhook, WebhookDelivery, WebhookEventType };
961
+ export { type AIAgent, type AIAgentCycleParams, type AIAgentPerformance, type AIAgentSubscriptionParams, type AIAgentTier, type AIAgentTrade, type AIMarketData, type AINavSnapshot, type AIOrder, type AIOrderCreateInput, type AIOrderStatus, type AIOrderSummary, type AIPenaltyCalculation, type AIPerformanceChart, type AIPortfolioSummary, type AIRedemptionResult, type AIStrategy, type AIStrategyConfig, type AITradeAllocation, type AITradeExecution, type AITradeLog, type AdminListOptions, type AdminProject, type AdminUser, type ApiResponse, type AssetAllocation, type BillCategory, type BillPayment, type BillProvider, type BridgeQuote, type BridgeRoute, type BridgeTransaction, type Card, type CardStatus, type CardTier, type CardTransaction, type ChainConfig, type Contract, type ContractDeployParams, type ContractReadParams, type ContractType, type ContractWriteParams, type CreateAIOrderRequest, type CreateWebhookInput, type FeeType, type GasEstimate, type GasPrice, type KycLevel, type KycStatus, type LimitOrder, type MembershipTier, type NFT, type NFTAttribute, type NFTCollection, type NFTTransfer, type Notification, type NotificationSettings, ORDER_STATUS_CONFIG, type OfframpQuote, type OfframpRequest, type OfframpTransaction, type OnChainBalance, type OrderEventType, type OrderStatus, PENALTY_TIERS, type PaginatedResult, type Permission, type PermissionScope, type PortfolioAnalytics, type PortfolioHistory, type Position, RISK_LEVELS, type RateLimitInfo, type Referral, type ReferralInfo, type RiskLevel, type SDKEvent, type SDKEventType, STRATEGY_CATEGORIES, type Session, type StakingPool, type StakingPosition, type StrategyCategory, type SystemLog, type SystemStats, type Token, type TokenPrice, type TradeAction, type TradeStatus, type TradingCondition, type Transaction, type TransactionStatus, type TransactionType, type UpdateWebhookInput, type User, type UserProfile, type UserSettings, type WalletBalance, type WalletExport, type WalletImportRequest, type Webhook, type WebhookDelivery, type WebhookEventType, calculateEarlyWithdrawalPenalty };