@scallop-io/sui-scallop-sdk 2.3.7 → 2.3.9
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 +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +30 -30
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
- package/src/builders/coreBuilder.ts +68 -0
- package/src/models/scallopSuiKit.ts +13 -8
- package/src/queries/borrowIncentiveQuery.ts +35 -2
- package/src/queries/coreQuery.ts +42 -6
- package/src/queries/sCoinQuery.ts +17 -1
- package/src/queries/vescaQuery.ts +23 -2
- package/src/types/builder/core.ts +18 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/object.ts +40 -0
package/dist/index.d.mts
CHANGED
|
@@ -459,6 +459,8 @@ type QueryInspectTxnParams = {
|
|
|
459
459
|
queryTarget: string;
|
|
460
460
|
args: SuiObjectArg[];
|
|
461
461
|
typeArgs?: any[];
|
|
462
|
+
txBlock?: SuiTxBlock;
|
|
463
|
+
keys?: QueryKey;
|
|
462
464
|
};
|
|
463
465
|
type ScallopSuiKitParams = {
|
|
464
466
|
suiKit?: SuiKit;
|
|
@@ -512,7 +514,7 @@ declare class ScallopSuiKit extends ScallopQueryClient {
|
|
|
512
514
|
* @param txBlock
|
|
513
515
|
* @returns Promise<DevInspectResults>
|
|
514
516
|
*/
|
|
515
|
-
queryInspectTxn({ queryTarget, args, typeArgs, }: QueryInspectTxnParams): Promise<DevInspectResults | null>;
|
|
517
|
+
queryInspectTxn({ queryTarget, args, typeArgs, txBlock, keys, }: QueryInspectTxnParams): Promise<DevInspectResults | null>;
|
|
516
518
|
}
|
|
517
519
|
|
|
518
520
|
type ScallopQueryParams = {
|
|
@@ -1856,6 +1858,7 @@ type CoreNormalMethods = {
|
|
|
1856
1858
|
repay: (obligation: SuiObjectArg, coin: SuiObjectArg, poolCoinName: string) => void;
|
|
1857
1859
|
borrowFlashLoan: (amount: number | SuiTxArg, poolCoinName: string) => TransactionResult;
|
|
1858
1860
|
repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: string) => void;
|
|
1861
|
+
liquidate: (obligation: SuiObjectArg, coin: SuiObjectArg, debtCoinName: string, collateralCoinName: string) => [NestedResult, NestedResult];
|
|
1859
1862
|
};
|
|
1860
1863
|
type CoreQuickMethods = {
|
|
1861
1864
|
addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<void>;
|
|
@@ -1886,6 +1889,12 @@ type CoreQuickMethods = {
|
|
|
1886
1889
|
sponsoredFeeds?: string[];
|
|
1887
1890
|
isSponsoredTx?: boolean;
|
|
1888
1891
|
}) => Promise<void>;
|
|
1892
|
+
liquidateQuick: (amount: number, debtCoinName: string, collateralCoinName: string, obligationId: SuiObjectArg, updateOracleOptions?: {
|
|
1893
|
+
usePythPullModel?: boolean;
|
|
1894
|
+
useOnChainXOracleList?: boolean;
|
|
1895
|
+
sponsoredFeeds?: string[];
|
|
1896
|
+
isSponsoredTx?: boolean;
|
|
1897
|
+
}) => Promise<[NestedResult, NestedResult]>;
|
|
1889
1898
|
};
|
|
1890
1899
|
type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
|
|
1891
1900
|
type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;
|
package/dist/index.d.ts
CHANGED
|
@@ -459,6 +459,8 @@ type QueryInspectTxnParams = {
|
|
|
459
459
|
queryTarget: string;
|
|
460
460
|
args: SuiObjectArg[];
|
|
461
461
|
typeArgs?: any[];
|
|
462
|
+
txBlock?: SuiTxBlock;
|
|
463
|
+
keys?: QueryKey;
|
|
462
464
|
};
|
|
463
465
|
type ScallopSuiKitParams = {
|
|
464
466
|
suiKit?: SuiKit;
|
|
@@ -512,7 +514,7 @@ declare class ScallopSuiKit extends ScallopQueryClient {
|
|
|
512
514
|
* @param txBlock
|
|
513
515
|
* @returns Promise<DevInspectResults>
|
|
514
516
|
*/
|
|
515
|
-
queryInspectTxn({ queryTarget, args, typeArgs, }: QueryInspectTxnParams): Promise<DevInspectResults | null>;
|
|
517
|
+
queryInspectTxn({ queryTarget, args, typeArgs, txBlock, keys, }: QueryInspectTxnParams): Promise<DevInspectResults | null>;
|
|
516
518
|
}
|
|
517
519
|
|
|
518
520
|
type ScallopQueryParams = {
|
|
@@ -1856,6 +1858,7 @@ type CoreNormalMethods = {
|
|
|
1856
1858
|
repay: (obligation: SuiObjectArg, coin: SuiObjectArg, poolCoinName: string) => void;
|
|
1857
1859
|
borrowFlashLoan: (amount: number | SuiTxArg, poolCoinName: string) => TransactionResult;
|
|
1858
1860
|
repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: string) => void;
|
|
1861
|
+
liquidate: (obligation: SuiObjectArg, coin: SuiObjectArg, debtCoinName: string, collateralCoinName: string) => [NestedResult, NestedResult];
|
|
1859
1862
|
};
|
|
1860
1863
|
type CoreQuickMethods = {
|
|
1861
1864
|
addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<void>;
|
|
@@ -1886,6 +1889,12 @@ type CoreQuickMethods = {
|
|
|
1886
1889
|
sponsoredFeeds?: string[];
|
|
1887
1890
|
isSponsoredTx?: boolean;
|
|
1888
1891
|
}) => Promise<void>;
|
|
1892
|
+
liquidateQuick: (amount: number, debtCoinName: string, collateralCoinName: string, obligationId: SuiObjectArg, updateOracleOptions?: {
|
|
1893
|
+
usePythPullModel?: boolean;
|
|
1894
|
+
useOnChainXOracleList?: boolean;
|
|
1895
|
+
sponsoredFeeds?: string[];
|
|
1896
|
+
isSponsoredTx?: boolean;
|
|
1897
|
+
}) => Promise<[NestedResult, NestedResult]>;
|
|
1889
1898
|
};
|
|
1890
1899
|
type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
|
|
1891
1900
|
type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;
|