@magmaprotocol/magma-clmm-sdk 0.5.105 → 0.5.107

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
@@ -1855,6 +1855,8 @@ type AlmmPositionInfo = {
1855
1855
  rewards: AlmmEventEarnedRewards;
1856
1856
  fees: AlmmEventEarnedFees;
1857
1857
  contractPool: AlmmPoolInfo | undefined;
1858
+ coin_type_a: string;
1859
+ coin_type_b: string;
1858
1860
  };
1859
1861
  type MintByStrategyParams = {
1860
1862
  pair: string;
@@ -3781,7 +3783,8 @@ declare class AlmmModule implements IModule {
3781
3783
  private _raisePositionByAmountsReward;
3782
3784
  burnPosition(params: AlmmBurnPositionParams): Promise<Transaction>;
3783
3785
  shrinkPosition(params: AlmmShrinkPosition): Promise<Transaction>;
3784
- collectFeeAndReward(params: AlmmCollectRewardParams & AlmmCollectFeeParams): Promise<Transaction>;
3786
+ collectFeeAndRewardList(paramsList: AlmmCollectRewardParams[]): Promise<Transaction>;
3787
+ collectFeeAndReward(params: AlmmCollectRewardParams & AlmmCollectFeeParams, tx?: Transaction): Promise<Transaction>;
3785
3788
  collectReward(params: AlmmCollectRewardParams, transaction?: Transaction): Promise<Transaction>;
3786
3789
  collectFees(params: AlmmCollectFeeParams, transaction?: Transaction): Promise<Transaction>;
3787
3790
  createPairAddLiquidity(params: AlmmCreatePairAddLiquidityParams): Promise<Transaction>;
package/dist/index.js CHANGED
@@ -11070,8 +11070,18 @@ var AlmmModule = class {
11070
11070
  });
11071
11071
  return tx;
11072
11072
  }
11073
- async collectFeeAndReward(params) {
11073
+ async collectFeeAndRewardList(paramsList) {
11074
11074
  let tx = new import_transactions12.Transaction();
11075
+ for (let index = 0; index < paramsList.length; index++) {
11076
+ const params = paramsList[index];
11077
+ tx = await this.collectFeeAndReward(params);
11078
+ }
11079
+ return tx;
11080
+ }
11081
+ async collectFeeAndReward(params, tx) {
11082
+ if (!tx) {
11083
+ tx = new import_transactions12.Transaction();
11084
+ }
11075
11085
  tx = await this.collectFees(params);
11076
11086
  if (params.rewards_token.length > 0) {
11077
11087
  tx = await this.collectReward(params, tx);
@@ -11429,7 +11439,9 @@ var AlmmModule = class {
11429
11439
  liquidity: positionLiquidity,
11430
11440
  rewards: positionRewards || { position_id: item.pos_object_id, reward: [], amount: [] },
11431
11441
  fees: positionFees,
11432
- contractPool: pool
11442
+ contractPool: pool,
11443
+ coin_type_a: pool?.coin_a || "",
11444
+ coin_type_b: pool?.coin_b || ""
11433
11445
  });
11434
11446
  }
11435
11447
  return out;