@t2000/sdk 0.15.3 → 0.16.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.
@@ -259,6 +259,92 @@ interface InvestEarnResult {
259
259
  gasCost: number;
260
260
  gasMethod: GasMethod;
261
261
  }
262
+ interface StrategyDefinition {
263
+ name: string;
264
+ allocations: Record<string, number>;
265
+ description: string;
266
+ custom: boolean;
267
+ }
268
+ interface StrategyBuyResult {
269
+ success: boolean;
270
+ strategy: string;
271
+ totalInvested: number;
272
+ buys: Array<{
273
+ asset: string;
274
+ usdAmount: number;
275
+ amount: number;
276
+ price: number;
277
+ tx: string;
278
+ }>;
279
+ gasCost: number;
280
+ gasMethod: GasMethod;
281
+ }
282
+ interface StrategySellResult {
283
+ success: boolean;
284
+ strategy: string;
285
+ totalProceeds: number;
286
+ realizedPnL: number;
287
+ sells: Array<{
288
+ asset: string;
289
+ amount: number;
290
+ usdValue: number;
291
+ realizedPnL: number;
292
+ tx: string;
293
+ }>;
294
+ gasCost: number;
295
+ gasMethod: GasMethod;
296
+ }
297
+ interface StrategyRebalanceResult {
298
+ success: boolean;
299
+ strategy: string;
300
+ trades: Array<{
301
+ action: 'buy' | 'sell';
302
+ asset: string;
303
+ usdAmount: number;
304
+ amount: number;
305
+ tx: string;
306
+ }>;
307
+ beforeWeights: Record<string, number>;
308
+ afterWeights: Record<string, number>;
309
+ targetWeights: Record<string, number>;
310
+ }
311
+ interface StrategyStatusResult {
312
+ definition: StrategyDefinition;
313
+ positions: InvestmentPosition[];
314
+ currentWeights: Record<string, number>;
315
+ totalValue: number;
316
+ }
317
+ interface AutoInvestSchedule {
318
+ id: string;
319
+ strategy?: string;
320
+ asset?: string;
321
+ amount: number;
322
+ frequency: 'daily' | 'weekly' | 'monthly';
323
+ dayOfWeek?: number;
324
+ dayOfMonth?: number;
325
+ lastRun?: string;
326
+ nextRun: string;
327
+ enabled: boolean;
328
+ totalInvested: number;
329
+ runCount: number;
330
+ }
331
+ interface AutoInvestStatus {
332
+ schedules: AutoInvestSchedule[];
333
+ pendingRuns: AutoInvestSchedule[];
334
+ }
335
+ interface AutoInvestRunResult {
336
+ executed: Array<{
337
+ scheduleId: string;
338
+ strategy?: string;
339
+ asset?: string;
340
+ amount: number;
341
+ result: StrategyBuyResult | InvestResult;
342
+ }>;
343
+ skipped: Array<{
344
+ scheduleId: string;
345
+ reason: string;
346
+ }>;
347
+ }
262
348
  type PositionSide = 'long' | 'short';
