@scallop-io/sui-scallop-sdk 1.3.4-alpha.5 → 1.3.4-alpha.7
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/borrowIncentiveBuilder.d.ts +1 -1
- package/dist/builders/coreBuilder.d.ts +2 -2
- package/dist/builders/index.d.ts +2 -2
- package/dist/builders/oracle.d.ts +2 -2
- package/dist/builders/referralBuilder.d.ts +1 -1
- package/dist/builders/spoolBuilder.d.ts +2 -2
- package/dist/builders/vescaBuilder.d.ts +2 -2
- package/dist/constants/coinGecko.d.ts +1 -1
- package/dist/constants/enum.d.ts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/index.js +96 -96
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -96
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallop.d.ts +1 -1
- package/dist/models/scallopAddress.d.ts +1 -1
- package/dist/models/scallopBuilder.d.ts +1 -1
- package/dist/models/scallopClient.d.ts +8 -8
- package/dist/models/scallopIndexer.d.ts +1 -1
- package/dist/models/scallopQuery.d.ts +96 -96
- package/dist/models/scallopUtils.d.ts +2 -2
- package/dist/queries/borrowIncentiveQuery.d.ts +12 -12
- package/dist/queries/coreQuery.d.ts +2 -2
- package/dist/queries/isolatedAssetQuery.d.ts +2 -2
- package/dist/queries/portfolioQuery.d.ts +2 -2
- package/dist/queries/priceQuery.d.ts +2 -2
- package/dist/queries/spoolQuery.d.ts +2 -2
- package/dist/queries/supplyLimitQuery.d.ts +2 -2
- package/dist/queries/vescaQuery.d.ts +2 -2
- package/dist/types/address.d.ts +1 -1
- package/dist/types/builder/borrowIncentive.d.ts +2 -2
- package/dist/types/builder/core.d.ts +2 -2
- package/dist/types/builder/index.d.ts +4 -5
- package/dist/types/builder/referral.d.ts +1 -1
- package/dist/types/builder/sCoin.d.ts +1 -1
- package/dist/types/builder/spool.d.ts +2 -2
- package/dist/types/constant/common.d.ts +1 -1
- package/dist/types/model.d.ts +2 -2
- package/dist/types/query/borrowIncentive.d.ts +1 -1
- package/dist/types/query/core.d.ts +1 -1
- package/dist/types/query/portfolio.d.ts +1 -1
- package/dist/types/query/spool.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/query.d.ts +2 -2
- package/dist/utils/util.d.ts +2 -2
- package/package.json +1 -1
- package/src/builders/borrowIncentiveBuilder.ts +8 -8
- package/src/builders/coreBuilder.ts +5 -5
- package/src/builders/index.ts +2 -2
- package/src/builders/oracle.ts +4 -4
- package/src/builders/referralBuilder.ts +1 -1
- package/src/builders/spoolBuilder.ts +6 -6
- package/src/builders/vescaBuilder.ts +4 -4
- package/src/constants/coinGecko.ts +1 -1
- package/src/constants/enum.ts +1 -1
- package/src/constants/index.ts +1 -1
- package/src/models/scallop.ts +5 -5
- package/src/models/scallopAddress.ts +6 -9
- package/src/models/scallopBuilder.ts +5 -4
- package/src/models/scallopCache.ts +4 -4
- package/src/models/scallopClient.ts +4 -4
- package/src/models/scallopIndexer.ts +4 -3
- package/src/models/scallopQuery.ts +4 -8
- package/src/models/scallopUtils.ts +8 -11
- package/src/models/suiKit.ts +1 -1
- package/src/queries/borrowIncentiveQuery.ts +5 -5
- package/src/queries/coreQuery.ts +4 -4
- package/src/queries/isolatedAssetQuery.ts +2 -2
- package/src/queries/portfolioQuery.ts +4 -4
- package/src/queries/priceQuery.ts +2 -2
- package/src/queries/spoolQuery.ts +5 -5
- package/src/queries/supplyLimitQuery.ts +2 -2
- package/src/queries/vescaQuery.ts +2 -2
- package/src/types/address.ts +1 -1
- package/src/types/builder/borrowIncentive.ts +3 -3
- package/src/types/builder/core.ts +3 -3
- package/src/types/builder/index.ts +4 -5
- package/src/types/builder/referral.ts +1 -1
- package/src/types/builder/sCoin.ts +1 -1
- package/src/types/builder/spool.ts +2 -2
- package/src/types/constant/common.ts +1 -1
- package/src/types/model.ts +2 -2
- package/src/types/query/borrowIncentive.ts +2 -2
- package/src/types/query/core.ts +1 -1
- package/src/types/query/portfolio.ts +2 -2
- package/src/types/query/spool.ts +1 -1
- package/src/utils/builder.ts +1 -1
- package/src/utils/index.ts +2 -2
- package/src/utils/query.ts +3 -3
- package/src/utils/tokenBucket.ts +1 -1
- package/src/utils/util.ts +4 -4
- package/dist/test.d.ts +0 -0
- package/src/test.ts +0 -30
package/dist/models/scallop.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ScallopClient } from './scallopClient';
|
|
|
4
4
|
import { ScallopBuilder } from './scallopBuilder';
|
|
5
5
|
import { ScallopQuery } from './scallopQuery';
|
|
6
6
|
import { ScallopUtils } from './scallopUtils';
|
|
7
|
-
import { ScallopBuilderParams, ScallopClientParams, ScallopParams, ScallopQueryParams, ScallopUtilsParams } from '
|
|
7
|
+
import type { ScallopBuilderParams, ScallopClientParams, ScallopParams, ScallopQueryParams, ScallopUtilsParams } from '../types/';
|
|
8
8
|
import { ScallopIndexer } from './scallopIndexer';
|
|
9
9
|
import { ScallopCache } from './scallopCache';
|
|
10
10
|
import { QueryClientConfig } from '@tanstack/query-core';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type NetworkType } from '@scallop-io/sui-kit';
|
|
2
|
-
import { ScallopAddressParams, AddressesInterface, AddressStringPath, ScallopAddressInstanceParams } from '
|
|
2
|
+
import type { ScallopAddressParams, AddressesInterface, AddressStringPath, ScallopAddressInstanceParams } from '../types';
|
|
3
3
|
import { ScallopCache } from './scallopCache';
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
@@ -5,7 +5,7 @@ import { ScallopUtils } from './scallopUtils';
|
|
|
5
5
|
import type { SuiTransactionBlockResponse } from '@mysten/sui/client';
|
|
6
6
|
import type { Transaction } from '@mysten/sui/transactions';
|
|
7
7
|
import type { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
|
|
8
|
-
import { ScallopBuilderParams, ScallopTxBlock, SupportMarketCoins, SupportAssetCoins, SupportSCoin, ScallopBuilderInstanceParams, SelectCoinReturnType } from '
|
|
8
|
+
import type { ScallopBuilderParams, ScallopTxBlock, SupportMarketCoins, SupportAssetCoins, SupportSCoin, ScallopBuilderInstanceParams, SelectCoinReturnType } from '../types';
|
|
9
9
|
import { ScallopCache } from './scallopCache';
|
|
10
10
|
/**
|
|
11
11
|
* @description
|
|
@@ -7,7 +7,7 @@ import type { SuiTransactionBlockResponse } from '@mysten/sui/client';
|
|
|
7
7
|
import type { TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
8
8
|
import { ScallopCache } from './scallopCache';
|
|
9
9
|
import type { SuiObjectArg } from '@scallop-io/sui-kit';
|
|
10
|
-
import { ScallopClientFnReturnType, ScallopClientParams, SupportPoolCoins, SupportCollateralCoins, SupportAssetCoins, SupportStakeCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, ScallopTxBlock, ScallopClientVeScaReturnType, ScallopClientInstanceParams } from '
|
|
10
|
+
import type { ScallopClientFnReturnType, ScallopClientParams, SupportPoolCoins, SupportCollateralCoins, SupportAssetCoins, SupportStakeCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, ScallopTxBlock, ScallopClientVeScaReturnType, ScallopClientInstanceParams } from '../types';
|
|
11
11
|
/**
|
|
12
12
|
* @description
|
|
13
13
|
* It provides contract interaction operations for general users.
|
|
@@ -44,7 +44,7 @@ export declare class ScallopClient {
|
|
|
44
44
|
*
|
|
45
45
|
* @return Market data.
|
|
46
46
|
*/
|
|
47
|
-
queryMarket(): Promise<import("
|
|
47
|
+
queryMarket(): Promise<import("../types").Market>;
|
|
48
48
|
/**
|
|
49
49
|
* Get obligations data.
|
|
50
50
|
*
|
|
@@ -54,7 +54,7 @@ export declare class ScallopClient {
|
|
|
54
54
|
* @param ownerAddress - The owner address.
|
|
55
55
|
* @return Obligations data.
|
|
56
56
|
*/
|
|
57
|
-
getObligations(ownerAddress?: string): Promise<import("
|
|
57
|
+
getObligations(ownerAddress?: string): Promise<import("../types").Obligation[]>;
|
|
58
58
|
/**
|
|
59
59
|
* Query obligation data.
|
|
60
60
|
*
|
|
@@ -64,7 +64,7 @@ export declare class ScallopClient {
|
|
|
64
64
|
* @param obligationId - The obligation id.
|
|
65
65
|
* @return Obligation data.
|
|
66
66
|
*/
|
|
67
|
-
queryObligation(obligationId: string): Promise<import("
|
|
67
|
+
queryObligation(obligationId: string): Promise<import("../types").ObligationQueryInterface | undefined>;
|
|
68
68
|
/**
|
|
69
69
|
* Query all stake accounts data.
|
|
70
70
|
*
|
|
@@ -74,7 +74,7 @@ export declare class ScallopClient {
|
|
|
74
74
|
* @param ownerAddress - The owner address.
|
|
75
75
|
* @return All stake accounts data.
|
|
76
76
|
*/
|
|
77
|
-
getAllStakeAccounts(ownerAddress?: string): Promise<import("
|
|
77
|
+
getAllStakeAccounts(ownerAddress?: string): Promise<import("../types").StakeAccounts>;
|
|
78
78
|
/**
|
|
79
79
|
* Query stake account data.
|
|
80
80
|
*
|
|
@@ -85,7 +85,7 @@ export declare class ScallopClient {
|
|
|
85
85
|
* @param ownerAddress - The owner address.
|
|
86
86
|
* @return Stake accounts data.
|
|
87
87
|
*/
|
|
88
|
-
getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<import("
|
|
88
|
+
getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<import("../types").StakeAccount[]>;
|
|
89
89
|
/**
|
|
90
90
|
* Query stake pool data.
|
|
91
91
|
*
|
|
@@ -95,7 +95,7 @@ export declare class ScallopClient {
|
|
|
95
95
|
* @param stakeMarketCoinName - Support stake market coin.
|
|
96
96
|
* @return Stake pool data.
|
|
97
97
|
*/
|
|
98
|
-
getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("
|
|
98
|
+
getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("../types").StakePool | undefined>;
|
|
99
99
|
/**
|
|
100
100
|
* Query reward pool data.
|
|
101
101
|
*
|
|
@@ -105,7 +105,7 @@ export declare class ScallopClient {
|
|
|
105
105
|
* @param stakeMarketCoinName - Support stake market coin.
|
|
106
106
|
* @return Reward pool data.
|
|
107
107
|
*/
|
|
108
|
-
getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("
|
|
108
|
+
getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("../types").StakeRewardPool | undefined>;
|
|
109
109
|
/**
|
|
110
110
|
* Open obligation.
|
|
111
111
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Market, MarketPools, MarketPool, MarketCollaterals, MarketCollateral, Spools, Spool, BorrowIncentivePools, BorrowIncentivePool, SupportPoolCoins, SupportCollateralCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, TotalValueLocked, ScallopQueryParams, ScallopParams, ScallopIndexerInstanceParams } from '
|
|
1
|
+
import type { Market, MarketPools, MarketPool, MarketCollaterals, MarketCollateral, Spools, Spool, BorrowIncentivePools, BorrowIncentivePool, SupportPoolCoins, SupportCollateralCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, TotalValueLocked, ScallopQueryParams, ScallopParams, ScallopIndexerInstanceParams } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* It provides methods to obtain sdk index data from mainnet.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SuiKit } from '@scallop-io/sui-kit';
|
|
2
|
-
import { ScallopQueryParams, SupportStakeMarketCoins, SupportAssetCoins, SupportPoolCoins, SupportCollateralCoins, SupportMarketCoins, SupportBorrowIncentiveCoins, SupportSCoin, ScallopQueryInstanceParams, MarketPool, CoinPrices, MarketPools } from '
|
|
2
|
+
import { ScallopQueryParams, SupportStakeMarketCoins, SupportAssetCoins, SupportPoolCoins, SupportCollateralCoins, SupportMarketCoins, SupportBorrowIncentiveCoins, SupportSCoin, ScallopQueryInstanceParams, MarketPool, CoinPrices, MarketPools } from '../types';
|
|
3
3
|
import { ScallopAddress } from './scallopAddress';
|
|
4
4
|
import { ScallopUtils } from './scallopUtils';
|
|
5
5
|
import { ScallopIndexer } from './scallopIndexer';
|
|
@@ -40,7 +40,7 @@ export declare class ScallopQuery {
|
|
|
40
40
|
*/
|
|
41
41
|
queryMarket(indexer?: boolean, args?: {
|
|
42
42
|
coinPrices: CoinPrices;
|
|
43
|
-
}): Promise<import("
|
|
43
|
+
}): Promise<import("../types").Market>;
|
|
44
44
|
/**
|
|
45
45
|
* Get market pools.
|
|
46
46
|
*
|
|
@@ -93,20 +93,20 @@ export declare class ScallopQuery {
|
|
|
93
93
|
* @return Market collaterals data.
|
|
94
94
|
*/
|
|
95
95
|
getMarketCollaterals(collateralCoinNames?: SupportCollateralCoins[], indexer?: boolean): Promise<{
|
|
96
|
-
usdc?: import("
|
|
97
|
-
sbeth?: import("
|
|
98
|
-
weth?: import("
|
|
99
|
-
wbtc?: import("
|
|
100
|
-
wusdc?: import("
|
|
101
|
-
wusdt?: import("
|
|
102
|
-
sui?: import("
|
|
103
|
-
wapt?: import("
|
|
104
|
-
wsol?: import("
|
|
105
|
-
cetus?: import("
|
|
106
|
-
afsui?: import("
|
|
107
|
-
hasui?: import("
|
|
108
|
-
vsui?: import("
|
|
109
|
-
sca?: import("
|
|
96
|
+
usdc?: import("../types").MarketCollateral | undefined;
|
|
97
|
+
sbeth?: import("../types").MarketCollateral | undefined;
|
|
98
|
+
weth?: import("../types").MarketCollateral | undefined;
|
|
99
|
+
wbtc?: import("../types").MarketCollateral | undefined;
|
|
100
|
+
wusdc?: import("../types").MarketCollateral | undefined;
|
|
101
|
+
wusdt?: import("../types").MarketCollateral | undefined;
|
|
102
|
+
sui?: import("../types").MarketCollateral | undefined;
|
|
103
|
+
wapt?: import("../types").MarketCollateral | undefined;
|
|
104
|
+
wsol?: import("../types").MarketCollateral | undefined;
|
|
105
|
+
cetus?: import("../types").MarketCollateral | undefined;
|
|
106
|
+
afsui?: import("../types").MarketCollateral | undefined;
|
|
107
|
+
hasui?: import("../types").MarketCollateral | undefined;
|
|
108
|
+
vsui?: import("../types").MarketCollateral | undefined;
|
|
109
|
+
sca?: import("../types").MarketCollateral | undefined;
|
|
110
110
|
}>;
|
|
111
111
|
/**
|
|
112
112
|
* Get market collateral
|
|
@@ -115,21 +115,21 @@ export declare class ScallopQuery {
|
|
|
115
115
|
* @param indexer - Whether to use indexer.
|
|
116
116
|
* @return Market collateral data.
|
|
117
117
|
*/
|
|
118
|
-
getMarketCollateral(collateralCoinName: SupportCollateralCoins, indexer?: boolean): Promise<import("
|
|
118
|
+
getMarketCollateral(collateralCoinName: SupportCollateralCoins, indexer?: boolean): Promise<import("../types").MarketCollateral | undefined>;
|
|
119
119
|
/**
|
|
120
120
|
* Get obligations data.
|
|
121
121
|
*
|
|
122
122
|
* @param ownerAddress - The owner address.
|
|
123
123
|
* @return Obligations data.
|
|
124
124
|
*/
|
|
125
|
-
getObligations(ownerAddress?: string): Promise<import("
|
|
125
|
+
getObligations(ownerAddress?: string): Promise<import("../types").Obligation[]>;
|
|
126
126
|
/**
|
|
127
127
|
* Query obligation data.
|
|
128
128
|
*
|
|
129
129
|
* @param obligationId - The obligation id.
|
|
130
130
|
* @return Obligation data.
|
|
131
131
|
*/
|
|
132
|
-
queryObligation(obligationId: string): Promise<import("
|
|
132
|
+
queryObligation(obligationId: string): Promise<import("../types").ObligationQueryInterface | undefined>;
|
|
133
133
|
/**
|
|
134
134
|
* Get all asset coin amounts.
|
|
135
135
|
*
|
|
@@ -137,7 +137,7 @@ export declare class ScallopQuery {
|
|
|
137
137
|
* @param ownerAddress - The owner address.
|
|
138
138
|
* @return All coin amounts.
|
|
139
139
|
*/
|
|
140
|
-
getCoinAmounts(assetCoinNames?: SupportAssetCoins[], ownerAddress?: string): Promise<import("
|
|
140
|
+
getCoinAmounts(assetCoinNames?: SupportAssetCoins[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<SupportAssetCoins, number>>>;
|
|
141
141
|
/**
|
|
142
142
|
* Get asset coin amount.
|
|
143
143
|
*
|
|
@@ -153,7 +153,7 @@ export declare class ScallopQuery {
|
|
|
153
153
|
* @param ownerAddress - The owner address.
|
|
154
154
|
* @return All market market coin amounts.
|
|
155
155
|
*/
|
|
156
|
-
getMarketCoinAmounts(marketCoinNames?: SupportMarketCoins[], ownerAddress?: string): Promise<import("
|
|
156
|
+
getMarketCoinAmounts(marketCoinNames?: SupportMarketCoins[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<SupportMarketCoins, number>>>;
|
|
157
157
|
/**
|
|
158
158
|
* Get market coin amount.
|
|
159
159
|
*
|
|
@@ -187,15 +187,15 @@ export declare class ScallopQuery {
|
|
|
187
187
|
marketPools?: MarketPools;
|
|
188
188
|
coinPrices?: CoinPrices;
|
|
189
189
|
}): Promise<{
|
|
190
|
-
susdc?: import("
|
|
191
|
-
sweth?: import("
|
|
192
|
-
swusdc?: import("
|
|
193
|
-
swusdt?: import("
|
|
194
|
-
ssui?: import("
|
|
195
|
-
scetus?: import("
|
|
196
|
-
safsui?: import("
|
|
197
|
-
shasui?: import("
|
|
198
|
-
svsui?: import("
|
|
190
|
+
susdc?: import("../types").Spool | undefined;
|
|
191
|
+
sweth?: import("../types").Spool | undefined;
|
|
192
|
+
swusdc?: import("../types").Spool | undefined;
|
|
193
|
+
swusdt?: import("../types").Spool | undefined;
|
|
194
|
+
ssui?: import("../types").Spool | undefined;
|
|
195
|
+
scetus?: import("../types").Spool | undefined;
|
|
196
|
+
safsui?: import("../types").Spool | undefined;
|
|
197
|
+
shasui?: import("../types").Spool | undefined;
|
|
198
|
+
svsui?: import("../types").Spool | undefined;
|
|
199
199
|
}>;
|
|
200
200
|
/**
|
|
201
201
|
* Get spool data.
|
|
@@ -207,14 +207,14 @@ export declare class ScallopQuery {
|
|
|
207
207
|
getSpool(stakeMarketCoinName: SupportStakeMarketCoins, indexer?: boolean, args?: {
|
|
208
208
|
marketPool?: MarketPool;
|
|
209
209
|
coinPrices?: CoinPrices;
|
|
210
|
-
}): Promise<import("
|
|
210
|
+
}): Promise<import("../types").Spool | undefined>;
|
|
211
211
|
/**
|
|
212
212
|
* Get stake accounts data for all stake pools (spools).
|
|
213
213
|
*
|
|
214
214
|
* @param ownerAddress - The owner address.
|
|
215
215
|
* @return All Stake accounts data.
|
|
216
216
|
*/
|
|
217
|
-
getAllStakeAccounts(ownerAddress?: string): Promise<import("
|
|
217
|
+
getAllStakeAccounts(ownerAddress?: string): Promise<import("../types").StakeAccounts>;
|
|
218
218
|
/**
|
|
219
219
|
* Get stake accounts data for specific stake pool (spool).
|
|
220
220
|
*
|
|
@@ -222,7 +222,7 @@ export declare class ScallopQuery {
|
|
|
222
222
|
* @param ownerAddress - The owner address.
|
|
223
223
|
* @return Stake accounts data.
|
|
224
224
|
*/
|
|
225
|
-
getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<import("
|
|
225
|
+
getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<import("../types").StakeAccount[]>;
|
|
226
226
|
/**
|
|
227
227
|
* Get stake pools (spools) data.
|
|
228
228
|
*
|
|
@@ -234,15 +234,15 @@ export declare class ScallopQuery {
|
|
|
234
234
|
* @return Stake pools data.
|
|
235
235
|
*/
|
|
236
236
|
getStakePools(stakeMarketCoinNames?: SupportStakeMarketCoins[]): Promise<{
|
|
237
|
-
susdc?: import("
|
|
238
|
-
sweth?: import("
|
|
239
|
-
swusdc?: import("
|
|
240
|
-
swusdt?: import("
|
|
241
|
-
ssui?: import("
|
|
242
|
-
scetus?: import("
|
|
243
|
-
safsui?: import("
|
|
244
|
-
shasui?: import("
|
|
245
|
-
svsui?: import("
|
|
237
|
+
susdc?: import("../types").StakePool | undefined;
|
|
238
|
+
sweth?: import("../types").StakePool | undefined;
|
|
239
|
+
swusdc?: import("../types").StakePool | undefined;
|
|
240
|
+
swusdt?: import("../types").StakePool | undefined;
|
|
241
|
+
ssui?: import("../types").StakePool | undefined;
|
|
242
|
+
scetus?: import("../types").StakePool | undefined;
|
|
243
|
+
safsui?: import("../types").StakePool | undefined;
|
|
244
|
+
shasui?: import("../types").StakePool | undefined;
|
|
245
|
+
svsui?: import("../types").StakePool | undefined;
|
|
246
246
|
}>;
|
|
247
247
|
/**
|
|
248
248
|
* Get stake pool (spool) data.
|
|
@@ -254,7 +254,7 @@ export declare class ScallopQuery {
|
|
|
254
254
|
* @param stakeMarketCoinName - Specific support stake market coin name.
|
|
255
255
|
* @return Stake pool data.
|
|
256
256
|
*/
|
|
257
|
-
getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("
|
|
257
|
+
getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("../types").StakePool | undefined>;
|
|
258
258
|
/**
|
|
259
259
|
* Get stake reward pools data.
|
|
260
260
|
*
|
|
@@ -266,15 +266,15 @@ export declare class ScallopQuery {
|
|
|
266
266
|
* @return Stake reward pools data.
|
|
267
267
|
*/
|
|
268
268
|
getStakeRewardPools(stakeMarketCoinNames?: SupportStakeMarketCoins[]): Promise<{
|
|
269
|
-
susdc?: import("
|
|
270
|
-
sweth?: import("
|
|
271
|
-
swusdc?: import("
|
|
272
|
-
swusdt?: import("
|
|
273
|
-
ssui?: import("
|
|
274
|
-
scetus?: import("
|
|
275
|
-
safsui?: import("
|
|
276
|
-
shasui?: import("
|
|
277
|
-
svsui?: import("
|
|
269
|
+
susdc?: import("../types").StakeRewardPool | undefined;
|
|
270
|
+
sweth?: import("../types").StakeRewardPool | undefined;
|
|
271
|
+
swusdc?: import("../types").StakeRewardPool | undefined;
|
|
272
|
+
swusdt?: import("../types").StakeRewardPool | undefined;
|
|
273
|
+
ssui?: import("../types").StakeRewardPool | undefined;
|
|
274
|
+
scetus?: import("../types").StakeRewardPool | undefined;
|
|
275
|
+
safsui?: import("../types").StakeRewardPool | undefined;
|
|
276
|
+
shasui?: import("../types").StakeRewardPool | undefined;
|
|
277
|
+
svsui?: import("../types").StakeRewardPool | undefined;
|
|
278
278
|
}>;
|
|
279
279
|
/**
|
|
280
280
|
* Get stake reward pool data.
|
|
@@ -286,7 +286,7 @@ export declare class ScallopQuery {
|
|
|
286
286
|
* @param marketCoinName - Specific support stake market coin name.
|
|
287
287
|
* @return Stake reward pool data.
|
|
288
288
|
*/
|
|
289
|
-
getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("
|
|
289
|
+
getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("../types").StakeRewardPool | undefined>;
|
|
290
290
|
/**
|
|
291
291
|
* Get borrow incentive pools data.
|
|
292
292
|
*
|
|
@@ -297,16 +297,16 @@ export declare class ScallopQuery {
|
|
|
297
297
|
getBorrowIncentivePools(coinNames?: SupportBorrowIncentiveCoins[], indexer?: boolean, args?: {
|
|
298
298
|
coinPrices: CoinPrices;
|
|
299
299
|
}): Promise<{
|
|
300
|
-
usdc?: import("
|
|
301
|
-
sbeth?: import("
|
|
302
|
-
weth?: import("
|
|
303
|
-
wusdc?: import("
|
|
304
|
-
wusdt?: import("
|
|
305
|
-
sui?: import("
|
|
306
|
-
afsui?: import("
|
|
307
|
-
hasui?: import("
|
|
308
|
-
vsui?: import("
|
|
309
|
-
sca?: import("
|
|
300
|
+
usdc?: import("../types").BorrowIncentivePool | undefined;
|
|
301
|
+
sbeth?: import("../types").BorrowIncentivePool | undefined;
|
|
302
|
+
weth?: import("../types").BorrowIncentivePool | undefined;
|
|
303
|
+
wusdc?: import("../types").BorrowIncentivePool | undefined;
|
|
304
|
+
wusdt?: import("../types").BorrowIncentivePool | undefined;
|
|
305
|
+
sui?: import("../types").BorrowIncentivePool | undefined;
|
|
306
|
+
afsui?: import("../types").BorrowIncentivePool | undefined;
|
|
307
|
+
hasui?: import("../types").BorrowIncentivePool | undefined;
|
|
308
|
+
vsui?: import("../types").BorrowIncentivePool | undefined;
|
|
309
|
+
sca?: import("../types").BorrowIncentivePool | undefined;
|
|
310
310
|
}>;
|
|
311
311
|
/**
|
|
312
312
|
* Get borrow incentive accounts data.
|
|
@@ -316,16 +316,16 @@ export declare class ScallopQuery {
|
|
|
316
316
|
* @return Borrow incentive accounts data.
|
|
317
317
|
*/
|
|
318
318
|
getBorrowIncentiveAccounts(obligationId: string, coinNames?: SupportBorrowIncentiveCoins[]): Promise<{
|
|
319
|
-
usdc?: import("
|
|
320
|
-
sbeth?: import("
|
|
321
|
-
weth?: import("
|
|
322
|
-
wusdc?: import("
|
|
323
|
-
wusdt?: import("
|
|
324
|
-
sui?: import("
|
|
325
|
-
afsui?: import("
|
|
326
|
-
hasui?: import("
|
|
327
|
-
vsui?: import("
|
|
328
|
-
sca?: import("
|
|
319
|
+
usdc?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
320
|
+
sbeth?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
321
|
+
weth?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
322
|
+
wusdc?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
323
|
+
wusdt?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
324
|
+
sui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
325
|
+
afsui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
326
|
+
hasui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
327
|
+
vsui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
328
|
+
sca?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
329
329
|
}>;
|
|
330
330
|
/**
|
|
331
331
|
* Get user lending and spool infomation for specific pools.
|
|
@@ -336,20 +336,20 @@ export declare class ScallopQuery {
|
|
|
336
336
|
* @return All lending and spool infomation.
|
|
337
337
|
*/
|
|
338
338
|
getLendings(poolCoinNames?: SupportPoolCoins[], ownerAddress?: string, indexer?: boolean): Promise<{
|
|
339
|
-
usdc?: import("
|
|
340
|
-
sbeth?: import("
|
|
341
|
-
weth?: import("
|
|
342
|
-
wbtc?: import("
|
|
343
|
-
wusdc?: import("
|
|
344
|
-
wusdt?: import("
|
|
345
|
-
sui?: import("
|
|
346
|
-
wapt?: import("
|
|
347
|
-
wsol?: import("
|
|
348
|
-
cetus?: import("
|
|
349
|
-
afsui?: import("
|
|
350
|
-
hasui?: import("
|
|
351
|
-
vsui?: import("
|
|
352
|
-
sca?: import("
|
|
339
|
+
usdc?: import("../types").Lending | undefined;
|
|
340
|
+
sbeth?: import("../types").Lending | undefined;
|
|
341
|
+
weth?: import("../types").Lending | undefined;
|
|
342
|
+
wbtc?: import("../types").Lending | undefined;
|
|
343
|
+
wusdc?: import("../types").Lending | undefined;
|
|
344
|
+
wusdt?: import("../types").Lending | undefined;
|
|
345
|
+
sui?: import("../types").Lending | undefined;
|
|
346
|
+
wapt?: import("../types").Lending | undefined;
|
|
347
|
+
wsol?: import("../types").Lending | undefined;
|
|
348
|
+
cetus?: import("../types").Lending | undefined;
|
|
349
|
+
afsui?: import("../types").Lending | undefined;
|
|
350
|
+
hasui?: import("../types").Lending | undefined;
|
|
351
|
+
vsui?: import("../types").Lending | undefined;
|
|
352
|
+
sca?: import("../types").Lending | undefined;
|
|
353
353
|
}>;
|
|
354
354
|
/**
|
|
355
355
|
* Get user lending and spool information for specific pool.
|
|
@@ -359,7 +359,7 @@ export declare class ScallopQuery {
|
|
|
359
359
|
* @param indexer - Whether to use indexer.
|
|
360
360
|
* @return Lending pool data.
|
|
361
361
|
*/
|
|
362
|
-
getLending(poolCoinName: SupportPoolCoins, ownerAddress?: string, indexer?: boolean): Promise<import("
|
|
362
|
+
getLending(poolCoinName: SupportPoolCoins, ownerAddress?: string, indexer?: boolean): Promise<import("../types").Lending>;
|
|
363
363
|
/**
|
|
364
364
|
* Get user all obligation accounts information.
|
|
365
365
|
*
|
|
@@ -371,7 +371,7 @@ export declare class ScallopQuery {
|
|
|
371
371
|
* @return All obligation accounts information.
|
|
372
372
|
*/
|
|
373
373
|
getObligationAccounts(ownerAddress?: string, indexer?: boolean): Promise<{
|
|
374
|
-
[x: string]: import("
|
|
374
|
+
[x: string]: import("../types").ObligationAccount | undefined;
|
|
375
375
|
}>;
|
|
376
376
|
/**
|
|
377
377
|
* Get obligation account information for specific id.
|
|
@@ -384,7 +384,7 @@ export declare class ScallopQuery {
|
|
|
384
384
|
* @param indexer - Whether to use indexer.
|
|
385
385
|
* @return Borrowing and collateral information.
|
|
386
386
|
*/
|
|
387
|
-
getObligationAccount(obligationId: string, ownerAddress?: string, indexer?: boolean): Promise<import("
|
|
387
|
+
getObligationAccount(obligationId: string, ownerAddress?: string, indexer?: boolean): Promise<import("../types").ObligationAccount>;
|
|
388
388
|
/**
|
|
389
389
|
* Get total value locked.
|
|
390
390
|
*
|
|
@@ -394,13 +394,13 @@ export declare class ScallopQuery {
|
|
|
394
394
|
*
|
|
395
395
|
* @return Total value locked.
|
|
396
396
|
*/
|
|
397
|
-
getTvl(indexer?: boolean): Promise<import("
|
|
397
|
+
getTvl(indexer?: boolean): Promise<import("../types").TotalValueLocked>;
|
|
398
398
|
/**
|
|
399
399
|
* Get veSca data.
|
|
400
400
|
* @param veScaKey
|
|
401
401
|
* @returns veSca
|
|
402
402
|
*/
|
|
403
|
-
getVeSca(veScaKey: string | SuiObjectData): Promise<import("
|
|
403
|
+
getVeSca(veScaKey: string | SuiObjectData): Promise<import("../types").Vesca | undefined>;
|
|
404
404
|
/**
|
|
405
405
|
* Get all veSca from walletAdddress
|
|
406
406
|
* @param walletAddress
|
|
@@ -409,12 +409,12 @@ export declare class ScallopQuery {
|
|
|
409
409
|
getVeScas({ walletAddress, excludeEmpty, }?: {
|
|
410
410
|
walletAddress?: string;
|
|
411
411
|
excludeEmpty?: boolean;
|
|
412
|
-
}): Promise<import("
|
|
412
|
+
}): Promise<import("../types").Vesca[]>;
|
|
413
413
|
/**
|
|
414
414
|
* Get total vesca treasury with movecall
|
|
415
415
|
* @returns Promise<string | undefined>
|
|
416
416
|
*/
|
|
417
|
-
getVeScaTreasuryInfo(): Promise<import("
|
|
417
|
+
getVeScaTreasuryInfo(): Promise<import("../types").VeScaTreasuryInfo | null>;
|
|
418
418
|
/**
|
|
419
419
|
* Return binded referrer veScaKeyId of referee walletAddress if exist
|
|
420
420
|
* @param walletAddress
|
|
@@ -438,7 +438,7 @@ export declare class ScallopQuery {
|
|
|
438
438
|
* @param walletAddress
|
|
439
439
|
* @returns Loyalty program information
|
|
440
440
|
*/
|
|
441
|
-
getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<import("
|
|
441
|
+
getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<import("../types").LoyaltyProgramInfo | null>;
|
|
442
442
|
/**
|
|
443
443
|
* Get total supply of sCoin
|
|
444
444
|
* @param sCoinName - Supported sCoin name
|
|
@@ -452,7 +452,7 @@ export declare class ScallopQuery {
|
|
|
452
452
|
* @param ownerAddress - The owner address.
|
|
453
453
|
* @return All market sCoin amounts.
|
|
454
454
|
*/
|
|
455
|
-
getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("
|
|
455
|
+
getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<"susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca", number>>>;
|
|
456
456
|
/**
|
|
457
457
|
* Get sCoin amount.
|
|
458
458
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SuiKit } from '@scallop-io/sui-kit';
|
|
2
2
|
import { ScallopAddress } from './scallopAddress';
|
|
3
3
|
import { ScallopCache } from './scallopCache';
|
|
4
|
-
import { ScallopUtilsParams, SupportCoins, SupportAssetCoins, SupportMarketCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, CoinWrappedType, SupportSCoin, ScallopUtilsInstanceParams, SupportSuiBridgeCoins, SupportWormholeCoins, PoolAddressInfo } from '
|
|
4
|
+
import type { ScallopUtilsParams, SupportCoins, SupportAssetCoins, SupportMarketCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, CoinWrappedType, SupportSCoin, ScallopUtilsInstanceParams, SupportSuiBridgeCoins, SupportWormholeCoins, PoolAddressInfo } from '../types';
|
|
5
5
|
import type { SuiObjectArg, SuiTxArg, SuiTxBlock } from '@scallop-io/sui-kit';
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
@@ -188,7 +188,7 @@ export declare class ScallopUtils {
|
|
|
188
188
|
* @param assetCoinNames - Specific an array of support asset coin name.
|
|
189
189
|
* @return Asset coin price.
|
|
190
190
|
*/
|
|
191
|
-
getCoinPrices(_?: SupportAssetCoins[]): Promise<import("
|
|
191
|
+
getCoinPrices(_?: SupportAssetCoins[]): Promise<import("../types").OptionalKeys<Record<SupportAssetCoins, number>>>;
|
|
192
192
|
/**
|
|
193
193
|
* Convert apr to apy.
|
|
194
194
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ScallopAddress, ScallopQuery, ScallopUtils } from '
|
|
2
|
-
import { BorrowIncentivePoolsQueryInterface, SupportBorrowIncentiveCoins, BorrowIncentivePool, CoinPrices } from '
|
|
1
|
+
import type { ScallopAddress, ScallopQuery, ScallopUtils } from '../models';
|
|
2
|
+
import type { BorrowIncentivePoolsQueryInterface, SupportBorrowIncentiveCoins, BorrowIncentivePool, CoinPrices } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Query borrow incentive pools data using moveCall
|
|
5
5
|
* @param address
|
|
@@ -36,16 +36,16 @@ export declare const getBorrowIncentivePools: (query: ScallopQuery, borrowIncent
|
|
|
36
36
|
export declare const queryBorrowIncentiveAccounts: ({ utils, }: {
|
|
37
37
|
utils: ScallopUtils;
|
|
38
38
|
}, obligationId: string, borrowIncentiveCoinNames?: SupportBorrowIncentiveCoins[]) => Promise<{
|
|
39
|
-
usdc?: import("
|
|
40
|
-
sbeth?: import("
|
|
41
|
-
weth?: import("
|
|
42
|
-
wusdc?: import("
|
|
43
|
-
wusdt?: import("
|
|
44
|
-
sui?: import("
|
|
45
|
-
afsui?: import("
|
|
46
|
-
hasui?: import("
|
|
47
|
-
vsui?: import("
|
|
48
|
-
sca?: import("
|
|
39
|
+
usdc?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
40
|
+
sbeth?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
41
|
+
weth?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
42
|
+
wusdc?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
43
|
+
wusdt?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
44
|
+
sui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
45
|
+
afsui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
46
|
+
hasui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
47
|
+
vsui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
48
|
+
sca?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
|
|
49
49
|
}>;
|
|
50
50
|
/**
|
|
51
51
|
* Check veSca bind status
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SuiObjectData } from '@mysten/sui/client';
|
|
2
2
|
import type { SuiObjectArg } from '@scallop-io/sui-kit';
|
|
3
|
-
import type { ScallopAddress, ScallopCache, ScallopQuery } from '
|
|
4
|
-
import { Market, MarketPool, MarketCollateral, SupportAssetCoins, SupportPoolCoins, SupportCollateralCoins, ObligationQueryInterface, Obligation, SupportMarketCoins, OptionalKeys, CoinPrices } from '
|
|
3
|
+
import type { ScallopAddress, ScallopCache, ScallopQuery } from '../models';
|
|
4
|
+
import { Market, MarketPool, MarketCollateral, SupportAssetCoins, SupportPoolCoins, SupportCollateralCoins, ObligationQueryInterface, Obligation, SupportMarketCoins, OptionalKeys, CoinPrices } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Query market data.
|
|
7
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScallopAddress, ScallopUtils } from '
|
|
2
|
-
import { SupportPoolCoins } from '
|
|
1
|
+
import { ScallopAddress, ScallopUtils } from '../models';
|
|
2
|
+
import { SupportPoolCoins } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Return list of isolated assets coin types
|
|
5
5
|
* @param utils ScallopUtils
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ScallopQuery } from '
|
|
2
|
-
import { Market, SupportPoolCoins, MarketPool, Spool, StakeAccount, Lending, ObligationAccount, CoinAmounts, CoinPrices, TotalValueLocked } from '
|
|
1
|
+
import type { ScallopQuery } from '../models';
|
|
2
|
+
import type { Market, SupportPoolCoins, MarketPool, Spool, StakeAccount, Lending, ObligationAccount, CoinAmounts, CoinPrices, TotalValueLocked } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Get user lending infomation for specific pools.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SuiObjectData } from '@mysten/sui/client';
|
|
2
|
-
import type { ScallopAddress } from '
|
|
3
|
-
import { SupportAssetCoins } from '
|
|
2
|
+
import type { ScallopAddress } from '../models';
|
|
3
|
+
import type { SupportAssetCoins } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Get price from pyth fee object.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ScallopQuery, ScallopUtils } from '
|
|
2
|
-
import { MarketPool, Spool, StakePool, StakeRewardPool, StakeAccounts, SupportStakeMarketCoins, CoinPrices, MarketPools } from '
|
|
1
|
+
import type { ScallopQuery, ScallopUtils } from '../models';
|
|
2
|
+
import type { MarketPool, Spool, StakePool, StakeRewardPool, StakeAccounts, SupportStakeMarketCoins, CoinPrices, MarketPools } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Get spools data.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { VeScaTreasuryInfo, Vesca } from '../types';
|
|
1
2
|
import { type SuiObjectData } from '@mysten/sui/client';
|
|
2
|
-
import type { ScallopUtils } from '
|
|
3
|
-
import { Vesca, VeScaTreasuryInfo } from 'src/types';
|
|
3
|
+
import type { ScallopUtils } from '../models';
|
|
4
4
|
/**
|
|
5
5
|
* Query all owned veSca key.
|
|
6
6
|
*
|
package/dist/types/address.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SUPPORT_ORACLES } from '
|
|
1
|
+
import { SUPPORT_ORACLES } from '../constants';
|
|
2
2
|
import type { SupportAssetCoins, SupportOracleType, SupportPackageType, SupportSCoin, SupportStakeMarketCoins } from './constant';
|
|
3
3
|
export interface AddressesInterface {
|
|
4
4
|
core: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SuiTxBlock as SuiKitTxBlock, SuiObjectArg } from '@scallop-io/sui-kit';
|
|
2
2
|
import type { TransactionResult } from '@mysten/sui/transactions';
|
|
3
|
-
import type { ScallopBuilder } from '
|
|
4
|
-
import { SupportBorrowIncentiveCoins, SupportBorrowIncentiveRewardCoins } from '
|
|
3
|
+
import type { ScallopBuilder } from '../../models';
|
|
4
|
+
import type { SupportBorrowIncentiveCoins, SupportBorrowIncentiveRewardCoins } from '../constant';
|
|
5
5
|
export type BorrowIncentiveIds = {
|
|
6
6
|
borrowIncentivePkg: string;
|
|
7
7
|
query: string;
|