@scallop-io/sui-scallop-sdk 1.3.5-alpha.4 → 1.3.5-rc.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.
@@ -69,6 +69,8 @@ export declare class ScallopQuery {
69
69
  hasui?: MarketPool | undefined;
70
70
  vsui?: MarketPool | undefined;
71
71
  sca?: MarketPool | undefined;
72
+ fud?: MarketPool | undefined;
73
+ deep?: MarketPool | undefined;
72
74
  }>;
73
75
  /**
74
76
  * Get market pool
@@ -351,6 +353,8 @@ export declare class ScallopQuery {
351
353
  hasui?: import("../types").Lending | undefined;
352
354
  vsui?: import("../types").Lending | undefined;
353
355
  sca?: import("../types").Lending | undefined;
356
+ fud?: import("../types").Lending | undefined;
357
+ deep?: import("../types").Lending | undefined;
354
358
  }>;
355
359
  /**
356
360
  * Get user lending and spool information for specific pool.
@@ -453,7 +457,7 @@ export declare class ScallopQuery {
453
457
  * @param ownerAddress - The owner address.
454
458
  * @return All market sCoin amounts.
455
459
  */
456
- getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<"susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca", number>>>;
460
+ getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<"susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep", number>>>;
457
461
  /**
458
462
  * Get sCoin amount.
459
463
  *
@@ -468,7 +472,7 @@ export declare class ScallopQuery {
468
472
  * @returns
469
473
  */
470
474
  getSCoinSwapRate(fromSCoin: SupportSCoin, toSCoin: SupportSCoin): Promise<number>;
471
- getFlashLoanFees(assetCoinNames?: SupportAssetCoins[]): Promise<Record<"usdc" | "sbeth" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca", number>>;
475
+ getFlashLoanFees(assetCoinNames?: SupportAssetCoins[]): Promise<Record<"usdc" | "sbeth" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep", number>>;
472
476
  /**
473
477
  * Get supply limit of lending pool
474
478
  */
@@ -512,6 +516,8 @@ export declare class ScallopQuery {
512
516
  shasui?: number | undefined;
513
517
  svsui?: number | undefined;
514
518
  ssca?: number | undefined;
519
+ sfud?: number | undefined;
520
+ sdeep?: number | undefined;
515
521
  usdc?: number | undefined;
516
522
  sbeth?: number | undefined;
517
523
  weth?: number | undefined;
@@ -526,6 +532,8 @@ export declare class ScallopQuery {
526
532
  hasui?: number | undefined;
527
533
  vsui?: number | undefined;
528
534
  sca?: number | undefined;
535
+ fud?: number | undefined;
536
+ deep?: number | undefined;
529
537
  swapt?: number | undefined;
530
538
  }>;
531
539
  }
