@magmaprotocol/magma-clmm-sdk 0.5.110 → 0.5.111

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.mjs CHANGED
@@ -10539,8 +10539,7 @@ var AlmmModule = class {
10539
10539
  tx.object(global_config_id),
10540
10540
  tx.pure.u64(params.base_fee),
10541
10541
  tx.pure.u16(params.bin_step),
10542
- tx.pure.u32(storage_id),
10543
- tx.object(CLOCK_ADDRESS)
10542
+ tx.pure.u32(storage_id)
10544
10543
  ];
10545
10544
  tx.moveCall({
10546
10545
  target: `${integrate.published_at}::${AlmmScript}::create_pair`,
@@ -10818,20 +10817,13 @@ var AlmmModule = class {
10818
10817
  async burnPosition(params) {
10819
10818
  const tx = new Transaction12();
10820
10819
  tx.setSender(this.sdk.senderAddress);
10821
- const { integrate, clmm_pool, almm_pool } = this.sdk.sdkOptions;
10820
+ const { integrate, clmm_pool } = this.sdk.sdkOptions;
10822
10821
  const clmmConfigs = getPackagerConfigs(clmm_pool);
10823
- const almmConfig = getPackagerConfigs(almm_pool);
10824
10822
  const typeArguments = [params.coin_a, params.coin_b, ...params.rewards_token];
10825
- let args = [tx.object(almmConfig.factory), tx.object(params.pool_id), tx.object(params.position_id), tx.object(CLOCK_ADDRESS)];
10823
+ let args = [tx.object(params.pool_id), tx.object(params.position_id), tx.object(CLOCK_ADDRESS)];
10826
10824
  let target = `${integrate.published_at}::${AlmmScript}::burn_position`;
10827
10825
  if (params.rewards_token.length > 0) {
10828
- args = [
10829
- tx.object(almmConfig.factory),
10830
- tx.object(params.pool_id),
10831
- tx.object(clmmConfigs.global_vault_id),
10832
- tx.object(params.position_id),
10833
- tx.object(CLOCK_ADDRESS)
10834
- ];
10826
+ args = [tx.object(params.pool_id), tx.object(clmmConfigs.global_vault_id), tx.object(params.position_id), tx.object(CLOCK_ADDRESS)];
10835
10827
  target = `${integrate.published_at}::${AlmmScript}::burn_position_reward${params.rewards_token.length}`;
10836
10828
  }
10837
10829
  tx.moveCall({
@@ -10844,21 +10836,13 @@ var AlmmModule = class {
10844
10836
  async shrinkPosition(params) {
10845
10837
  const tx = new Transaction12();
10846
10838
  tx.setSender(this.sdk.senderAddress);
10847
- const { integrate, clmm_pool, almm_pool } = this.sdk.sdkOptions;
10839
+ const { integrate, clmm_pool } = this.sdk.sdkOptions;
10848
10840
  const clmmConfigs = getPackagerConfigs(clmm_pool);
10849
- const almmConfig = getPackagerConfigs(almm_pool);
10850
10841
  const typeArguments = [params.coin_a, params.coin_b, ...params.rewards_token];
10851
- let args = [
10852
- tx.object(almmConfig.factory),
10853
- tx.object(params.pool_id),
10854
- tx.object(params.position_id),
10855
- tx.pure.u64(params.delta_percentage),
10856
- tx.object(CLOCK_ADDRESS)
10857
- ];
10842
+ let args = [tx.object(params.pool_id), tx.object(params.position_id), tx.pure.u64(params.delta_percentage), tx.object(CLOCK_ADDRESS)];
10858
10843
  let target = `${integrate.published_at}::${AlmmScript}::shrink_position`;
10859
10844
  if (params.rewards_token.length > 0) {
10860
10845
  args = [
10861
- tx.object(almmConfig.factory),
10862
10846
  tx.object(params.pool_id),
10863
10847
  tx.object(clmmConfigs.global_vault_id),
10864
10848
  tx.object(params.position_id),
@@ -10895,12 +10879,10 @@ var AlmmModule = class {
10895
10879
  async collectReward(params, transaction) {
10896
10880
  const tx = transaction || new Transaction12();
10897
10881
  tx.setSender(this.sdk.senderAddress);
10898
- const { integrate, clmm_pool, almm_pool } = this.sdk.sdkOptions;
10882
+ const { integrate, clmm_pool } = this.sdk.sdkOptions;
10899
10883
  const clmmConfigs = getPackagerConfigs(clmm_pool);
10900
- const almmConfig = getPackagerConfigs(almm_pool);
10901
10884
  const typeArguments = [params.coin_a, params.coin_b, ...params.rewards_token];
10902
10885
  const args = [
10903
- tx.object(almmConfig.factory),
10904
10886
  tx.object(params.pool_id),
10905
10887
  tx.object(clmmConfigs.global_vault_id),
10906
10888
  tx.object(params.position_id),
@@ -10920,10 +10902,9 @@ var AlmmModule = class {
10920
10902
  async collectFees(params, transaction) {
10921
10903
  const tx = transaction || new Transaction12();
10922
10904
  tx.setSender(this.sdk.senderAddress);
10923
- const { integrate, almm_pool } = this.sdk.sdkOptions;
10924
- const almmConfig = getPackagerConfigs(almm_pool);
10905
+ const { integrate } = this.sdk.sdkOptions;
10925
10906
  const typeArguments = [params.coin_a, params.coin_b];
10926
- const args = [tx.object(almmConfig.factory), tx.object(params.pool_id), tx.object(params.position_id), tx.object(CLOCK_ADDRESS)];
10907
+ const args = [tx.object(params.pool_id), tx.object(params.position_id), tx.object(CLOCK_ADDRESS)];
10927
10908
  const target = `${integrate.published_at}::${AlmmScript}::collect_fees`;
10928
10909
  tx.moveCall({
10929
10910
  target,
@@ -10973,9 +10954,8 @@ var AlmmModule = class {
10973
10954
  async swap(params) {
10974
10955
  const tx = new Transaction12();
10975
10956
  tx.setSender(this.sdk.senderAddress);
10976
- const { clmm_pool, almm_pool, integrate } = this.sdk.sdkOptions;
10957
+ const { clmm_pool, integrate } = this.sdk.sdkOptions;
10977
10958
  const { global_config_id } = getPackagerConfigs(clmm_pool);
10978
- const almmConfig = getPackagerConfigs(almm_pool);
10979
10959
  const typeArguments = [params.coinTypeA, params.coinTypeB];
10980
10960
  const allCoinAsset = await this._sdk.getOwnerCoinAssets(this._sdk.senderAddress);
10981
10961
  const primaryCoinInputA = TransactionUtil.buildCoinForAmount(
@@ -10995,7 +10975,6 @@ var AlmmModule = class {
10995
10975
  true
10996
10976
  );
10997
10977
  const args = [
10998
- tx.object(almmConfig.factory),
10999
10978
  tx.object(params.pair),
11000
10979
  tx.object(global_config_id),
11001
10980
  primaryCoinInputA.targetCoin,
@@ -11124,7 +11103,7 @@ var AlmmModule = class {
11124
11103
  const cacheKey = `${position.pos_object_id}_getPositionList`;
11125
11104
  this.updateCache(cacheKey, position, cacheTime24h);
11126
11105
  if (hasAssignPoolIds) {
11127
- if (assignPoolIds.includes(position.pos_object_id)) {
11106
+ if (assignPoolIds.includes(position.pool)) {
11128
11107
  allPosition.push(position);
11129
11108
  }
11130
11109
  } else {