@scallop-io/sui-scallop-sdk 2.0.0-alpha.1 → 2.0.0-alpha.3
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 +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +14 -14
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
- package/src/models/scallopBuilder.ts +4 -6
- package/src/models/scallopClient.ts +6 -5
- package/src/models/scallopConstants.ts +34 -22
- package/src/models/scallopQuery.ts +5 -7
- package/src/models/scallopUtils.ts +9 -6
- package/src/queries/borrowIncentiveQuery.ts +4 -2
- package/src/queries/poolAddressesQuery.ts +31 -11
- package/src/queries/portfolioQuery.ts +0 -1
- package/src/types/model.ts +3 -0
- package/src/utils/query.ts +3 -4
- package/src/models/scallopPrice.ts +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -328,7 +328,6 @@ declare class ScallopConstants {
|
|
|
328
328
|
private _poolAddresses;
|
|
329
329
|
private _whitelist;
|
|
330
330
|
private _coinDecimals;
|
|
331
|
-
private _coinNameToCoinTypeMap;
|
|
332
331
|
private _coinNameToOldMarketCoinTypeMap;
|
|
333
332
|
private _scoinRawNameToSCoinNameMap;
|
|
334
333
|
private _scoinTypeToSCoinNameMap;
|
|
@@ -349,7 +348,6 @@ declare class ScallopConstants {
|
|
|
349
348
|
get coinDecimals(): Record<string, number | undefined>;
|
|
350
349
|
get coinTypes(): Record<string, string | undefined>;
|
|
351
350
|
get wormholeCoinTypeToCoinName(): Record<string, string | undefined>;
|
|
352
|
-
get coinNameToCoinTypeMap(): Record<string, string | undefined>;
|
|
353
351
|
get coinTypeToCoinNameMap(): Record<string, string | undefined>;
|
|
354
352
|
get coinNameToOldMarketCoinTypeMap(): Record<string, string | undefined>;
|
|
355
353
|
get sCoinRawNameToScoinNameMap(): Record<string, string | undefined>;
|
|
@@ -395,7 +393,7 @@ declare class ScallopUtils {
|
|
|
395
393
|
* @param force - Whether to force initialization.
|
|
396
394
|
* @param address - ScallopAddress instance.
|
|
397
395
|
*/
|
|
398
|
-
init(force?: boolean
|
|
396
|
+
init(force?: boolean): Promise<void>;
|
|
399
397
|
/**
|
|
400
398
|
* Convert coin name to symbol.
|
|
401
399
|
*
|
|
@@ -707,7 +705,7 @@ declare class ScallopQuery {
|
|
|
707
705
|
* @param force - Whether to force initialization.
|
|
708
706
|
* @param address - ScallopAddress instance.
|
|
709
707
|
*/
|
|
710
|
-
init(force?: boolean
|
|
708
|
+
init(force?: boolean): Promise<void>;
|
|
711
709
|
/**
|
|
712
710
|
* @deprecated use getMarketPools
|
|
713
711
|
* Query market data.
|
|
@@ -1240,7 +1238,7 @@ declare class ScallopBuilder {
|
|
|
1240
1238
|
* @param force - Whether to force initialization.
|
|
1241
1239
|
* @param address - ScallopAddress instance.
|
|
1242
1240
|
*/
|
|
1243
|
-
init(force?: boolean
|
|
1241
|
+
init(force?: boolean): Promise<void>;
|
|
1244
1242
|
/**
|
|
1245
1243
|
* Create a scallop txBlock instance that enhances transaction block.
|
|
1246
1244
|
*
|
|
@@ -2925,6 +2923,7 @@ type ScallopClientVeScaReturnType<T extends boolean> = T extends true ? SuiTrans
|
|
|
2925
2923
|
};
|
|
2926
2924
|
type ScallopBaseInstanceParams = {
|
|
2927
2925
|
suiKit?: SuiKit;
|
|
2926
|
+
cache?: ScallopCache;
|
|
2928
2927
|
};
|
|
2929
2928
|
type ScallopCacheInstanceParams = ScallopBaseInstanceParams & {
|
|
2930
2929
|
queryClient?: QueryClient;
|
|
@@ -2934,6 +2933,7 @@ type ScallopAddressInstanceParams = ScallopBaseInstanceParams & {
|
|
|
2934
2933
|
};
|
|
2935
2934
|
type ScallopConstantsInstanceParams = {
|
|
2936
2935
|
address?: ScallopAddress;
|
|
2936
|
+
cache?: ScallopCache;
|
|
2937
2937
|
};
|
|
2938
2938
|
type ScallopIndexerInstanceParams = {
|
|
2939
2939
|
cache?: ScallopCache;
|
|
@@ -2967,6 +2967,7 @@ type ScallopIndexerParams = ScallopCacheParams & {
|
|
|
2967
2967
|
type ScallopAddressParams = ScallopCacheParams & {
|
|
2968
2968
|
addressApiUrl?: string;
|
|
2969
2969
|
addressId: string;
|
|
2970
|
+
whitelistId: string;
|
|
2970
2971
|
auth?: string;
|
|
2971
2972
|
network?: NetworkType;
|
|
2972
2973
|
forceAddressesInterface?: Partial<Record<NetworkType, AddressesInterface>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -328,7 +328,6 @@ declare class ScallopConstants {
|
|
|
328
328
|
private _poolAddresses;
|
|
329
329
|
private _whitelist;
|
|
330
330
|
private _coinDecimals;
|
|
331
|
-
private _coinNameToCoinTypeMap;
|
|
332
331
|
private _coinNameToOldMarketCoinTypeMap;
|
|
333
332
|
private _scoinRawNameToSCoinNameMap;
|
|
334
333
|
private _scoinTypeToSCoinNameMap;
|
|
@@ -349,7 +348,6 @@ declare class ScallopConstants {
|
|
|
349
348
|
get coinDecimals(): Record<string, number | undefined>;
|
|
350
349
|
get coinTypes(): Record<string, string | undefined>;
|
|
351
350
|
get wormholeCoinTypeToCoinName(): Record<string, string | undefined>;
|
|
352
|
-
get coinNameToCoinTypeMap(): Record<string, string | undefined>;
|
|
353
351
|
get coinTypeToCoinNameMap(): Record<string, string | undefined>;
|
|
354
352
|
get coinNameToOldMarketCoinTypeMap(): Record<string, string | undefined>;
|
|
355
353
|
get sCoinRawNameToScoinNameMap(): Record<string, string | undefined>;
|
|
@@ -395,7 +393,7 @@ declare class ScallopUtils {
|
|
|
395
393
|
* @param force - Whether to force initialization.
|
|
396
394
|
* @param address - ScallopAddress instance.
|
|
397
395
|
*/
|
|
398
|
-
init(force?: boolean
|
|
396
|
+
init(force?: boolean): Promise<void>;
|
|
399
397
|
/**
|
|
400
398
|
* Convert coin name to symbol.
|
|
401
399
|
*
|
|
@@ -707,7 +705,7 @@ declare class ScallopQuery {
|
|
|
707
705
|
* @param force - Whether to force initialization.
|
|
708
706
|
* @param address - ScallopAddress instance.
|
|
709
707
|
*/
|
|
710
|
-
init(force?: boolean
|
|
708
|
+
init(force?: boolean): Promise<void>;
|
|
711
709
|
/**
|
|
712
710
|
* @deprecated use getMarketPools
|
|
713
711
|
* Query market data.
|
|
@@ -1240,7 +1238,7 @@ declare class ScallopBuilder {
|
|
|
1240
1238
|
* @param force - Whether to force initialization.
|
|
1241
1239
|
* @param address - ScallopAddress instance.
|
|
1242
1240
|
*/
|
|
1243
|
-
init(force?: boolean
|
|
1241
|
+
init(force?: boolean): Promise<void>;
|
|
1244
1242
|
/**
|
|
1245
1243
|
* Create a scallop txBlock instance that enhances transaction block.
|
|
1246
1244
|
*
|
|
@@ -2925,6 +2923,7 @@ type ScallopClientVeScaReturnType<T extends boolean> = T extends true ? SuiTrans
|
|
|
2925
2923
|
};
|
|
2926
2924
|
type ScallopBaseInstanceParams = {
|
|
2927
2925
|
suiKit?: SuiKit;
|
|
2926
|
+
cache?: ScallopCache;
|
|
2928
2927
|
};
|
|
2929
2928
|
type ScallopCacheInstanceParams = ScallopBaseInstanceParams & {
|
|
2930
2929
|
queryClient?: QueryClient;
|
|
@@ -2934,6 +2933,7 @@ type ScallopAddressInstanceParams = ScallopBaseInstanceParams & {
|
|
|
2934
2933
|
};
|
|
2935
2934
|
type ScallopConstantsInstanceParams = {
|
|
2936
2935
|
address?: ScallopAddress;
|
|
2936
|
+
cache?: ScallopCache;
|
|
2937
2937
|
};
|
|
2938
2938
|
type ScallopIndexerInstanceParams = {
|
|
2939
2939
|
cache?: ScallopCache;
|
|
@@ -2967,6 +2967,7 @@ type ScallopIndexerParams = ScallopCacheParams & {
|
|
|
2967
2967
|
type ScallopAddressParams = ScallopCacheParams & {
|
|
2968
2968
|
addressApiUrl?: string;
|
|
2969
2969
|
addressId: string;
|
|
2970
|
+
whitelistId: string;
|
|
2970
2971
|
auth?: string;
|
|
2971
2972
|
network?: NetworkType;
|
|
2972
2973
|
forceAddressesInterface?: Partial<Record<NetworkType, AddressesInterface>>;
|