lll-sdk 0.0.0-experimental-20250902145508 → 0.0.0-experimental-20250902202808
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/dist/index.d.mts +30 -25
- package/dist/index.d.ts +30 -25
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -147,7 +147,8 @@ type PositionCloseParams = {
|
|
|
147
147
|
positionId: string;
|
|
148
148
|
};
|
|
149
149
|
type CalculateOpenPositionParams = {
|
|
150
|
-
|
|
150
|
+
baseToken: string;
|
|
151
|
+
quoteToken: string;
|
|
151
152
|
isLong: boolean;
|
|
152
153
|
isQuote: boolean;
|
|
153
154
|
depositAmount: Decimal;
|
|
@@ -164,6 +165,22 @@ type PositionManageLeverageParams = {
|
|
|
164
165
|
targetLeverage: number;
|
|
165
166
|
slippage: number;
|
|
166
167
|
};
|
|
168
|
+
type PositionRepayParams = {
|
|
169
|
+
marketId: string;
|
|
170
|
+
positionId: string;
|
|
171
|
+
amount: Decimal;
|
|
172
|
+
isQuote: boolean;
|
|
173
|
+
clmmPool: string;
|
|
174
|
+
slippage: number;
|
|
175
|
+
};
|
|
176
|
+
type PositionTopUpCokenParams = {
|
|
177
|
+
marketId: string;
|
|
178
|
+
positionId: string;
|
|
179
|
+
amount: Decimal;
|
|
180
|
+
isQuote: boolean;
|
|
181
|
+
clmmPool: string;
|
|
182
|
+
slippage: number;
|
|
183
|
+
};
|
|
167
184
|
|
|
168
185
|
declare class SuiLendModule {
|
|
169
186
|
private sdk;
|
|
@@ -561,6 +578,14 @@ declare class LeverageModules {
|
|
|
561
578
|
* 杠杆仓位平仓
|
|
562
579
|
*/
|
|
563
580
|
leveragePositionClose: (params: PositionCloseParams, txb?: Transaction) => Promise<Transaction>;
|
|
581
|
+
/**
|
|
582
|
+
* 杠杆仓位偿还
|
|
583
|
+
*/
|
|
584
|
+
positionRepay: (params: PositionRepayParams) => Promise<Transaction>;
|
|
585
|
+
/**
|
|
586
|
+
* 杠杆仓位追加保证金
|
|
587
|
+
*/
|
|
588
|
+
positionTopUpCoken: (params: PositionTopUpCokenParams) => Promise<Transaction>;
|
|
564
589
|
/**
|
|
565
590
|
* 计算闪电贷参数
|
|
566
591
|
*/
|
|
@@ -642,30 +667,10 @@ declare class LeverageModules {
|
|
|
642
667
|
* 开仓预计算
|
|
643
668
|
*/
|
|
644
669
|
calculateOpenPosition: (params: CalculateOpenPositionParams) => Promise<{
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
byAmountIn: boolean;
|
|
650
|
-
paths: _cetusprotocol_aggregator_sdk.Path[];
|
|
651
|
-
insufficientLiquidity: boolean;
|
|
652
|
-
deviationRatio?: number;
|
|
653
|
-
packages?: Map<string, string>;
|
|
654
|
-
totalDeepFee?: number;
|
|
655
|
-
error?: _cetusprotocol_aggregator_sdk.RouterError;
|
|
656
|
-
overlayFee?: number;
|
|
657
|
-
amount_in?: undefined;
|
|
658
|
-
amount_out?: undefined;
|
|
659
|
-
route_obj?: undefined;
|
|
660
|
-
originRes?: undefined;
|
|
661
|
-
} | {
|
|
662
|
-
amount_in: any;
|
|
663
|
-
amount_out: any;
|
|
664
|
-
is_exceed: any;
|
|
665
|
-
route_obj: any;
|
|
666
|
-
byAmountIn: boolean;
|
|
667
|
-
originRes: any;
|
|
668
|
-
} | null>;
|
|
670
|
+
amountIn: any;
|
|
671
|
+
amountOut: any;
|
|
672
|
+
amountOutLimit: string;
|
|
673
|
+
}>;
|
|
669
674
|
}
|
|
670
675
|
|
|
671
676
|
interface SdkOptions extends BaseSdkOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -147,7 +147,8 @@ type PositionCloseParams = {
|
|
|
147
147
|
positionId: string;
|
|
148
148
|
};
|
|
149
149
|
type CalculateOpenPositionParams = {
|
|
150
|
-
|
|
150
|
+
baseToken: string;
|
|
151
|
+
quoteToken: string;
|
|
151
152
|
isLong: boolean;
|
|
152
153
|
isQuote: boolean;
|
|
153
154
|
depositAmount: Decimal;
|
|
@@ -164,6 +165,22 @@ type PositionManageLeverageParams = {
|
|
|
164
165
|
targetLeverage: number;
|
|
165
166
|
slippage: number;
|
|
166
167
|
};
|
|
168
|
+
type PositionRepayParams = {
|
|
169
|
+
marketId: string;
|
|
170
|
+
positionId: string;
|
|
171
|
+
amount: Decimal;
|
|
172
|
+
isQuote: boolean;
|
|
173
|
+
clmmPool: string;
|
|
174
|
+
slippage: number;
|
|
175
|
+
};
|
|
176
|
+
type PositionTopUpCokenParams = {
|
|
177
|
+
marketId: string;
|
|
178
|
+
positionId: string;
|
|
179
|
+
amount: Decimal;
|
|
180
|
+
isQuote: boolean;
|
|
181
|
+
clmmPool: string;
|
|
182
|
+
slippage: number;
|
|
183
|
+
};
|
|
167
184
|
|
|
168
185
|
declare class SuiLendModule {
|
|
169
186
|
private sdk;
|
|
@@ -561,6 +578,14 @@ declare class LeverageModules {
|
|
|
561
578
|
* 杠杆仓位平仓
|
|
562
579
|
*/
|
|
563
580
|
leveragePositionClose: (params: PositionCloseParams, txb?: Transaction) => Promise<Transaction>;
|
|
581
|
+
/**
|
|
582
|
+
* 杠杆仓位偿还
|
|
583
|
+
*/
|
|
584
|
+
positionRepay: (params: PositionRepayParams) => Promise<Transaction>;
|
|
585
|
+
/**
|
|
586
|
+
* 杠杆仓位追加保证金
|
|
587
|
+
*/
|
|
588
|
+
positionTopUpCoken: (params: PositionTopUpCokenParams) => Promise<Transaction>;
|
|
564
589
|
/**
|
|
565
590
|
* 计算闪电贷参数
|
|
566
591
|
*/
|
|
@@ -642,30 +667,10 @@ declare class LeverageModules {
|
|
|
642
667
|
* 开仓预计算
|
|
643
668
|
*/
|
|
644
669
|
calculateOpenPosition: (params: CalculateOpenPositionParams) => Promise<{
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
byAmountIn: boolean;
|
|
650
|
-
paths: _cetusprotocol_aggregator_sdk.Path[];
|
|
651
|
-
insufficientLiquidity: boolean;
|
|
652
|
-
deviationRatio?: number;
|
|
653
|
-
packages?: Map<string, string>;
|
|
654
|
-
totalDeepFee?: number;
|
|
655
|
-
error?: _cetusprotocol_aggregator_sdk.RouterError;
|
|
656
|
-
overlayFee?: number;
|
|
657
|
-
amount_in?: undefined;
|
|
658
|
-
amount_out?: undefined;
|
|
659
|
-
route_obj?: undefined;
|
|
660
|
-
originRes?: undefined;
|
|
661
|
-
} | {
|
|
662
|
-
amount_in: any;
|
|
663
|
-
amount_out: any;
|
|
664
|
-
is_exceed: any;
|
|
665
|
-
route_obj: any;
|
|
666
|
-
byAmountIn: boolean;
|
|
667
|
-
originRes: any;
|
|
668
|
-
} | null>;
|
|
670
|
+
amountIn: any;
|
|
671
|
+
amountOut: any;
|
|
672
|
+
amountOutLimit: string;
|
|
673
|
+
}>;
|
|
669
674
|
}
|
|
670
675
|
|
|
671
676
|
interface SdkOptions extends BaseSdkOptions {
|