@scallop-io/sui-scallop-sdk 1.4.23 → 1.4.24-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.
@@ -320,6 +320,7 @@ export declare class ScallopQuery {
320
320
  deep?: import("../types").BorrowIncentivePool | undefined;
321
321
  fdusd?: import("../types").BorrowIncentivePool | undefined;
322
322
  blub?: import("../types").BorrowIncentivePool | undefined;
323
+ musd?: import("../types").BorrowIncentivePool | undefined;
323
324
  }>;
324
325
  /**
325
326
  * Get borrow incentive accounts data.
@@ -349,6 +350,7 @@ export declare class ScallopQuery {
349
350
  deep?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
350
351
  fdusd?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
351
352
  blub?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
353
+ musd?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
352
354
  }>;
353
355
  /**
354
356
  * Get user lending and spool infomation for specific pools.
@@ -383,6 +385,7 @@ export declare class ScallopQuery {
383
385
  deep?: import("../types").Lending | undefined;
384
386
  fdusd?: import("../types").Lending | undefined;
385
387
  blub?: import("../types").Lending | undefined;
388
+ musd?: import("../types").Lending | undefined;
386
389
  }>;
387
390
  /**
388
391
  * Get user lending and spool information for specific pool.
@@ -498,7 +501,7 @@ export declare class ScallopQuery {
498
501
  * @param ownerAddress - The owner address.
499
502
  * @return All market sCoin amounts.
500
503
  */
501
- getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<"susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub", number>>>;
504
+ getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<"susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd", number>>>;
502
505
  /**
503
506
  * Get sCoin amount.
504
507
  *
@@ -513,7 +516,7 @@ export declare class ScallopQuery {
513
516
  * @returns
514
517
  */
515
518
  getSCoinSwapRate(fromSCoin: SupportSCoin, toSCoin: SupportSCoin): Promise<number>;
516
- getFlashLoanFees(assetCoinNames?: SupportAssetCoins[]): Promise<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub", number>>;
519
+ getFlashLoanFees(assetCoinNames?: SupportAssetCoins[]): Promise<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd", number>>;
517
520
  /**
518
521
  * Get supply limit of lending pool
519
522
  */