@@ -64,7 +64,7 @@ export declare class ScallopUtils {
64
64
  * e.g: `scallop_sui -> ssui
65
65
  * @return sCoin name
66
66
  */
67
- parseCoinNameFromSCoinName(coinName: string): "susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca";
67
+ parseCoinNameFromSCoinName(coinName: string): "susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep";
68
68
  /**
69
69
  * Convert sCoin name into sCoin type
70
70
  * @param sCoinName
@@ -76,7 +76,7 @@ export declare class ScallopUtils {
76
76
  * @param sCoinType
77
77
  * @returns sCoin name
78
78
  */
79
- parseSCoinNameFromType(sCoinType: string): "susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca";
79
+ parseSCoinNameFromType(sCoinType: string): "susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep";
80
80
  /**
81
81
  * Convert sCoin name into its underlying coin type
82
82
  * @param sCoinName
@@ -40,6 +40,8 @@ export declare const getMarketPools: (query: ScallopQuery, poolCoinNames?: Suppo
40
40
  hasui?: MarketPool | undefined;
41
41
  vsui?: MarketPool | undefined;
42
42
  sca?: MarketPool | undefined;
43
+ fud?: MarketPool | undefined;
44
+ deep?: MarketPool | undefined;
43
45
  }>;
44
46
  /**
45
47
  * Get market pool data.
@@ -24,6 +24,8 @@ export declare const getLendings: (query: ScallopQuery, poolCoinNames?: SupportP
24
24
  hasui?: Lending | undefined;
25
25
  vsui?: Lending | undefined;
26
26
  sca?: Lending | undefined;
27
+ fud?: Lending | undefined;
28
+ deep?: Lending | undefined;
27
29
  }>;
28
30
  /**
29
31
  * Get user lending infomation for specific pool.
@@ -28,6 +28,8 @@ export declare const getAllCoinPrices: (query: ScallopQuery, marketPools?: Marke
28
28
  shasui?: number | undefined;
29
29
  svsui?: number | undefined;
30
30
  ssca?: number | undefined;
31
+ sfud?: number | undefined;
32
+ sdeep?: number | undefined;
31
33
  usdc?: number | undefined;
32
34
  sbeth?: number | undefined;
33
35
  weth?: number | undefined;
@@ -42,5 +44,7 @@ export declare const getAllCoinPrices: (query: ScallopQuery, marketPools?: Marke
42
44
  hasui?: number | undefined;
43
45
  vsui?: number | undefined;
44
46
  sca?: number | undefined;
47
+ fud?: number | undefined;
48
+ deep?: number | undefined;
45
49
  swapt?: number | undefined;
46
50
  }>;
@@ -19,7 +19,7 @@ export declare const getSCoinTotalSupply: ({ utils, }: {
19
19
  */
20
20
  export declare const getSCoinAmounts: ({ utils, }: {
21
21
  utils: ScallopUtils;
22
- }, sCoinNames?: SupportSCoin[], ownerAddress?: string) => Promise<OptionalKeys<Record<"susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca", number>>>;
22
+ }, sCoinNames?: SupportSCoin[], ownerAddress?: string) => Promise<OptionalKeys<Record<"susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep", number>>>;
23
23
  /**
24
24
  * Query owned sCoin amount.
25
25
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/sui-scallop-sdk",
3
- "version": "1.3.5-alpha.4",
3
+ "version": "1.3.5-rc.1",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -15,7 +15,6 @@ export const COIN_GECKGO_IDS: Record<SupportPoolCoins, string> = {
15
15
  hasui: 'sui',
16
16
  vsui: 'sui',
17
17
  sca: 'scallop-2',
18
- // TODO: enable for production
19
- // deep: 'deepbook',
20
- // fud: 'fud-the-pug',
18
+ deep: 'deepbook',
19
+ fud: 'fud-the-pug',
21
20
  };
@@ -9,7 +9,6 @@ export const ADDRESSES_ID =
9
9
  ? ('65fb07c39c845425d71d7b18' as const)
10
10
  : ('675c65cd301dd817ea262e76' as const);
11
11
  // : ('66f8e7ed9bb9e07fdfb86bbb' as const);
12
- // : ('664dfe22898c36c159e28bc8' as const);
13
12
 
14
13
  export const PROTOCOL_OBJECT_ID = IS_VE_SCA_TEST
15
14
  ? ('0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778' as const)
@@ -45,9 +44,8 @@ export const SUPPORT_POOLS = [
45
44
  'hasui',
46
45
  'vsui',
47
46
  'sca',
48
- // TODO: enable for production
49
- // 'fud',
50
- // 'deep',
47
+ 'fud',
48
+ 'deep',
51
49
  ] as const;
52
50
 
53
51
  export const SUPPORT_COLLATERALS = [
@@ -93,9 +91,8 @@ export const SUPPORT_SCOIN = [
93
91
  'scetus',
94
92
  'swsol',
95
93
  'swbtc',
96
- // TODO: enable for production
97
- // 'sdeep',
98
- // 'sfud',
94
+ 'sdeep',
95
+ 'sfud',
99
96
  ] as const;
100
97
 
101
98
  export const SUPPORT_SUI_BRIDGE = ['sbeth'] as const;
@@ -16,9 +16,8 @@ export const coinDecimals: types.SupportCoinDecimals = {
16
16
  hasui: 9,
17
17
  vsui: 9,
18
18
  sca: 9,
19
- // TODO: enable for production
20
- // deep: 6,
21
- // fud: 5,
19
+ deep: 6,
20
+ fud: 5,
22
21
  susdc: 6,
23
22
  sweth: 8,
24
23
  ssbeth: 8,
@@ -33,9 +32,8 @@ export const coinDecimals: types.SupportCoinDecimals = {
33
32
  shasui: 9,
34
33
  svsui: 9,
35
34
  ssca: 9,
36
- // TODO: enable for production
37
- // sdeep: 6,
38
- // sfud: 5,
35
+ sdeep: 6,
36
+ sfud: 5,
39
37
  };
40
38
 
41
39
  export const assetCoins: types.AssetCoins = {
@@ -53,9 +51,8 @@ export const assetCoins: types.AssetCoins = {
53
51
  hasui: 'hasui',
54
52
  vsui: 'vsui',
55
53
  sca: 'sca',
56
- // TODO: enable for production
57
- // deep: 'deep',
58
- // fud: 'fud',
54
+ deep: 'deep',
55
+ fud: 'fud',
59
56
  };
60
57
 
61
58
  export const marketCoins: types.MarketCoins = {
@@ -73,9 +70,8 @@ export const marketCoins: types.MarketCoins = {
73
70
  shasui: 'shasui',
74
71
  svsui: 'svsui',
75
72
  ssca: 'ssca',
76
- // TODO: enable for production
77
- // sdeep: 'sdeep',
78
- // sfud: 'sfud',
73
+ sdeep: 'sdeep',
74
+ sfud: 'sfud',
79
75
  };
80
76
 
81
77
  export const sCoins: types.SCoins = {
@@ -92,9 +88,8 @@ export const sCoins: types.SCoins = {
92
88
  ssca: 'ssca',
93
89
  swsol: 'swsol',
94
90
  swbtc: 'swbtc',
95
- // TODO: enable for production
96
- // sfud: 'sfud',
97
- // sdeep: 'sdeep',
91
+ sfud: 'sfud',
92
+ sdeep: 'sdeep',
98
93
  };
99
94
 
100
95
  export const stakeMarketCoins: types.StakeMarketCoins = {
@@ -143,8 +138,8 @@ export const coinIds: types.AssetCoinIds = {
143
138
  ? '0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524'
144
139
  : '0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6',
145
140
  // isolated assets
146
- // deep: '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270',
147
- // fud: '0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1',
141
+ deep: '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270',
142
+ fud: '0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1',
148
143
  };
149
144
 
150
145
  export const wormholeCoinIds: types.WormholeCoinIds = {
@@ -166,22 +161,12 @@ export const sCoinIds: types.SCoinIds = {
166
161
  '0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC',
167
162
  ssbeth:
168
163
  '0xb14f82d8506d139eacef109688d1b71e7236bcce9b2c0ad526abcd6aa5be7de0::scallop_sb_eth::SCALLOP_SB_ETH',
169
- // prod values
170
- // ssui: '0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI',
171
- // swusdc:
172
- // '0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
173
- // swusdt:
174
- // '0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
175
- // ssca: '0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA',
176
-
177
- // test values
178
- ssui: '0xf569919046f19a0c40b519ecfbb6ca0319698cd5908716c29b62ef56541f298b::scallop_sui::SCALLOP_SUI',
179
- swusdt:
180
- '0xac781d9f73058ff5e69f9bf8dde32f2e8c71c66d7fe8497fc83b2d9182254b22::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
164
+ ssui: '0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI',
181
165
  swusdc:
182
- '0xf5447c4305a486d8c8557559887c2c39449ddb5e748f15d33946d02a1663c158::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
183
- ssca: '0x958428555e778e55918a59eb1c92c77f32b5c554fa3a5e56cd0815086b5072e7::scallop_sca::SCALLOP_SCA',
184
-
166
+ '0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
167
+ swusdt:
168
+ '0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
169
+ ssca: '0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA',
185
170
  scetus:
186
171
  '0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS',
187
172
  sweth:
@@ -196,9 +181,9 @@ export const sCoinIds: types.SCoinIds = {
196
181
  '0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL',
197
182
  swbtc:
198
183
  '0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC',
199
- // sdeep:
200
- // '0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP',
201
- // sfud: '0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD',
184
+ sdeep:
185
+ '0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP',
186
+ sfud: '0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD',
202
187
  } as const;
203
188
 
204
189
  export const sCoinTypeToName = Object.entries(sCoinIds).reduce(
@@ -91,13 +91,12 @@ export const POOL_ADDRESSES: Record<
91
91
  collateralPoolAddress:
92
92
  '0xff677a5d9e9dc8f08f0a8681ebfc7481d1c7d57bc441f2881974adcdd7b13c31',
93
93
  },
94
- // TODO: enable for production
95
- // fud: {
96
- // lendingPoolAddress:
97
- // '0x14367ddca30e2860cb89ed4eaca20c7ece260c5d59dd9990d2c85a8321326acb',
98
- // },
99
- // deep: {
100
- // lendingPoolAddress:
101
- // '0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03',
102
- // },
94
+ fud: {
95
+ lendingPoolAddress:
96
+ '0x14367ddca30e2860cb89ed4eaca20c7ece260c5d59dd9990d2c85a8321326acb',
97
+ },
98
+ deep: {
99
+ lendingPoolAddress:
100
+ '0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03',
101
+ },
103
102
  };
@@ -22,7 +22,6 @@ export const PYTH_FEED_IDS: Record<SupportPoolCoins, string> = {
22
22
  hasui: '23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744',
23
23
  vsui: '23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744',
24
24
  sca: '7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc',
25
- // TODO: enable for production
26
- // deep: '29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff',
27
- // fud: '6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75',
25
+ deep: '29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff',
26
+ fud: '6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75',
28
27
  };
@@ -17,9 +17,8 @@ const borrowLimitZod = zod.object({
17
17
  }),
18
18
  });
19
19
 
20
- // TODO: enable for production
21
- // const borrowLimitKeyType = `0xe7dbb371a9595631f7964b7ece42255ad0e738cc85fe6da26c7221b220f01af6::market_dynamic_keys::BorrowLimitKey`; // prod
22
- const borrowLimitKeyType = `0xb784ea287d944e478a3ceaa071f8885072cce6b7224cf245914dc2f9963f460e::market_dynamic_keys::BorrowLimitKey`;
20
+ const borrowLimitKeyType = `0xe7dbb371a9595631f7964b7ece42255ad0e738cc85fe6da26c7221b220f01af6::market_dynamic_keys::BorrowLimitKey`; // prod
21
+ // const borrowLimitKeyType = `0xb784ea287d944e478a3ceaa071f8885072cce6b7224cf245914dc2f9963f460e::market_dynamic_keys::BorrowLimitKey`;
23
22
  /**
24
23
  * Return supply limit of a pool (including the decimals)
25
24
  * @param utils
@@ -18,9 +18,8 @@ const isolatedAssetZod = zod.object({
18
18
  }),
19
19
  });
20
20
 
21
- // TODO: enable for production
22
- // const isolatedAssetKeyType = `0xe7dbb371a9595631f7964b7ece42255ad0e738cc85fe6da26c7221b220f01af6::market_dynamic_keys::IsolatedAssetKey`; // prod
23
- const isolatedAssetKeyType = `0x6c23585e940a989588432509107e98bae06dbca4e333f26d0635d401b3c7c76d::market_dynamic_keys::IsolatedAssetKey`;
21
+ const isolatedAssetKeyType = `0xe7dbb371a9595631f7964b7ece42255ad0e738cc85fe6da26c7221b220f01af6::market_dynamic_keys::IsolatedAssetKey`; // prod
22
+ // const isolatedAssetKeyType = `0x6c23585e940a989588432509107e98bae06dbca4e333f26d0635d401b3c7c76d::market_dynamic_keys::IsolatedAssetKey`;
24
23
 
25
24
  /**
26
25
  * Return list of isolated assets coin types
@@ -17,9 +17,8 @@ const supplyLimitZod = zod.object({
17
17
  }),
18
18
  });
19
19
 
20
- // TODO: enable for production
21
- // const supplyLimitKeyType = `0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e::market_dynamic_keys::SupplyLimitKey`; // prod
22
- const supplyLimitKeyType = `0x6c23585e940a989588432509107e98bae06dbca4e333f26d0635d401b3c7c76d::market_dynamic_keys::SupplyLimitKey`;
20
+ const supplyLimitKeyType = `0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e::market_dynamic_keys::SupplyLimitKey`; // prod
21
+ // const supplyLimitKeyType = `0x6c23585e940a989588432509107e98bae06dbca4e333f26d0635d401b3c7c76d::market_dynamic_keys::SupplyLimitKey`;
23
22
  /**
24
23
  * Return supply limit of a pool (including the decimals)
25
24
  * @param utils