@scallop-io/sui-scallop-sdk 2.0.11 → 2.0.13-merge-split-ve-sca-alpha.1
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 +25 -28
- package/dist/index.d.ts +25 -28
- package/dist/index.js +24 -23
- package/dist/index.mjs +6 -6
- package/package.json +5 -2
- package/src/builders/borrowIncentiveBuilder.ts +4 -5
- package/src/builders/coreBuilder.ts +2 -2
- package/src/builders/index.ts +2 -2
- package/src/builders/spoolBuilder.ts +2 -2
- package/src/builders/vescaBuilder.ts +113 -14
- package/src/constants/testAddress.ts +12 -6
- package/src/models/scallop.ts +1 -1
- package/src/models/scallopAddress.ts +5 -2
- package/src/models/scallopBuilder.ts +1 -1
- package/src/models/scallopCache.ts +80 -118
- package/src/models/scallopClient.ts +1 -1
- package/src/models/scallopConstants.ts +16 -8
- package/src/models/scallopIndexer.ts +1 -1
- package/src/queries/borrowIncentiveQuery.ts +3 -3
- package/src/queries/coreQuery.ts +121 -154
- package/src/queries/portfolioQuery.ts +2 -2
- package/src/queries/spoolQuery.ts +76 -74
- package/src/queries/vescaQuery.ts +2 -2
- package/src/types/address.ts +3 -0
- package/src/types/builder/vesca.ts +20 -10
- package/src/types/model.ts +2 -1
- package/src/utils/builder.ts +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -91,6 +91,17 @@ type QueryInspectTxnParams = {
|
|
|
91
91
|
args: SuiObjectArg[];
|
|
92
92
|
typeArgs?: any[];
|
|
93
93
|
};
|
|
94
|
+
declare class RateLimiter {
|
|
95
|
+
private readonly capacity;
|
|
96
|
+
private tokens;
|
|
97
|
+
private lastRefillTime;
|
|
98
|
+
private readonly refillRate;
|
|
99
|
+
constructor(capacity?: number);
|
|
100
|
+
private refill;
|
|
101
|
+
private getTimeToNextToken;
|
|
102
|
+
acquireToken(): Promise<void>;
|
|
103
|
+
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
104
|
+
}
|
|
94
105
|
/**
|
|
95
106
|
* @description
|
|
96
107
|
* It provides caching for moveCall, RPC Request, and API Request.
|
|
@@ -108,25 +119,9 @@ declare class ScallopCache {
|
|
|
108
119
|
queryClient: QueryClient;
|
|
109
120
|
suiKit: SuiKit;
|
|
110
121
|
walletAddress: string;
|
|
111
|
-
private
|
|
112
|
-
private interval;
|
|
113
|
-
private tokens;
|
|
114
|
-
private lastRefill;
|
|
122
|
+
private limiter;
|
|
115
123
|
constructor(params?: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
|
|
116
124
|
private get client();
|
|
117
|
-
private refill;
|
|
118
|
-
private removeTokens;
|
|
119
|
-
private callWithRateLimit;
|
|
120
|
-
/**
|
|
121
|
-
* @description Invalidate cache based on the refetchType parameter
|
|
122
|
-
* @param refetchType Determines the type of queries to be refetched. Defaults to `active`.
|
|
123
|
-
*
|
|
124
|
-
* - `active`: Only queries that match the refetch predicate and are actively being rendered via useQuery and related functions will be refetched in the background.
|
|
125
|
-
* - `inactive`: Only queries that match the refetch predicate and are NOT actively being rendered via useQuery and related functions will be refetched in the background.
|
|
126
|
-
* - `all`: All queries that match the refetch predicate will be refetched in the background.
|
|
127
|
-
* - `none`: No queries will be refetched. Queries that match the refetch predicate will only be marked as invalid.
|
|
128
|
-
*/
|
|
129
|
-
private retryFn;
|
|
130
125
|
/**
|
|
131
126
|
* @description Provides cache for inspectTxn of the SuiKit.
|
|
132
127
|
* @param QueryInspectTxnParams
|
|
@@ -141,7 +136,7 @@ declare class ScallopCache {
|
|
|
141
136
|
* @param QueryObjectParams
|
|
142
137
|
* @returns Promise<SuiObjectResponse>
|
|
143
138
|
*/
|
|
144
|
-
queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse
|
|
139
|
+
queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse>;
|
|
145
140
|
/**
|
|
146
141
|
* @description Provides cache for getObjects of the SuiKit.
|
|
147
142
|
* @param objectIds
|
|
@@ -153,7 +148,7 @@ declare class ScallopCache {
|
|
|
153
148
|
* @param input
|
|
154
149
|
* @returns Promise<PaginatedObjectsResponse>
|
|
155
150
|
*/
|
|
156
|
-
queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse
|
|
151
|
+
queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse>;
|
|
157
152
|
queryGetDynamicFields(input: GetDynamicFieldsParams): Promise<DynamicFieldPage | null>;
|
|
158
153
|
queryGetDynamicFieldObject(input: GetDynamicFieldObjectParams): Promise<SuiObjectResponse | null>;
|
|
159
154
|
queryGetAllCoinBalances(owner: string): Promise<{
|
|
@@ -1852,12 +1847,6 @@ type GenerateBorrowIncentiveQuickMethod = (params: {
|
|
|
1852
1847
|
txBlock: SuiTxBlockWithBorrowIncentiveNormalMethods;
|
|
1853
1848
|
}) => BorrowIncentiveQuickMethods;
|
|
1854
1849
|
|
|
1855
|
-
type VescaIds = {
|
|
1856
|
-
pkgId: string;
|
|
1857
|
-
table: string;
|
|
1858
|
-
treasury: string;
|
|
1859
|
-
config: string;
|
|
1860
|
-
};
|
|
1861
1850
|
type VeScaNormalMethods = {
|
|
1862
1851
|
lockSca: (scaCoin: SuiObjectArg, unlockAtInSecondTimestamp: number) => TransactionResult;
|
|
1863
1852
|
extendLockPeriod: (veScaKey: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
|
|
@@ -1865,8 +1854,10 @@ type VeScaNormalMethods = {
|
|
|
1865
1854
|
renewExpiredVeSca: (veScaKey: SuiObjectArg, scaCoin: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
|
|
1866
1855
|
redeemSca: (veScaKey: SuiObjectArg) => TransactionResult;
|
|
1867
1856
|
mintEmptyVeSca: () => TransactionResult;
|
|
1857
|
+
splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
|
|
1858
|
+
mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
|
|
1868
1859
|
};
|
|
1869
|
-
type
|
|
1860
|
+
type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult | undefined;
|
|
1870
1861
|
type VeScaQuickMethods = {
|
|
1871
1862
|
/**
|
|
1872
1863
|
* Quick methods to automate
|
|
@@ -1888,7 +1879,9 @@ type VeScaQuickMethods = {
|
|
|
1888
1879
|
extendLockPeriodQuick: (lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
|
|
1889
1880
|
extendLockAmountQuick: (scaAmount: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
|
|
1890
1881
|
renewExpiredVeScaQuick: (scaAmount: number, lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
|
|
1891
|
-
redeemScaQuick: <T extends boolean>(
|
|
1882
|
+
redeemScaQuick: <T extends boolean>(veScaKey?: SuiObjectArg, transferSca?: T) => Promise<QuickMethodReturnType<T>>;
|
|
1883
|
+
splitVeScaQuick: <T extends boolean>(splitAmount: string, veScaKey: string, transferVeScaKey?: T) => Promise<QuickMethodReturnType<T>>;
|
|
1884
|
+
mergeVeScaQuick: (targetVeScaKey: string, sourceVeScaKey: string) => Promise<void>;
|
|
1892
1885
|
};
|
|
1893
1886
|
type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
|
|
1894
1887
|
type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
|
|
@@ -2963,6 +2956,9 @@ interface AddressesInterface {
|
|
|
2963
2956
|
table: string;
|
|
2964
2957
|
treasury: string;
|
|
2965
2958
|
config: string;
|
|
2959
|
+
subsTable: string;
|
|
2960
|
+
subsTableId: string;
|
|
2961
|
+
subsWhitelist: string;
|
|
2966
2962
|
};
|
|
2967
2963
|
referral: {
|
|
2968
2964
|
id: string;
|
|
@@ -3042,6 +3038,7 @@ type ScallopCacheParams = {
|
|
|
3042
3038
|
walletAddress?: string;
|
|
3043
3039
|
cacheOptions?: QueryClientConfig;
|
|
3044
3040
|
config?: ScallopCacheConfig;
|
|
3041
|
+
tokensPerSecond?: number;
|
|
3045
3042
|
} & Partial<SuiKitParams>;
|
|
3046
3043
|
type ScallopIndexerParams = ScallopCacheParams & {
|
|
3047
3044
|
indexerApiUrl?: string;
|
|
@@ -3088,4 +3085,4 @@ declare const MIN_TOP_UP_AMOUNT: 1000000000;
|
|
|
3088
3085
|
|
|
3089
3086
|
declare const xOracleList: xOracleListType;
|
|
3090
3087
|
|
|
3091
|
-
export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, type BaseScallopTxBlock, type BorrowDynamic, type BorrowFee, type BorrowIncentiveAccountKey, type BorrowIncentiveAccounts, type BorrowIncentiveAccountsQueryInterface, type BorrowIncentiveIds, type BorrowIncentiveNormalMethods, type BorrowIncentivePool, type BorrowIncentivePoolPoints, type BorrowIncentivePools, type BorrowIncentivePoolsQueryInterface, type BorrowIncentiveQuickMethods, type BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, type CollateralStat, type CoreIds, type CoreNormalMethods, type CoreQuickMethods, type CoreTxBlock, DEFAULT_CACHE_OPTIONS, type GenerateBorrowIncentiveNormalMethod, type GenerateBorrowIncentiveQuickMethod, type GenerateCoreNormalMethod, type GenerateCoreQuickMethod, type GenerateLoyaltyProgramNormalMethod, type GenerateLoyaltyProgramQuickMethod, type GenerateSCoinNormalMethod, type GenerateSCoinQuickMethod, type GenerateSpoolNormalMethod, type GenerateSpoolQuickMethod, type GenerateVeScaNormalMethod, type GenerateVeScaQuickMethod, IS_VE_SCA_TEST, type InterestModel, type Lending, type Lendings, type LoyaltyProgramIds, type LoyaltyProgramInfo, type LoyaltyProgramNormalMethods, type LoyaltyProgramQuickMethods, type LoyaltyProgramTxBlock, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, type Market, type MarketCoinAmounts, type MarketCoins, type MarketCollateral, type MarketCollaterals, type MarketPool, type MarketPools, type MarketQueryInterface, type NestedResult, OLD_BORROW_INCENTIVE_PROTOCOL_ID, type Obligation, type ObligationAccount, type ObligationAccounts, type ObligationBorrowIncentive, type ObligationBorrowIncentiveReward, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, RPC_PROVIDERS,
|
|
3088
|
+
export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, type BaseScallopTxBlock, type BorrowDynamic, type BorrowFee, type BorrowIncentiveAccountKey, type BorrowIncentiveAccounts, type BorrowIncentiveAccountsQueryInterface, type BorrowIncentiveIds, type BorrowIncentiveNormalMethods, type BorrowIncentivePool, type BorrowIncentivePoolPoints, type BorrowIncentivePools, type BorrowIncentivePoolsQueryInterface, type BorrowIncentiveQuickMethods, type BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, type CollateralStat, type CoreIds, type CoreNormalMethods, type CoreQuickMethods, type CoreTxBlock, DEFAULT_CACHE_OPTIONS, type GenerateBorrowIncentiveNormalMethod, type GenerateBorrowIncentiveQuickMethod, type GenerateCoreNormalMethod, type GenerateCoreQuickMethod, type GenerateLoyaltyProgramNormalMethod, type GenerateLoyaltyProgramQuickMethod, type GenerateSCoinNormalMethod, type GenerateSCoinQuickMethod, type GenerateSpoolNormalMethod, type GenerateSpoolQuickMethod, type GenerateVeScaNormalMethod, type GenerateVeScaQuickMethod, IS_VE_SCA_TEST, type InterestModel, type Lending, type Lendings, type LoyaltyProgramIds, type LoyaltyProgramInfo, type LoyaltyProgramNormalMethods, type LoyaltyProgramQuickMethods, type LoyaltyProgramTxBlock, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, type Market, type MarketCoinAmounts, type MarketCoins, type MarketCollateral, type MarketCollaterals, type MarketPool, type MarketPools, type MarketQueryInterface, type NestedResult, OLD_BORROW_INCENTIVE_PROTOCOL_ID, type Obligation, type ObligationAccount, type ObligationAccounts, type ObligationBorrowIncentive, type ObligationBorrowIncentiveReward, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, type QuickMethodReturnType, RPC_PROVIDERS, RateLimiter, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, Scallop, ScallopAddress, type ScallopAddressInstanceParams, type ScallopAddressParams, type ScallopBaseInstanceParams, ScallopBuilder, type ScallopBuilderInstanceParams, type ScallopBuilderParams, ScallopCache, type ScallopCacheConfig, type ScallopCacheInstanceParams, type ScallopCacheParams, ScallopClient, type ScallopClientFnReturnType, type ScallopClientInstanceParams, type ScallopClientParams, type ScallopClientVeScaReturnType, ScallopConstants, type ScallopConstantsInstanceParams, type ScallopConstantsParams, ScallopIndexer, type ScallopIndexerInstanceParams, type ScallopIndexerParams, type ScallopParams, ScallopQuery, type ScallopQueryInstanceParams, type ScallopQueryParams, type ScallopTxBlock, ScallopUtils, type ScallopUtilsInstanceParams, type ScallopUtilsParams, type SelectCoinReturnType, type Spool, type SpoolData, type SpoolIds, type SpoolNormalMethods, type SpoolQuickMethods, type SpoolRewardPool, type SpoolTxBlock, type Spools, type StakeAccount, type StakeAccounts, type StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VoloCoinIds, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,17 @@ type QueryInspectTxnParams = {
|
|
|
91
91
|
args: SuiObjectArg[];
|
|
92
92
|
typeArgs?: any[];
|
|
93
93
|
};
|
|
94
|
+
declare class RateLimiter {
|
|
95
|
+
private readonly capacity;
|
|
96
|
+
private tokens;
|
|
97
|
+
private lastRefillTime;
|
|
98
|
+
private readonly refillRate;
|
|
99
|
+
constructor(capacity?: number);
|
|
100
|
+
private refill;
|
|
101
|
+
private getTimeToNextToken;
|
|
102
|
+
acquireToken(): Promise<void>;
|
|
103
|
+
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
104
|
+
}
|
|
94
105
|
/**
|
|
95
106
|
* @description
|
|
96
107
|
* It provides caching for moveCall, RPC Request, and API Request.
|
|
@@ -108,25 +119,9 @@ declare class ScallopCache {
|
|
|
108
119
|
queryClient: QueryClient;
|
|
109
120
|
suiKit: SuiKit;
|
|
110
121
|
walletAddress: string;
|
|
111
|
-
private
|
|
112
|
-
private interval;
|
|
113
|
-
private tokens;
|
|
114
|
-
private lastRefill;
|
|
122
|
+
private limiter;
|
|
115
123
|
constructor(params?: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
|
|
116
124
|
private get client();
|
|
117
|
-
private refill;
|
|
118
|
-
private removeTokens;
|
|
119
|
-
private callWithRateLimit;
|
|
120
|
-
/**
|
|
121
|
-
* @description Invalidate cache based on the refetchType parameter
|
|
122
|
-
* @param refetchType Determines the type of queries to be refetched. Defaults to `active`.
|
|
123
|
-
*
|
|
124
|
-
* - `active`: Only queries that match the refetch predicate and are actively being rendered via useQuery and related functions will be refetched in the background.
|
|
125
|
-
* - `inactive`: Only queries that match the refetch predicate and are NOT actively being rendered via useQuery and related functions will be refetched in the background.
|
|
126
|
-
* - `all`: All queries that match the refetch predicate will be refetched in the background.
|
|
127
|
-
* - `none`: No queries will be refetched. Queries that match the refetch predicate will only be marked as invalid.
|
|
128
|
-
*/
|
|
129
|
-
private retryFn;
|
|
130
125
|
/**
|
|
131
126
|
* @description Provides cache for inspectTxn of the SuiKit.
|
|
132
127
|
* @param QueryInspectTxnParams
|
|
@@ -141,7 +136,7 @@ declare class ScallopCache {
|
|
|
141
136
|
* @param QueryObjectParams
|
|
142
137
|
* @returns Promise<SuiObjectResponse>
|
|
143
138
|
*/
|
|
144
|
-
queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse
|
|
139
|
+
queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse>;
|
|
145
140
|
/**
|
|
146
141
|
* @description Provides cache for getObjects of the SuiKit.
|
|
147
142
|
* @param objectIds
|
|
@@ -153,7 +148,7 @@ declare class ScallopCache {
|
|
|
153
148
|
* @param input
|
|
154
149
|
* @returns Promise<PaginatedObjectsResponse>
|
|
155
150
|
*/
|
|
156
|
-
queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse
|
|
151
|
+
queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse>;
|
|
157
152
|
queryGetDynamicFields(input: GetDynamicFieldsParams): Promise<DynamicFieldPage | null>;
|
|
158
153
|
queryGetDynamicFieldObject(input: GetDynamicFieldObjectParams): Promise<SuiObjectResponse | null>;
|
|
159
154
|
queryGetAllCoinBalances(owner: string): Promise<{
|
|
@@ -1852,12 +1847,6 @@ type GenerateBorrowIncentiveQuickMethod = (params: {
|
|
|
1852
1847
|
txBlock: SuiTxBlockWithBorrowIncentiveNormalMethods;
|
|
1853
1848
|
}) => BorrowIncentiveQuickMethods;
|
|
1854
1849
|
|
|
1855
|
-
type VescaIds = {
|
|
1856
|
-
pkgId: string;
|
|
1857
|
-
table: string;
|
|
1858
|
-
treasury: string;
|
|
1859
|
-
config: string;
|
|
1860
|
-
};
|
|
1861
1850
|
type VeScaNormalMethods = {
|
|
1862
1851
|
lockSca: (scaCoin: SuiObjectArg, unlockAtInSecondTimestamp: number) => TransactionResult;
|
|
1863
1852
|
extendLockPeriod: (veScaKey: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
|
|
@@ -1865,8 +1854,10 @@ type VeScaNormalMethods = {
|
|
|
1865
1854
|
renewExpiredVeSca: (veScaKey: SuiObjectArg, scaCoin: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
|
|
1866
1855
|
redeemSca: (veScaKey: SuiObjectArg) => TransactionResult;
|
|
1867
1856
|
mintEmptyVeSca: () => TransactionResult;
|
|
1857
|
+
splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
|
|
1858
|
+
mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
|
|
1868
1859
|
};
|
|
1869
|
-
type
|
|
1860
|
+
type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult | undefined;
|
|
1870
1861
|
type VeScaQuickMethods = {
|
|
1871
1862
|
/**
|
|
1872
1863
|
* Quick methods to automate
|
|
@@ -1888,7 +1879,9 @@ type VeScaQuickMethods = {
|
|
|
1888
1879
|
extendLockPeriodQuick: (lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
|
|
1889
1880
|
extendLockAmountQuick: (scaAmount: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
|
|
1890
1881
|
renewExpiredVeScaQuick: (scaAmount: number, lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
|
|
1891
|
-
redeemScaQuick: <T extends boolean>(
|
|
1882
|
+
redeemScaQuick: <T extends boolean>(veScaKey?: SuiObjectArg, transferSca?: T) => Promise<QuickMethodReturnType<T>>;
|
|
1883
|
+
splitVeScaQuick: <T extends boolean>(splitAmount: string, veScaKey: string, transferVeScaKey?: T) => Promise<QuickMethodReturnType<T>>;
|
|
1884
|
+
mergeVeScaQuick: (targetVeScaKey: string, sourceVeScaKey: string) => Promise<void>;
|
|
1892
1885
|
};
|
|
1893
1886
|
type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
|
|
1894
1887
|
type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
|
|
@@ -2963,6 +2956,9 @@ interface AddressesInterface {
|
|
|
2963
2956
|
table: string;
|
|
2964
2957
|
treasury: string;
|
|
2965
2958
|
config: string;
|
|
2959
|
+
subsTable: string;
|
|
2960
|
+
subsTableId: string;
|
|
2961
|
+
subsWhitelist: string;
|
|
2966
2962
|
};
|
|
2967
2963
|
referral: {
|
|
2968
2964
|
id: string;
|
|
@@ -3042,6 +3038,7 @@ type ScallopCacheParams = {
|
|
|
3042
3038
|
walletAddress?: string;
|
|
3043
3039
|
cacheOptions?: QueryClientConfig;
|
|
3044
3040
|
config?: ScallopCacheConfig;
|
|
3041
|
+
tokensPerSecond?: number;
|
|
3045
3042
|
} & Partial<SuiKitParams>;
|
|
3046
3043
|
type ScallopIndexerParams = ScallopCacheParams & {
|
|
3047
3044
|
indexerApiUrl?: string;
|
|
@@ -3088,4 +3085,4 @@ declare const MIN_TOP_UP_AMOUNT: 1000000000;
|
|
|
3088
3085
|
|
|
3089
3086
|
declare const xOracleList: xOracleListType;
|
|
3090
3087
|
|
|
3091
|
-
export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, type BaseScallopTxBlock, type BorrowDynamic, type BorrowFee, type BorrowIncentiveAccountKey, type BorrowIncentiveAccounts, type BorrowIncentiveAccountsQueryInterface, type BorrowIncentiveIds, type BorrowIncentiveNormalMethods, type BorrowIncentivePool, type BorrowIncentivePoolPoints, type BorrowIncentivePools, type BorrowIncentivePoolsQueryInterface, type BorrowIncentiveQuickMethods, type BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, type CollateralStat, type CoreIds, type CoreNormalMethods, type CoreQuickMethods, type CoreTxBlock, DEFAULT_CACHE_OPTIONS, type GenerateBorrowIncentiveNormalMethod, type GenerateBorrowIncentiveQuickMethod, type GenerateCoreNormalMethod, type GenerateCoreQuickMethod, type GenerateLoyaltyProgramNormalMethod, type GenerateLoyaltyProgramQuickMethod, type GenerateSCoinNormalMethod, type GenerateSCoinQuickMethod, type GenerateSpoolNormalMethod, type GenerateSpoolQuickMethod, type GenerateVeScaNormalMethod, type GenerateVeScaQuickMethod, IS_VE_SCA_TEST, type InterestModel, type Lending, type Lendings, type LoyaltyProgramIds, type LoyaltyProgramInfo, type LoyaltyProgramNormalMethods, type LoyaltyProgramQuickMethods, type LoyaltyProgramTxBlock, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, type Market, type MarketCoinAmounts, type MarketCoins, type MarketCollateral, type MarketCollaterals, type MarketPool, type MarketPools, type MarketQueryInterface, type NestedResult, OLD_BORROW_INCENTIVE_PROTOCOL_ID, type Obligation, type ObligationAccount, type ObligationAccounts, type ObligationBorrowIncentive, type ObligationBorrowIncentiveReward, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, RPC_PROVIDERS,
|
|
3088
|
+
export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, type BaseScallopTxBlock, type BorrowDynamic, type BorrowFee, type BorrowIncentiveAccountKey, type BorrowIncentiveAccounts, type BorrowIncentiveAccountsQueryInterface, type BorrowIncentiveIds, type BorrowIncentiveNormalMethods, type BorrowIncentivePool, type BorrowIncentivePoolPoints, type BorrowIncentivePools, type BorrowIncentivePoolsQueryInterface, type BorrowIncentiveQuickMethods, type BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, type CollateralStat, type CoreIds, type CoreNormalMethods, type CoreQuickMethods, type CoreTxBlock, DEFAULT_CACHE_OPTIONS, type GenerateBorrowIncentiveNormalMethod, type GenerateBorrowIncentiveQuickMethod, type GenerateCoreNormalMethod, type GenerateCoreQuickMethod, type GenerateLoyaltyProgramNormalMethod, type GenerateLoyaltyProgramQuickMethod, type GenerateSCoinNormalMethod, type GenerateSCoinQuickMethod, type GenerateSpoolNormalMethod, type GenerateSpoolQuickMethod, type GenerateVeScaNormalMethod, type GenerateVeScaQuickMethod, IS_VE_SCA_TEST, type InterestModel, type Lending, type Lendings, type LoyaltyProgramIds, type LoyaltyProgramInfo, type LoyaltyProgramNormalMethods, type LoyaltyProgramQuickMethods, type LoyaltyProgramTxBlock, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, type Market, type MarketCoinAmounts, type MarketCoins, type MarketCollateral, type MarketCollaterals, type MarketPool, type MarketPools, type MarketQueryInterface, type NestedResult, OLD_BORROW_INCENTIVE_PROTOCOL_ID, type Obligation, type ObligationAccount, type ObligationAccounts, type ObligationBorrowIncentive, type ObligationBorrowIncentiveReward, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, type QuickMethodReturnType, RPC_PROVIDERS, RateLimiter, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, Scallop, ScallopAddress, type ScallopAddressInstanceParams, type ScallopAddressParams, type ScallopBaseInstanceParams, ScallopBuilder, type ScallopBuilderInstanceParams, type ScallopBuilderParams, ScallopCache, type ScallopCacheConfig, type ScallopCacheInstanceParams, type ScallopCacheParams, ScallopClient, type ScallopClientFnReturnType, type ScallopClientInstanceParams, type ScallopClientParams, type ScallopClientVeScaReturnType, ScallopConstants, type ScallopConstantsInstanceParams, type ScallopConstantsParams, ScallopIndexer, type ScallopIndexerInstanceParams, type ScallopIndexerParams, type ScallopParams, ScallopQuery, type ScallopQueryInstanceParams, type ScallopQueryParams, type ScallopTxBlock, ScallopUtils, type ScallopUtilsInstanceParams, type ScallopUtilsParams, type SelectCoinReturnType, type Spool, type SpoolData, type SpoolIds, type SpoolNormalMethods, type SpoolQuickMethods, type SpoolRewardPool, type SpoolTxBlock, type Spools, type StakeAccount, type StakeAccounts, type StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VoloCoinIds, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
|