@magmaprotocol/magma-clmm-sdk 0.5.103 → 0.5.105

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
@@ -1757,6 +1757,8 @@ type AlmmPoolInfo = {
1757
1757
  coinAmountA: string;
1758
1758
  coinAmountB: string;
1759
1759
  index?: number;
1760
+ liquidity: string;
1761
+ rewarder_infos: Rewarder[];
1760
1762
  };
1761
1763
  type AlmmAddLiquidityParams = {
1762
1764
  pool_id: string;
package/dist/index.js CHANGED
@@ -10636,6 +10636,7 @@ var GaugeModule = class {
10636
10636
  var import_transactions12 = require("@mysten/sui/transactions");
10637
10637
  var import_calc_dlmm3 = require("@magmaprotocol/calc_dlmm");
10638
10638
  var import_decimal13 = __toESM(require("decimal.js"));
10639
+ var import_bn22 = __toESM(require("bn.js"));
10639
10640
  var AlmmModule = class {
10640
10641
  _sdk;
10641
10642
  _cache = {};
@@ -10662,6 +10663,18 @@ var AlmmModule = class {
10662
10663
  throw new ClmmpoolsError(`Invalid objects. error: ${obj.error}`, "InvalidType" /* InvalidType */);
10663
10664
  }
10664
10665
  const fields = getObjectFields(obj);
10666
+ const rewarders = [];
10667
+ fields.rewarder_manager.fields.rewarders.forEach((item) => {
10668
+ const { emissions_per_second } = item.fields;
10669
+ const emissionSeconds = MathUtil.fromX64(new import_bn22.default(emissions_per_second));
10670
+ const emissionsEveryDay = Math.floor(emissionSeconds.toNumber() * 60 * 60 * 24);
10671
+ rewarders.push({
10672
+ emissions_per_second,
10673
+ coinAddress: extractStructTagFromType(item.fields.reward_coin.fields.name).source_address,
10674
+ growth_global: item.fields.growth_global,
10675
+ emissionsEveryDay
10676
+ });
10677
+ });
10665
10678
  const poolInfo = {
10666
10679
  pool_id: fields.id.id,
10667
10680
  bin_step: fields.bin_step,
@@ -10672,7 +10685,9 @@ var AlmmModule = class {
10672
10685
  active_index: fields.params.fields.active_index,
10673
10686
  real_bin_id: (0, import_calc_dlmm3.get_real_id)(fields.params.fields.active_index),
10674
10687
  coinAmountA: fields.reserve_x,
10675
- coinAmountB: fields.reserve_y
10688
+ coinAmountB: fields.reserve_y,
10689
+ liquidity: fields.liquidity,
10690
+ rewarder_infos: rewarders
10676
10691
  };
10677
10692
  poolList.push(poolInfo);
10678
10693
  this.updateCache(`${fields.id.id}_getPoolObject`, poolInfo, cacheTime24h);