@@ -563,6 +566,7 @@ export declare class ScallopQuery {
563
566
  sdeep?: number | undefined;
564
567
  sfdusd?: number | undefined;
565
568
  sblub?: number | undefined;
569
+ smusd?: number | undefined;
566
570
  usdc?: number | undefined;
567
571
  sbeth?: number | undefined;
568
572
  sbusdt?: number | undefined;
@@ -583,13 +587,14 @@ export declare class ScallopQuery {
583
587
  deep?: number | undefined;
584
588
  fdusd?: number | undefined;
585
589
  blub?: number | undefined;
590
+ musd?: number | undefined;
586
591
  swapt?: number | undefined;
587
592
  }>;
588
593
  /**
589
594
  * Query all address (lending pool, collateral pool, borrow dynamics, interest models, etc.) of all pool
590
595
  * @returns
591
596
  */
592
- getPoolAddresses(): Promise<import("../types").OptionalKeys<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub", {
597
+ getPoolAddresses(pools?: SupportPoolCoins[]): Promise<import("../types").OptionalKeys<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd", {
593
598
  coinName: string;
594
599
  symbol: string;
595
600
  lendingPoolAddress?: string;
@@ -628,7 +633,7 @@ export declare class ScallopQuery {
628
633
  suppliedCoin: number;
629
634
  suppliedValue: number;
630
635
  stakedCoin: number;
631
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub";
636
+ coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd";
632
637
  symbol: string;
633
638
  coinType: string;
634
639
  coinPrice: number;
@@ -645,7 +650,7 @@ export declare class ScallopQuery {
645
650
  availableCollateralInUsd: number;
646
651
  totalUnhealthyCollateralInUsd: number;
647
652
  borrowedPools: {
648
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub";
653
+ coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd";
649
654
  symbol: string;
650
655
  coinDecimals: number;
651
656
  coinType: string;
@@ -655,7 +660,7 @@ export declare class ScallopQuery {
655
660
  borrowApr: number | undefined;
656
661
  borrowApy: number | undefined;
657
662
  incentiveInfos: {
658
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub";
663
+ coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd";
659
664
  symbol: string;
660
665
  coinType: string;
661
666
  incentiveApr: number;
@@ -65,7 +65,7 @@ export declare class ScallopUtils {
65
65
  * if no `scallop_...` is encountered, return coinName
66
66
  * @return sCoin name
67
67
  */
68
- parseSCoinTypeNameToMarketCoinName(coinName: string): "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub";
68
+ parseSCoinTypeNameToMarketCoinName(coinName: string): "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd";
69
69
  /**
70
70
  * Convert sCoin name into sCoin type
71
71
  * @param sCoinName
@@ -77,7 +77,7 @@ export declare class ScallopUtils {
77
77
  * @param sCoinType
78
78
  * @returns sCoin name
79
79
  */
80
- parseSCoinNameFromType(sCoinType: string): "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub";
80
+ parseSCoinNameFromType(sCoinType: string): "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd";
81
81
  /**
82
82
  * Convert sCoin name into its underlying coin type
83
83
  * @param sCoinName
@@ -36,6 +36,7 @@ export declare const getBorrowIncentivePools: (query: ScallopQuery, borrowIncent
36
36
  deep?: BorrowIncentivePool | undefined;
37
37
  fdusd?: BorrowIncentivePool | undefined;
38
38
  blub?: BorrowIncentivePool | undefined;
39
+ musd?: BorrowIncentivePool | undefined;
39
40
  }>;
40
41
  /**
41
42
  * Query borrow incentive accounts data.
@@ -67,6 +68,7 @@ export declare const queryBorrowIncentiveAccounts: ({ utils, }: {
67
68
  deep?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
68
69
  fdusd?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
69
70
  blub?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
71
+ musd?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
70
72
  }>;
71
73
  /**
72
74
  * Check veSca bind status
@@ -1,6 +1,6 @@
1
1
  import { ScallopQuery } from 'src/models';
2
- import { OptionalKeys } from 'src/types';
3
- export declare const getAllAddresses: (query: ScallopQuery) => Promise<OptionalKeys<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub", {
2
+ import { OptionalKeys, SupportPoolCoins } from 'src/types';
3
+ export declare const getAllAddresses: (query: ScallopQuery, pools: SupportPoolCoins[]) => Promise<OptionalKeys<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd", {
4
4
  coinName: string;
5
5
  symbol: string;
6
6
  lendingPoolAddress?: string;
@@ -31,6 +31,7 @@ export declare const getLendings: (query: ScallopQuery, poolCoinNames?: SupportP
31
31
  deep?: Lending | undefined;
32
32
  fdusd?: Lending | undefined;
33
33
  blub?: Lending | undefined;
34
+ musd?: Lending | undefined;
34
35
  }>;
35
36
  /**
36
37
  * Get user lending infomation for specific pool.
@@ -90,7 +91,7 @@ export declare const getUserPortfolio: (query: ScallopQuery, walletAddress: stri
90
91
  suppliedCoin: number;
91
92
  suppliedValue: number;
92
93
  stakedCoin: number;
93
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub";
94
+ coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd";
94
95
  symbol: string;
95
96
  coinType: string;
96
97
  coinPrice: number;
@@ -107,7 +108,7 @@ export declare const getUserPortfolio: (query: ScallopQuery, walletAddress: stri
107
108
  availableCollateralInUsd: number;
108
109
  totalUnhealthyCollateralInUsd: number;
109
110
  borrowedPools: {
110
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub";
111
+ coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd";
111
112
  symbol: string;
112
113
  coinDecimals: number;
113
114
  coinType: string;
@@ -117,7 +118,7 @@ export declare const getUserPortfolio: (query: ScallopQuery, walletAddress: stri
117
118
  borrowApr: number | undefined;
118
119
  borrowApy: number | undefined;
119
120
  incentiveInfos: {
120
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub";
121
+ coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd";
121
122
  symbol: string;
122
123
  coinType: string;
123
124
  incentiveApr: number;
@@ -34,6 +34,7 @@ export declare const getAllCoinPrices: (query: ScallopQuery, marketPools?: Marke
34
34
  sdeep?: number | undefined;
35
35
  sfdusd?: number | undefined;
36
36
  sblub?: number | undefined;
37
+ smusd?: number | undefined;
37
38
  usdc?: number | undefined;
38
39
  sbeth?: number | undefined;
39
40
  sbusdt?: number | undefined;
@@ -54,5 +55,6 @@ export declare const getAllCoinPrices: (query: ScallopQuery, marketPools?: Marke
54
55
  deep?: number | undefined;
55
56
  fdusd?: number | undefined;
56
57
  blub?: number | undefined;
58
+ musd?: number | undefined;
57
59
  swapt?: number | undefined;
58
60
  }>;
@@ -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" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub", number>>>;
22
+ }, sCoinNames?: SupportSCoin[], ownerAddress?: string) => Promise<OptionalKeys<Record<"susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd", 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.4.23",
3
+ "version": "1.4.24-alpha.1",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -1,24 +1,32 @@
1
1
  import { SupportPoolCoins } from 'src/types/constant/common';
2
2
 
3
3
  export const COIN_GECKGO_IDS: Record<SupportPoolCoins, string> = {
4
- usdc: 'usdc',
4
+ // Sui Bridge
5
5
  sbeth: 'ethereum',
6
6
  sbusdt: 'tether',
7
7
  sbwbtc: 'bitcoin',
8
+ // Wormhole
8
9
  weth: 'ethereum',
9
10
  wbtc: 'bitcoin',
10
11
  wusdc: 'usdc',
11
12
  wusdt: 'tether',
12
- sui: 'sui',
13
13
  wapt: 'aptos',
14
14
  wsol: 'solana',
15
- cetus: 'cetus-protocol',
15
+ // Sui Native
16
+ usdc: 'usdc',
17
+ // Sui LST
18
+ sui: 'sui',
16
19
  afsui: 'sui',
17
20
  hasui: 'sui',
18
21
  vsui: 'sui',
19
- sca: 'scallop-2',
22
+ // Stable
20
23
  fdusd: 'first-digital-usd',
24
+ // DeFi
25
+ cetus: 'cetus-protocol',
26
+ sca: 'scallop-2',
21
27
  deep: 'deepbook',
28
+ // Isolated Asset
22
29
  fud: 'fud-the-pug',
23
30
  blub: 'blub',
31
+ musd: '', // @TODO: add coinGecko id
24
32
  };
@@ -50,6 +50,7 @@ export const SUPPORT_POOLS = [
50
50
  'deep',
51
51
  'fdusd',
52
52
  'blub',
53
+ 'musd',
53
54
  ] as const;
54
55
 
55
56
  export const SUPPORT_COLLATERALS = [
@@ -104,6 +105,7 @@ export const SUPPORT_SCOIN = [
104
105
  'sfud',
105
106
  'sfdusd',
106
107
  'sblub',
108
+ 'smusd',
107
109
  ] as const;
108
110
 
109
111
  export const SUPPORT_SUI_BRIDGE = ['sbeth', 'sbusdt', 'sbwbtc'] as const;
@@ -22,6 +22,7 @@ export const coinDecimals: types.SupportCoinDecimals = {
22
22
  deep: 6,
23
23
  fud: 5,
24
24
  blub: 2,
25
+ musd: 9,
25
26
  susdc: 6,
26
27
  sweth: 8,
27
28
  ssbeth: 8,
@@ -42,6 +43,7 @@ export const coinDecimals: types.SupportCoinDecimals = {
42
43
  sdeep: 6,
43
44
  sfud: 5,
44
45
  sblub: 2,
46
+ smusd: 9,
45
47
  };
46
48
 
47
49
  export const assetCoins: types.AssetCoins = {
@@ -65,6 +67,7 @@ export const assetCoins: types.AssetCoins = {
65
67
  deep: 'deep',
66
68
  fud: 'fud',
67
69
  blub: 'blub',
70
+ musd: 'musd',
68
71
  };
69
72
 
70
73
  export const marketCoins: types.MarketCoins = {
@@ -88,6 +91,7 @@ export const marketCoins: types.MarketCoins = {
88
91
  sdeep: 'sdeep',
89
92
  sfud: 'sfud',
90
93
  sblub: 'sblub',
94
+ smusd: 'smusd',
91
95
  };
92
96
 
93
97
  export const sCoins: types.SCoins = {
@@ -110,6 +114,7 @@ export const sCoins: types.SCoins = {
110
114
  sfud: 'sfud',
111
115
  sdeep: 'sdeep',
112
116
  sblub: 'sblub',
117
+ smusd: 'smusd',
113
118
  };
114
119
 
115
120
  export const stakeMarketCoins: types.StakeMarketCoins = {
@@ -170,6 +175,7 @@ export const coinIds: types.AssetCoinIds = {
170
175
  sbeth: '0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29',
171
176
  sbusdt: '0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068',
172
177
  sbwbtc: '0xaafb102dd0902f5055cadecd687fb5b71ca82ef0e0285d90afde828ec58ca96b',
178
+ musd: '0xe44df51c0b21a27ab915fa1fe2ca610cd3eaa6d9666fe5e62b988bf7f0bd8722',
173
179
  };
174
180
 
175
181
  export const wormholeCoinIds: types.WormholeCoinIds = {
@@ -227,6 +233,8 @@ export const sCoinIds: types.SCoinIds = {
227
233
  '0xb1d7df34829d1513b73ba17cb7ad90c88d1e104bb65ab8f62f13e0cc103783d3::scallop_sb_usdt::SCALLOP_SB_USDT',
228
234
  ssbwbtc:
229
235
  '0x08c0fe357d3a138f4552bee393ce3a28a45bebcca43373d6a90bc44ab76f82e2::scallop_sb_wbtc::SCALLOP_SB_WBTC',
236
+ smusd:
237
+ '0x0a228d1c59071eccf3716076a1f71216846ee256d9fb07ea11fb7c1eb56435a5::scallop_musd::SCALLOP_MUSD',
230
238
  } as const;
231
239
 
232
240
  export const sCoinTypeToName = Object.entries(sCoinIds).reduce(
@@ -786,4 +786,38 @@ export const POOL_ADDRESSES: OptionalKeys<
786
786
  pythFeedObjectId:
787
787
  '0x5f6583b2b0fe1ecf94aaffeaab8a838794693960cea48c0da282d5f4a24be027',
788
788
  },
789
+ // @TODO: add pyth feed
790
+ musd: {
791
+ coinName: 'musd',
792
+ symbol: 'mUSD',
793
+ lendingPoolAddress:
794
+ '0x0565254220e7ca857a87341898bdebeb9e5d6f8f8fe68eb25dd3e257d41a0b0c',
795
+ collateralPoolAddress: undefined,
796
+ borrowDynamic:
797
+ '0x9448dc2ae8054d5b735fd617fb4ca57046ddc98bfff91ce31de1df452f3bf695',
798
+ interestModel:
799
+ '0xc3b57c57814e22ac42c7062922a0437ebf40495e37aee32cbb94cba0693970ed',
800
+ riskModel: undefined,
801
+ borrowFeeKey:
802
+ '0xfdb02d76dc67553fd15f42f1de49ca79cd2812bdaf8bcd079cfe17ce23ed9fc4',
803
+ supplyLimitKey:
804
+ '0x340aaae070f9489b59c4257610babf6f170abf43fbe51cf7de1e2e04492f6823',
805
+ isolatedAssetKey:
806
+ '0xe10f03b13d2cdb46543130bafaf1884c9a5a7712b5932aae15b2f8d4fc31a774',
807
+ sCoinTreasury:
808
+ '0xadfd554635ccc87e992f23ca838f0f16c14874e324a1b79b77f6bfe118edea9f',
809
+ sCoinType:
810
+ '0x0a228d1c59071eccf3716076a1f71216846ee256d9fb07ea11fb7c1eb56435a5::scallop_musd::SCALLOP_MUSD',
811
+ sCoinName: 'smusd',
812
+ sCoinSymbol: 'smUSD',
813
+ coinMetadataId:
814
+ '0xc154abd271b24032a2c80d96c1b82109490bb600ed189ef881d8c9467ed44a4f',
815
+ coinType:
816
+ '0xe44df51c0b21a27ab915fa1fe2ca610cd3eaa6d9666fe5e62b988bf7f0bd8722::musd::MUSD',
817
+ sCoinMetadataId:
818
+ '0xb924f8c3d4b993172d4fc553c1ea242e8ca539e83edc3edaf5512ae44dfa6863',
819
+ decimals: 0,
820
+ pythFeed: '',
821
+ pythFeedObjectId: '',
822
+ },
789
823
  };
@@ -28,4 +28,5 @@ export const PYTH_FEED_IDS: Record<SupportPoolCoins, string> = {
28
28
  deep: '29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff',
29
29
  fud: '6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75',
30
30
  blub: '5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c',
31
+ musd: '', // @TODO: add mUSD pyth
31
32
  };
@@ -243,6 +243,8 @@ export const TEST_ADDRESSES: AddressesInterface = {
243
243
  sbwbtc: {},
244
244
  // @ts-ignore
245
245
  blub: {},
246
+ // @ts-ignore
247
+ musd: {},
246
248
  fdusd: {
247
249
  id: '0xf16e6b723f242ec745dfd7634ad072c42d5c1d9ac9d62a39c381303eaa57693a',
248
250
  metaData:
@@ -866,8 +866,10 @@ export class ScallopQuery {
866
866
  * Query all address (lending pool, collateral pool, borrow dynamics, interest models, etc.) of all pool
867
867
  * @returns
868
868
  */
869
- public async getPoolAddresses() {
870
- return getAllAddresses(this);
869
+ public async getPoolAddresses(
870
+ pools: SupportPoolCoins[] = [...SUPPORT_POOLS]
871
+ ) {
872
+ return getAllAddresses(this, pools);
871
873
  }
872
874
 
873
875
  /**
@@ -1,8 +1,11 @@
1
- import { PYTH_FEED_IDS, SUPPORT_POOLS } from 'src/constants';
1
+ import { PYTH_FEED_IDS } from 'src/constants';
2
2
  import { ScallopQuery } from 'src/models';
3
3
  import { OptionalKeys, SupportPoolCoins } from 'src/types';
4
4
 
5
- export const getAllAddresses = async (query: ScallopQuery) => {
5
+ export const getAllAddresses = async (
6
+ query: ScallopQuery,
7
+ pools: SupportPoolCoins[]
8
+ ) => {
6
9
  const results: OptionalKeys<
7
10
  Record<
8
11
  SupportPoolCoins,
@@ -44,7 +47,7 @@ export const getAllAddresses = async (query: ScallopQuery) => {
44
47
 
45
48
  const fields = marketObject.content.fields as any;
46
49
 
47
- const coinTypesPairs = SUPPORT_POOLS.reduce(
50
+ const coinTypesPairs = pools.reduce(
48
51
  (acc, pool) => {
49
52
  acc.push([pool, query.utils.parseCoinType(pool).substring(2)]);
50
53
  return acc;
package/src/utils/util.ts CHANGED
@@ -55,10 +55,13 @@ export const parseAssetSymbol = (coinName: SupportCoins): string => {
55
55
  return `w${coinName.slice(1).toUpperCase()}`;
56
56
  }
57
57
  if (isSuiBridgeAsset(coinName)) {
58
- if (coinName.startsWith('sbw') && coinName.length > 3) {
59
- return `sbw${coinName.slice(3).toUpperCase()}`;
58
+ switch (coinName) {
59
+ case 'sbwbtc':
60
+ return 'sbwBTC';
61
+ default: {
62
+ return `sb${coinName.slice(2).toUpperCase()}`;
63
+ }
60
64
  }
61
- return `sb${coinName.slice(2).toUpperCase()}`;
62
65
  }
63
66
  if (isMarketCoin(coinName)) {
64
67
  const assetCoinName = coinName.slice(1).toLowerCase() as SupportAssetCoins;
@@ -71,6 +74,8 @@ export const parseAssetSymbol = (coinName: SupportCoins): string => {
71
74
  return 'haSUI';
72
75
  case 'vsui':
73
76
  return 'vSUI';
77
+ case 'musd':
78
+ return 'mUSD';
74
79
  default:
75
80
  return coinName.toUpperCase();
76
81
  }