@scallop-io/sui-scallop-sdk 2.3.11 → 2.3.12
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/README.md +7 -7
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +20 -20
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/models/scallopAddress.ts +1 -1
- package/src/models/scallopQuery.ts +7 -6
- package/src/models/scallopUtils.ts +9 -7
- package/src/queries/borrowIncentiveQuery.ts +21 -14
- package/src/queries/coreQuery.ts +9 -3
- package/src/queries/isolatedAssetQuery.ts +5 -2
- package/src/queries/portfolioQuery.ts +123 -109
- package/src/queries/priceQuery.ts +2 -130
- package/src/queries/vescaQuery.ts +9 -4
- package/src/types/query/portfolio.ts +10 -0
- package/src/utils/query.ts +5 -10
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ This SDK is used to interact with [sui-lending-protocol](https://github.com/scal
|
|
|
45
45
|
```typescript
|
|
46
46
|
// Create an instance quickly through the`Scallop` class to construct other models.
|
|
47
47
|
const scallopSDK = new Scallop({
|
|
48
|
-
addressId: '
|
|
48
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
49
49
|
networkType: 'mainnet',
|
|
50
50
|
secretKey: [secretKey]
|
|
51
51
|
...
|
|
@@ -83,27 +83,27 @@ This SDK is used to interact with [sui-lending-protocol](https://github.com/scal
|
|
|
83
83
|
} from '@scallop-io/sui-scallop-sdk'
|
|
84
84
|
|
|
85
85
|
const scallopAddress = new ScallopAddress(
|
|
86
|
-
addressId: '
|
|
86
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
87
87
|
...
|
|
88
88
|
);
|
|
89
89
|
const scallopConstants = new ScallopConstants(
|
|
90
|
-
addressId: '
|
|
90
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
91
91
|
...
|
|
92
92
|
);
|
|
93
93
|
const scallopQuery = new ScallopQuery(
|
|
94
|
-
addressId: '
|
|
94
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
95
95
|
...
|
|
96
96
|
);
|
|
97
97
|
const scallopBuilder = new ScallopBuilder(
|
|
98
|
-
addressId: '
|
|
98
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
99
99
|
...
|
|
100
100
|
);
|
|
101
101
|
const scallopUtils = new ScallopUtils(
|
|
102
|
-
addressId: '
|
|
102
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
103
103
|
...
|
|
104
104
|
);
|
|
105
105
|
const scallopClient = new ScallopClient(
|
|
106
|
-
addressId: '
|
|
106
|
+
addressId: '695fcdc084f790c04eb068dc',
|
|
107
107
|
...
|
|
108
108
|
);
|
|
109
109
|
const scallopIndexer = new ScallopIndexer();
|
package/dist/index.d.mts
CHANGED
|
@@ -976,7 +976,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
976
976
|
/**
|
|
977
977
|
* Check if asset is an isolated asset
|
|
978
978
|
*/
|
|
979
|
-
isIsolatedAsset(assetCoinName: string): Promise<boolean>;
|
|
979
|
+
isIsolatedAsset(assetCoinName: string, useOnChainQuery?: boolean): Promise<boolean>;
|
|
980
980
|
/**
|
|
981
981
|
* Get pool coin price from indexer
|
|
982
982
|
* @param coinName
|
|
@@ -1055,7 +1055,10 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
1055
1055
|
coinName: string;
|
|
1056
1056
|
symbol: string;
|
|
1057
1057
|
coinType: string;
|
|
1058
|
+
boostValue: number;
|
|
1059
|
+
maxBoost: number;
|
|
1058
1060
|
incentiveApr: number;
|
|
1061
|
+
boostedIncentiveApr: number;
|
|
1059
1062
|
}[];
|
|
1060
1063
|
}[];
|
|
1061
1064
|
}[];
|
|
@@ -2956,6 +2959,12 @@ type ObligationDebt = {
|
|
|
2956
2959
|
availableBorrowCoin: number;
|
|
2957
2960
|
availableRepayAmount: number;
|
|
2958
2961
|
availableRepayCoin: number;
|
|
2962
|
+
rewards: {
|
|
2963
|
+
boostValue: number;
|
|
2964
|
+
maxBoost: number;
|
|
2965
|
+
baseRewardApr: number;
|
|
2966
|
+
boostedRewardApr: number;
|
|
2967
|
+
}[];
|
|
2959
2968
|
};
|
|
2960
2969
|
type ObligationBorrowIncentiveReward = {
|
|
2961
2970
|
coinName: string;
|
|
@@ -2966,7 +2975,10 @@ type ObligationBorrowIncentiveReward = {
|
|
|
2966
2975
|
weightedBorrowAmount: number;
|
|
2967
2976
|
availableClaimCoin: number;
|
|
2968
2977
|
availableClaimAmount: number;
|
|
2978
|
+
baseRewardApr: number;
|
|
2969
2979
|
boostValue: number;
|
|
2980
|
+
boostedRewardApr: number;
|
|
2981
|
+
maxBoost: number;
|
|
2970
2982
|
};
|
|
2971
2983
|
type ObligationBorrowIncentive = {
|
|
2972
2984
|
coinName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -976,7 +976,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
976
976
|
/**
|
|
977
977
|
* Check if asset is an isolated asset
|
|
978
978
|
*/
|
|
979
|
-
isIsolatedAsset(assetCoinName: string): Promise<boolean>;
|
|
979
|
+
isIsolatedAsset(assetCoinName: string, useOnChainQuery?: boolean): Promise<boolean>;
|
|
980
980
|
/**
|
|
981
981
|
* Get pool coin price from indexer
|
|
982
982
|
* @param coinName
|
|
@@ -1055,7 +1055,10 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
1055
1055
|
coinName: string;
|
|
1056
1056
|
symbol: string;
|
|
1057
1057
|
coinType: string;
|
|
1058
|
+
boostValue: number;
|
|
1059
|
+
maxBoost: number;
|
|
1058
1060
|
incentiveApr: number;
|
|
1061
|
+
boostedIncentiveApr: number;
|
|
1059
1062
|
}[];
|
|
1060
1063
|
}[];
|
|
1061
1064
|
}[];
|
|
@@ -2956,6 +2959,12 @@ type ObligationDebt = {
|
|
|
2956
2959
|
availableBorrowCoin: number;
|
|
2957
2960
|
availableRepayAmount: number;
|
|
2958
2961
|
availableRepayCoin: number;
|
|
2962
|
+
rewards: {
|
|
2963
|
+
boostValue: number;
|
|
2964
|
+
maxBoost: number;
|
|
2965
|
+
baseRewardApr: number;
|
|
2966
|
+
boostedRewardApr: number;
|
|
2967
|
+
}[];
|
|
2959
2968
|
};
|
|
2960
2969
|
type ObligationBorrowIncentiveReward = {
|
|
2961
2970
|
coinName: string;
|
|
@@ -2966,7 +2975,10 @@ type ObligationBorrowIncentiveReward = {
|
|
|
2966
2975
|
weightedBorrowAmount: number;
|
|
2967
2976
|
availableClaimCoin: number;
|
|
2968
2977
|
availableClaimAmount: number;
|
|
2978
|
+
baseRewardApr: number;
|
|
2969
2979
|
boostValue: number;
|
|
2980
|
+
boostedRewardApr: number;
|
|
2981
|
+
maxBoost: number;
|
|
2970
2982
|
};
|
|
2971
2983
|
type ObligationBorrowIncentive = {
|
|
2972
2984
|
coinName: string;
|