@scallop-io/sui-scallop-sdk 0.44.0 → 0.44.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/constants/common.d.ts +2 -2
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -6
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallopQuery.d.ts +10 -0
- package/dist/models/scallopUtils.d.ts +2 -0
- package/dist/queries/coreQuery.d.ts +8 -0
- package/dist/queries/portfolioQuery.d.ts +2 -0
- package/package.json +1 -1
- package/src/constants/common.ts +4 -0
- package/src/constants/enum.ts +10 -0
|
@@ -51,6 +51,8 @@ export declare class ScallopQuery {
|
|
|
51
51
|
apt?: import("../types").MarketPool | undefined;
|
|
52
52
|
sol?: import("../types").MarketPool | undefined;
|
|
53
53
|
cetus?: import("../types").MarketPool | undefined;
|
|
54
|
+
afsui?: import("../types").MarketPool | undefined;
|
|
55
|
+
hasui?: import("../types").MarketPool | undefined;
|
|
54
56
|
}>;
|
|
55
57
|
/**
|
|
56
58
|
* Get market pool
|
|
@@ -78,6 +80,8 @@ export declare class ScallopQuery {
|
|
|
78
80
|
apt?: import("../types").MarketCollateral | undefined;
|
|
79
81
|
sol?: import("../types").MarketCollateral | undefined;
|
|
80
82
|
cetus?: import("../types").MarketCollateral | undefined;
|
|
83
|
+
afsui?: import("../types").MarketCollateral | undefined;
|
|
84
|
+
hasui?: import("../types").MarketCollateral | undefined;
|
|
81
85
|
}>;
|
|
82
86
|
/**
|
|
83
87
|
* Get market collateral
|
|
@@ -116,6 +120,8 @@ export declare class ScallopQuery {
|
|
|
116
120
|
apt?: number | undefined;
|
|
117
121
|
sol?: number | undefined;
|
|
118
122
|
cetus?: number | undefined;
|
|
123
|
+
afsui?: number | undefined;
|
|
124
|
+
hasui?: number | undefined;
|
|
119
125
|
}>;
|
|
120
126
|
/**
|
|
121
127
|
* Get asset coin amount.
|
|
@@ -141,6 +147,8 @@ export declare class ScallopQuery {
|
|
|
141
147
|
sapt?: number | undefined;
|
|
142
148
|
ssol?: number | undefined;
|
|
143
149
|
scetus?: number | undefined;
|
|
150
|
+
safsui?: number | undefined;
|
|
151
|
+
shasui?: number | undefined;
|
|
144
152
|
}>;
|
|
145
153
|
/**
|
|
146
154
|
* Get market coin amount.
|
|
@@ -258,6 +266,8 @@ export declare class ScallopQuery {
|
|
|
258
266
|
apt?: import("../types").Lending | undefined;
|
|
259
267
|
sol?: import("../types").Lending | undefined;
|
|
260
268
|
cetus?: import("../types").Lending | undefined;
|
|
269
|
+
afsui?: import("../types").Lending | undefined;
|
|
270
|
+
hasui?: import("../types").Lending | undefined;
|
|
261
271
|
}>;
|
|
262
272
|
/**
|
|
263
273
|
* Get user lending and spool information for specific pool.
|
|
@@ -33,6 +33,8 @@ export declare const getMarketPools: (query: ScallopQuery, poolCoinNames?: Suppo
|
|
|
33
33
|
apt?: MarketPool | undefined;
|
|
34
34
|
sol?: MarketPool | undefined;
|
|
35
35
|
cetus?: MarketPool | undefined;
|
|
36
|
+
afsui?: MarketPool | undefined;
|
|
37
|
+
hasui?: MarketPool | undefined;
|
|
36
38
|
}>;
|
|
37
39
|
/**
|
|
38
40
|
* Get market pool data.
|
|
@@ -64,6 +66,8 @@ export declare const getMarketCollaterals: (query: ScallopQuery, collateralCoinN
|
|
|
64
66
|
apt?: MarketCollateral | undefined;
|
|
65
67
|
sol?: MarketCollateral | undefined;
|
|
66
68
|
cetus?: MarketCollateral | undefined;
|
|
69
|
+
afsui?: MarketCollateral | undefined;
|
|
70
|
+
hasui?: MarketCollateral | undefined;
|
|
67
71
|
}>;
|
|
68
72
|
/**
|
|
69
73
|
* Get market collateral data.
|
|
@@ -111,6 +115,8 @@ export declare const getCoinAmounts: (query: ScallopQuery, assetCoinNames?: Supp
|
|
|
111
115
|
apt?: number | undefined;
|
|
112
116
|
sol?: number | undefined;
|
|
113
117
|
cetus?: number | undefined;
|
|
118
|
+
afsui?: number | undefined;
|
|
119
|
+
hasui?: number | undefined;
|
|
114
120
|
}>;
|
|
115
121
|
/**
|
|
116
122
|
* Query owned coin amount.
|
|
@@ -138,6 +144,8 @@ export declare const getMarketCoinAmounts: (query: ScallopQuery, marketCoinNames
|
|
|
138
144
|
sapt?: number | undefined;
|
|
139
145
|
ssol?: number | undefined;
|
|
140
146
|
scetus?: number | undefined;
|
|
147
|
+
safsui?: number | undefined;
|
|
148
|
+
shasui?: number | undefined;
|
|
141
149
|
}>;
|
|
142
150
|
/**
|
|
143
151
|
* Query owned market coin (sCoin) amount.
|
|
@@ -17,6 +17,8 @@ export declare const getLendings: (query: ScallopQuery, poolCoinNames?: SupportP
|
|
|
17
17
|
apt?: Lending | undefined;
|
|
18
18
|
sol?: Lending | undefined;
|
|
19
19
|
cetus?: Lending | undefined;
|
|
20
|
+
afsui?: Lending | undefined;
|
|
21
|
+
hasui?: Lending | undefined;
|
|
20
22
|
}>;
|
|
21
23
|
/**
|
|
22
24
|
* Get user lending infomation for specific pool.
|
package/package.json
CHANGED
package/src/constants/common.ts
CHANGED
|
@@ -14,6 +14,8 @@ export const SUPPORT_POOLS = [
|
|
|
14
14
|
'apt',
|
|
15
15
|
'sol',
|
|
16
16
|
'cetus',
|
|
17
|
+
'afsui',
|
|
18
|
+
'hasui',
|
|
17
19
|
] as const;
|
|
18
20
|
|
|
19
21
|
export const SUPPORT_COLLATERALS = [
|
|
@@ -25,6 +27,8 @@ export const SUPPORT_COLLATERALS = [
|
|
|
25
27
|
'apt',
|
|
26
28
|
'sol',
|
|
27
29
|
'cetus',
|
|
30
|
+
'afsui',
|
|
31
|
+
'hasui',
|
|
28
32
|
] as const;
|
|
29
33
|
|
|
30
34
|
export const SUPPORT_SPOOLS = ['ssui', 'susdc', 'susdt'] as const;
|
package/src/constants/enum.ts
CHANGED
|
@@ -17,6 +17,8 @@ export const coinDecimals: SupportCoinDecimals = {
|
|
|
17
17
|
apt: 8,
|
|
18
18
|
sol: 8,
|
|
19
19
|
cetus: 9,
|
|
20
|
+
afsui: 9,
|
|
21
|
+
hasui: 9,
|
|
20
22
|
seth: 8,
|
|
21
23
|
sbtc: 8,
|
|
22
24
|
susdc: 6,
|
|
@@ -25,6 +27,8 @@ export const coinDecimals: SupportCoinDecimals = {
|
|
|
25
27
|
sapt: 8,
|
|
26
28
|
ssol: 8,
|
|
27
29
|
scetus: 9,
|
|
30
|
+
safsui: 9,
|
|
31
|
+
shasui: 9,
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
export const assetCoins: AssetCoins = {
|
|
@@ -36,6 +40,8 @@ export const assetCoins: AssetCoins = {
|
|
|
36
40
|
apt: 'apt',
|
|
37
41
|
sol: 'sol',
|
|
38
42
|
cetus: 'cetus',
|
|
43
|
+
afsui: 'afsui',
|
|
44
|
+
hasui: 'hasui',
|
|
39
45
|
};
|
|
40
46
|
|
|
41
47
|
export const marketCoins: MarketCoins = {
|
|
@@ -47,6 +53,8 @@ export const marketCoins: MarketCoins = {
|
|
|
47
53
|
sapt: 'sapt',
|
|
48
54
|
ssol: 'ssol',
|
|
49
55
|
scetus: 'scetus',
|
|
56
|
+
safsui: 'safsui',
|
|
57
|
+
shasui: 'shasui',
|
|
50
58
|
};
|
|
51
59
|
|
|
52
60
|
export const stakeMarketCoins: StakeMarketCoins = {
|
|
@@ -70,6 +78,8 @@ export const coinIds: AssetCoinIds = {
|
|
|
70
78
|
apt: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37',
|
|
71
79
|
sol: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
|
|
72
80
|
cetus: '0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b',
|
|
81
|
+
afsui: '0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc',
|
|
82
|
+
hasui: '0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d',
|
|
73
83
|
};
|
|
74
84
|
|
|
75
85
|
export const wormholeCoinIds: WormholeCoinIds = {
|