@cetusprotocol/margin-sdk 0.0.5 → 0.0.6

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.ts CHANGED
@@ -12,7 +12,7 @@ import { Reserve } from '@suilend/sdk/_generated/suilend/reserve/structs';
12
12
  import { Obligation } from '@suilend/sdk/_generated/suilend/obligation/structs';
13
13
  import Decimal from 'decimal.js';
14
14
  import { SuilendClient as SuilendClient$1 } from '@suilend/sdk/client';
15
- import { CoinMetadata } from '@mysten/sui/client';
15
+ import { CoinMetadata } from '@mysten/sui/jsonRpc';
16
16
  import BigNumber$1 from 'bignumber.js';
17
17
 
18
18
  type MarginTradingConfig = {
@@ -377,7 +377,13 @@ interface AppData {
377
377
  }
378
378
  interface AllAppData {
379
379
  allLendingMarketData: Record<string, AppData>;
380
- lstAprPercentMap: Record<string, BigNumber>;
380
+ lstStatsMap: Record<string, {
381
+ lstToSuiExchangeRate: BigNumber;
382
+ aprPercent: BigNumber;
383
+ }>;
384
+ sdeUsdAprPercent: BigNumber | undefined;
385
+ eThirdAprPercent: BigNumber | undefined;
386
+ eEarnAprPercent: BigNumber | undefined;
381
387
  }
382
388
  interface SuiLendCoinAprResult {
383
389
  new_total_apr_percent: string | undefined;
@@ -706,6 +712,7 @@ declare class SuiLendModule {
706
712
  lendingMarketCache?: AllAppData;
707
713
  obligationsCache?: Record<string, any>;
708
714
  private suilendClientCache?;
715
+ private pythPriceModule;
709
716
  constructor(sdk: CetusMarginTradingSDK);
710
717
  /**
711
718
  * Get or initialize SuilendClient
@@ -1040,16 +1047,16 @@ declare class SwapModules {
1040
1047
  */
1041
1048
  flashLoan: (params: FlashLoanParams) => {
1042
1049
  balance_a: {
1043
- $kind: "NestedResult";
1044
1050
  NestedResult: [number, number];
1051
+ $kind: "NestedResult";
1045
1052
  };
1046
1053
  balance_b: {
1047
- $kind: "NestedResult";
1048
1054
  NestedResult: [number, number];
1055
+ $kind: "NestedResult";
1049
1056
  };
1050
1057
  receipt: {
1051
- $kind: "NestedResult";
1052
1058
  NestedResult: [number, number];
1059
+ $kind: "NestedResult";
1053
1060
  };
1054
1061
  is_loan_a: boolean;
1055
1062
  loan_coin_type: string;
@@ -1161,7 +1168,7 @@ declare const wrapPosition: (position: any, position_cap_id: string) => {
1161
1168
  market_id: any;
1162
1169
  position_cap_id: string;
1163
1170
  };
1164
- declare const mergePositionData: (position: any, obligation: any, reserve_map: any, lst_apr_percent_map: any, reward_map: any) => any;
1171
+ declare const mergePositionData: (position: any, obligation: any, reserve_map: any, lst_apr_percent_map: any, sdeUsdAprPercent: any, eThirdAprPercent: any, eEarnAprPercent: any, reward_map: any) => any;
1165
1172
  declare const wrapMarketPermissions: (permissions: string) => {
1166
1173
  open_permissions_pause: boolean;
1167
1174
  close_permissions_pause: boolean;