@scallop-io/sui-scallop-sdk 0.44.24 → 0.44.26
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/builders/vescaBuilder.d.ts +3 -2
- package/dist/constants/common.d.ts +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallopQuery.d.ts +8 -0
- package/dist/queries/borrowIncentiveQuery.d.ts +8 -0
- package/dist/types/builder/borrowIncentive.d.ts +10 -9
- package/dist/types/builder/vesca.d.ts +9 -9
- package/package.json +1 -1
- package/src/builders/borrowIncentiveBuilder.ts +16 -3
- package/src/builders/vescaBuilder.ts +5 -6
- package/src/constants/common.ts +4 -0
- package/src/constants/enum.ts +4 -0
- package/src/types/builder/borrowIncentive.ts +19 -18
- package/src/types/builder/vesca.ts +8 -9
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiTxBlock, TransactionBlock, SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
|
|
2
2
|
import { ScallopBuilder } from '../models';
|
|
3
|
+
import type { SuiObjectArg } from '@scallop-io/sui-kit';
|
|
3
4
|
import type { ScallopTxBlock, VeScaTxBlock } from 'src/types';
|
|
4
5
|
/**
|
|
5
6
|
* Check and get veSCA data from transaction block.
|
|
@@ -13,7 +14,7 @@ import type { ScallopTxBlock, VeScaTxBlock } from 'src/types';
|
|
|
13
14
|
* @param veScaKey - veSCA key.
|
|
14
15
|
* @return veSCA key, ID, locked amount and unlock at timestamp.
|
|
15
16
|
*/
|
|
16
|
-
export declare const requireVeSca: (builder: ScallopBuilder, SuiTxBlock: SuiTxBlock, veScaKey?:
|
|
17
|
+
export declare const requireVeSca: (builder: ScallopBuilder, SuiTxBlock: SuiTxBlock, veScaKey?: SuiObjectArg | undefined) => Promise<import("src/types").Vesca | undefined>;
|
|
17
18
|
/**
|
|
18
19
|
* Create an enhanced transaction block instance for interaction with veSCA modules of the Scallop contract.
|
|
19
20
|
*
|
|
@@ -10,7 +10,7 @@ export declare const SUPPORT_POOLS: readonly ["eth", "btc", "usdc", "usdt", "sui
|
|
|
10
10
|
export declare const SUPPORT_COLLATERALS: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus", "afsui", "hasui", "vsui", "sca"];
|
|
11
11
|
export declare const SUPPORT_SPOOLS: readonly ["seth", "ssui", "susdc", "susdt", "scetus", "safsui", "shasui", "svsui"];
|
|
12
12
|
export declare const SUPPORT_SPOOLS_REWARDS: readonly ["sui"];
|
|
13
|
-
export declare const SUPPORT_BORROW_INCENTIVE_POOLS: readonly ["sui", "usdc", "usdt", "sca"];
|
|
13
|
+
export declare const SUPPORT_BORROW_INCENTIVE_POOLS: readonly ["sui", "usdc", "usdt", "afsui", "hasui", "vsui", "eth", "sca"];
|
|
14
14
|
export declare const SUPPORT_BORROW_INCENTIVE_REWARDS: readonly ["sui", "sca"];
|
|
15
15
|
export declare const SUPPORT_ORACLES: readonly ["supra", "switchboard", "pyth"];
|
|
16
16
|
export declare const SUPPORT_PACKAGES: readonly ["coinDecimalsRegistry", "math", "whitelist", "x", "protocol", "protocolWhitelist", "query", "supra", "pyth", "switchboard", "xOracle", "testCoin"];
|
package/dist/index.js
CHANGED
|
@@ -122,6 +122,10 @@ var SUPPORT_BORROW_INCENTIVE_POOLS = [
|
|
|
122
122
|
"sui",
|
|
123
123
|
"usdc",
|
|
124
124
|
"usdt",
|
|
125
|
+
"afsui",
|
|
126
|
+
"hasui",
|
|
127
|
+
"vsui",
|
|
128
|
+
"eth",
|
|
125
129
|
"sca"
|
|
126
130
|
];
|
|
127
131
|
var SUPPORT_BORROW_INCENTIVE_REWARDS = ["sui", "sca"];
|
|
@@ -220,7 +224,11 @@ var borrowIncentiveRewardCoins = {
|
|
|
220
224
|
sui: ["sui", "sca"],
|
|
221
225
|
usdc: ["sui", "sca"],
|
|
222
226
|
usdt: ["sui", "sca"],
|
|
223
|
-
sca: ["sui", "sca"]
|
|
227
|
+
sca: ["sui", "sca"],
|
|
228
|
+
afsui: ["sui"],
|
|
229
|
+
hasui: ["sui"],
|
|
230
|
+
vsui: ["sui"],
|
|
231
|
+
eth: ["sui"]
|
|
224
232
|
};
|
|
225
233
|
var coinIds = {
|
|
226
234
|
sui: "0x0000000000000000000000000000000000000000000000000000000000000002",
|
|
@@ -5037,6 +5045,19 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
5037
5045
|
],
|
|
5038
5046
|
[rewardType]
|
|
5039
5047
|
);
|
|
5048
|
+
},
|
|
5049
|
+
deactivateBoost: (obligation, veScaKey) => {
|
|
5050
|
+
return txBlock.moveCall(
|
|
5051
|
+
`${borrowIncentiveIds.borrowIncentivePkg}::user::deactivate_boost`,
|
|
5052
|
+
[
|
|
5053
|
+
borrowIncentiveIds.config,
|
|
5054
|
+
borrowIncentiveIds.incentivePools,
|
|
5055
|
+
borrowIncentiveIds.incentiveAccounts,
|
|
5056
|
+
obligation,
|
|
5057
|
+
veScaKey,
|
|
5058
|
+
import_utils17.SUI_CLOCK_OBJECT_ID
|
|
5059
|
+
]
|
|
5060
|
+
);
|
|
5040
5061
|
}
|
|
5041
5062
|
};
|
|
5042
5063
|
};
|