@scallop-io/sui-scallop-sdk 0.44.25 → 0.44.27
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/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- 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 +26 -6
- package/src/builders/vescaBuilder.ts +5 -6
- package/src/types/builder/borrowIncentive.ts +20 -20
- package/src/types/builder/vesca.ts +8 -9
package/dist/index.mjs
CHANGED
|
@@ -4862,10 +4862,13 @@ var requireObligationInfo2 = async (...params) => {
|
|
|
4862
4862
|
if (obligations.length === 0) {
|
|
4863
4863
|
throw new Error(`No obligation found for sender ${sender}`);
|
|
4864
4864
|
}
|
|
4865
|
+
const selectedObligation = obligations.find(
|
|
4866
|
+
(obligation) => obligation.id === obligationId || obligation.keyId === obligationKey
|
|
4867
|
+
) ?? obligations[0];
|
|
4865
4868
|
return {
|
|
4866
|
-
obligationId:
|
|
4867
|
-
obligationKey:
|
|
4868
|
-
obligationLocked:
|
|
4869
|
+
obligationId: selectedObligation.id,
|
|
4870
|
+
obligationKey: selectedObligation.keyId,
|
|
4871
|
+
obligationLocked: selectedObligation.locked
|
|
4869
4872
|
};
|
|
4870
4873
|
};
|
|
4871
4874
|
var getBindedObligationId = async (builder, veScaKey) => {
|
|
@@ -4980,6 +4983,19 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
4980
4983
|
],
|
|
4981
4984
|
[rewardType]
|
|
4982
4985
|
);
|
|
4986
|
+
},
|
|
4987
|
+
deactivateBoost: (obligation, veScaKey) => {
|
|
4988
|
+
return txBlock.moveCall(
|
|
4989
|
+
`${borrowIncentiveIds.borrowIncentivePkg}::user::deactivate_boost`,
|
|
4990
|
+
[
|
|
4991
|
+
borrowIncentiveIds.config,
|
|
4992
|
+
borrowIncentiveIds.incentivePools,
|
|
4993
|
+
borrowIncentiveIds.incentiveAccounts,
|
|
4994
|
+
obligation,
|
|
4995
|
+
veScaKey,
|
|
4996
|
+
SUI_CLOCK_OBJECT_ID5
|
|
4997
|
+
]
|
|
4998
|
+
);
|
|
4983
4999
|
}
|
|
4984
5000
|
};
|
|
4985
5001
|
};
|