263
349
  interface PerpsPosition {
264
350
  market: string;
@@ -621,4 +707,4 @@ declare function attack(client: SuiJsonRpcClient, signer: Ed25519Keypair, sentin
621
707
  /** All registered protocol descriptors — used by the indexer for event classification */
622
708
  declare const allDescriptors: ProtocolDescriptor[];
623
709
 
624
- export { descriptor$3 as $, type AdapterCapability as A, type BalanceResponse as B, CetusAdapter as C, type DepositInfo as D, type EarningsResult as E, type FundStatusResult as F, type GasMethod as G, type HealthFactorResult as H, type InvestmentTrade as I, type RebalanceStep as J, type SentinelVerdict as K, type LendingAdapter as L, type MaxWithdrawResult as M, NaviAdapter as N, SuilendAdapter as O, type PortfolioResult as P, type SwapQuote as Q, type RepayResult as R, type SendResult as S, type T2000Options as T, type TradePositionsResult as U, type TradeResult as V, type WithdrawResult as W, allDescriptors as X, descriptor$2 as Y, getSentinelInfo as Z, listSentinels as _, type TransactionRecord as a, requestAttack as a0, attack as a1, descriptor as a2, settleAttack as a3, submitPrompt as a4, descriptor$1 as a5, type SwapAdapter as b, type SaveResult as c, type BorrowResult as d, type MaxBorrowResult as e, type SwapResult as f, type InvestResult as g, type InvestEarnResult as h, type PositionsResult as i, type RatesResult as j, type LendingRates as k, type RebalanceResult as l, type SentinelAgent as m, type SentinelAttackResult as n, type AdapterPositions as o, type AdapterTxResult as p, type AssetRates as q, type GasReserve as r, type HealthInfo as s, type InvestmentPosition as t, type PerpsAdapter as u, type PerpsPosition as v, type PositionEntry as w, type PositionSide as x, type ProtocolDescriptor as y, ProtocolRegistry as z };
710
+ export { SuilendAdapter as $, type AutoInvestSchedule as A, type BalanceResponse as B, CetusAdapter as C, type DepositInfo as D, type EarningsResult as E, type FundStatusResult as F, type GasMethod as G, type HealthFactorResult as H, type InvestmentTrade as I, type GasReserve as J, type HealthInfo as K, type LendingAdapter as L, type MaxWithdrawResult as M, NaviAdapter as N, type PerpsAdapter as O, type PortfolioResult as P, type PerpsPosition as Q, type RepayResult as R, type StrategyDefinition as S, type T2000Options as T, type PositionEntry as U, type PositionSide as V, type WithdrawResult as W, type ProtocolDescriptor as X, ProtocolRegistry as Y, type RebalanceStep as Z, type SentinelVerdict as _, type AutoInvestStatus as a, type SwapQuote as a0, type TradePositionsResult as a1, type TradeResult as a2, allDescriptors as a3, descriptor$2 as a4, getSentinelInfo as a5, listSentinels as a6, descriptor$3 as a7, requestAttack as a8, attack as a9, descriptor as aa, settleAttack as ab, submitPrompt as ac, descriptor$1 as ad, type SendResult as b, type TransactionRecord as c, type SwapAdapter as d, type SaveResult as e, type BorrowResult as f, type MaxBorrowResult as g, type SwapResult as h, type InvestResult as i, type InvestEarnResult as j, type StrategyBuyResult as k, type StrategySellResult as l, type StrategyRebalanceResult as m, type StrategyStatusResult as n, type AutoInvestRunResult as o, type InvestmentPosition as p, type PositionsResult as q, type RatesResult as r, type LendingRates as s, type RebalanceResult as t, type SentinelAgent as u, type SentinelAttackResult as v, type AdapterCapability as w, type AdapterPositions as x, type AdapterTxResult as y, type AssetRates as z };
@@ -259,6 +259,92 @@ interface InvestEarnResult {
259
259
  gasCost: number;
260
260
  gasMethod: GasMethod;
261
261
  }
262
+ interface StrategyDefinition {
263
+ name: string;
264
+ allocations: Record<string, number>;
265
+ description: string;
266
+ custom: boolean;
267
+ }
268
+ interface StrategyBuyResult {
269
+ success: boolean;
270
+ strategy: string;
271
+ totalInvested: number;
272
+ buys: Array<{
273
+ asset: string;
274
+ usdAmount: number;
275
+ amount: number;
276
+ price: number;
277
+ tx: string;
278
+ }>;
279
+ gasCost: number;
280
+ gasMethod: GasMethod;
281
+ }
282
+ interface StrategySellResult {
283
+ success: boolean;
284
+ strategy: string;
285
+ totalProceeds: number;
286
+ realizedPnL: number;
287
+ sells: Array<{
288
+ asset: string;
289
+ amount: number;
290
+ usdValue: number;
291
+ realizedPnL: number;
292
+ tx: string;
293
+ }>;
294
+ gasCost: number;
295
+ gasMethod: GasMethod;
296
+ }
297
+ interface StrategyRebalanceResult {
298
+ success: boolean;
299
+ strategy: string;
300
+ trades: Array<{
301
+ action: 'buy' | 'sell';
302
+ asset: string;
303
+ usdAmount: number;
304
+ amount: number;
305
+ tx: string;
306
+ }>;
307
+ beforeWeights: Record<string, number>;
308
+ afterWeights: Record<string, number>;
309
+ targetWeights: Record<string, number>;
310
+ }
311
+ interface StrategyStatusResult {
312
+ definition: StrategyDefinition;
313
+ positions: InvestmentPosition[];
314
+ currentWeights: Record<string, number>;
315
+ totalValue: number;
316
+ }
317
+ interface AutoInvestSchedule {
318
+ id: string;
319
+ strategy?: string;
320
+ asset?: string;
321
+ amount: number;
322
+ frequency: 'daily' | 'weekly' | 'monthly';
323
+ dayOfWeek?: number;
324
+ dayOfMonth?: number;
325
+ lastRun?: string;
326
+ nextRun: string;
327
+ enabled: boolean;
328
+ totalInvested: number;
329
+ runCount: number;
330
+ }
331
+ interface AutoInvestStatus {
332
+ schedules: AutoInvestSchedule[];
333
+ pendingRuns: AutoInvestSchedule[];
334
+ }
335
+ interface AutoInvestRunResult {
336
+ executed: Array<{
337
+ scheduleId: string;
338
+ strategy?: string;
339
+ asset?: string;
340
+ amount: number;
341
+ result: StrategyBuyResult | InvestResult;
342
+ }>;
343
+ skipped: Array<{
344
+ scheduleId: string;
345
+ reason: string;
346
+ }>;
347
+ }
262
348
  type PositionSide = 'long' | 'short';
263
349
  interface PerpsPosition {
264
350
  market: string;
@@ -621,4 +707,4 @@ declare function attack(client: SuiJsonRpcClient, signer: Ed25519Keypair, sentin
621
707
  /** All registered protocol descriptors — used by the indexer for event classification */
622
708
  declare const allDescriptors: ProtocolDescriptor[];
623
709
 
624
- export { descriptor$3 as $, type AdapterCapability as A, type BalanceResponse as B, CetusAdapter as C, type DepositInfo as D, type EarningsResult as E, type FundStatusResult as F, type GasMethod as G, type HealthFactorResult as H, type InvestmentTrade as I, type RebalanceStep as J, type SentinelVerdict as K, type LendingAdapter as L, type MaxWithdrawResult as M, NaviAdapter as N, SuilendAdapter as O, type PortfolioResult as P, type SwapQuote as Q, type RepayResult as R, type SendResult as S, type T2000Options as T, type TradePositionsResult as U, type TradeResult as V, type WithdrawResult as W, allDescriptors as X, descriptor$2 as Y, getSentinelInfo as Z, listSentinels as _, type TransactionRecord as a, requestAttack as a0, attack as a1, descriptor as a2, settleAttack as a3, submitPrompt as a4, descriptor$1 as a5, type SwapAdapter as b, type SaveResult as c, type BorrowResult as d, type MaxBorrowResult as e, type SwapResult as f, type InvestResult as g, type InvestEarnResult as h, type PositionsResult as i, type RatesResult as j, type LendingRates as k, type RebalanceResult as l, type SentinelAgent as m, type SentinelAttackResult as n, type AdapterPositions as o, type AdapterTxResult as p, type AssetRates as q, type GasReserve as r, type HealthInfo as s, type InvestmentPosition as t, type PerpsAdapter as u, type PerpsPosition as v, type PositionEntry as w, type PositionSide as x, type ProtocolDescriptor as y, ProtocolRegistry as z };
710
+ export { SuilendAdapter as $, type AutoInvestSchedule as A, type BalanceResponse as B, CetusAdapter as C, type DepositInfo as D, type EarningsResult as E, type FundStatusResult as F, type GasMethod as G, type HealthFactorResult as H, type InvestmentTrade as I, type GasReserve as J, type HealthInfo as K, type LendingAdapter as L, type MaxWithdrawResult as M, NaviAdapter as N, type PerpsAdapter as O, type PortfolioResult as P, type PerpsPosition as Q, type RepayResult as R, type StrategyDefinition as S, type T2000Options as T, type PositionEntry as U, type PositionSide as V, type WithdrawResult as W, type ProtocolDescriptor as X, ProtocolRegistry as Y, type RebalanceStep as Z, type SentinelVerdict as _, type AutoInvestStatus as a, type SwapQuote as a0, type TradePositionsResult as a1, type TradeResult as a2, allDescriptors as a3, descriptor$2 as a4, getSentinelInfo as a5, listSentinels as a6, descriptor$3 as a7, requestAttack as a8, attack as a9, descriptor as aa, settleAttack as ab, submitPrompt as ac, descriptor$1 as ad, type SendResult as b, type TransactionRecord as c, type SwapAdapter as d, type SaveResult as e, type BorrowResult as f, type MaxBorrowResult as g, type SwapResult as h, type InvestResult as i, type InvestEarnResult as j, type StrategyBuyResult as k, type StrategySellResult as l, type StrategyRebalanceResult as m, type StrategyStatusResult as n, type AutoInvestRunResult as o, type InvestmentPosition as p, type PositionsResult as q, type RatesResult as r, type LendingRates as s, type RebalanceResult as t, type SentinelAgent as u, type SentinelAttackResult as v, type AdapterCapability as w, type AdapterPositions as x, type AdapterTxResult as y, type AssetRates as z };