@alephium/powfi-sdk 0.0.1-rc.31 → 0.0.1-rc.32

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/lib/index.d.mts CHANGED
@@ -192,8 +192,9 @@ declare class CpmmModule extends ModuleBase {
192
192
  /** Fetches pool state then computes the token amounts claimable for a given liquidity position. */
193
193
  computeClaimableAmounts(tokenAId: string, tokenBId: string, liquidityBalance: bigint): Promise<CpmmClaimableAmounts>;
194
194
  /** Creates a new CPMM pool on-chain, optionally seeded with initial liquidity. */
195
- createPool(params: CpmmCreatePoolRequest): Promise<ExecuteScriptResult & {
195
+ createPool(params: CpmmCreatePoolRequest): Promise<{
196
196
  poolId: string;
197
+ result: ExecuteScriptResult;
197
198
  }>;
198
199
  getCollectProtocolFeesData(tokenAId: string, tokenBId: string): string;
199
200
  collectProtocolFees(params: CpmmCollectProtocolFeesRequest): Promise<ExecuteScriptResult>;
@@ -4789,8 +4790,8 @@ declare class ClmmModule extends ModuleBase {
4789
4790
  * Tokens and ticks are sorted internally to match on-chain ordering.
4790
4791
  */
4791
4792
  createPool(configIndex: bigint, token0: string, token1: string, rewardToken: string, tick: bigint, amount0: bigint, amount1: bigint, tickLower: bigint, tickUpper: bigint, dustAmount?: bigint): Promise<{
4792
- poolAddress: string;
4793
- result: SignExecuteScriptTxResult;
4793
+ poolId: string;
4794
+ result: ExecuteScriptResult;
4794
4795
  }>;
4795
4796
  /** Adds liquidity to a tick range, minting a new position or updating an existing one. */
4796
4797
  addLiquidity(p: ClmmAddLiquidityRequest): Promise<{
package/lib/index.d.ts CHANGED
@@ -192,8 +192,9 @@ declare class CpmmModule extends ModuleBase {
192
192
  /** Fetches pool state then computes the token amounts claimable for a given liquidity position. */
193
193
  computeClaimableAmounts(tokenAId: string, tokenBId: string, liquidityBalance: bigint): Promise<CpmmClaimableAmounts>;
194
194
  /** Creates a new CPMM pool on-chain, optionally seeded with initial liquidity. */
195
- createPool(params: CpmmCreatePoolRequest): Promise<ExecuteScriptResult & {
195
+ createPool(params: CpmmCreatePoolRequest): Promise<{
196
196
  poolId: string;
197
+ result: ExecuteScriptResult;
197
198
  }>;
198
199
  getCollectProtocolFeesData(tokenAId: string, tokenBId: string): string;
199
200
  collectProtocolFees(params: CpmmCollectProtocolFeesRequest): Promise<ExecuteScriptResult>;
@@ -4789,8 +4790,8 @@ declare class ClmmModule extends ModuleBase {
4789
4790
  * Tokens and ticks are sorted internally to match on-chain ordering.
4790
4791
  */
4791
4792
  createPool(configIndex: bigint, token0: string, token1: string, rewardToken: string, tick: bigint, amount0: bigint, amount1: bigint, tickLower: bigint, tickUpper: bigint, dustAmount?: bigint): Promise<{
4792
- poolAddress: string;
4793
- result: SignExecuteScriptTxResult;
4793
+ poolId: string;
4794
+ result: ExecuteScriptResult;
4794
4795
  }>;
4795
4796
  /** Adds liquidity to a tick range, minting a new position or updating an existing one. */
4796
4797
  addLiquidity(p: ClmmAddLiquidityRequest): Promise<{
package/lib/index.js CHANGED
@@ -4745,7 +4745,7 @@ var CpmmModule = class _CpmmModule extends ModuleBase {
4745
4745
  { id: token1Id, amount: amount1 }
4746
4746
  ]
4747
4747
  });
4748
- return { ...result2, poolId };
4748
+ return { result: result2, poolId };
4749
4749
  }
4750
4750
  const result = await CreatePair.execute({
4751
4751
  signer: this.scope.signer,
@@ -4762,7 +4762,7 @@ var CpmmModule = class _CpmmModule extends ModuleBase {
4762
4762
  { id: tokenBId, amount: 1n }
4763
4763
  ]
4764
4764
  });
4765
- return { ...result, poolId };
4765
+ return { result, poolId };
4766
4766
  }
4767
4767
  getCollectProtocolFeesData(tokenAId, tokenBId) {
4768
4768
  const [token0Id, token1Id] = sortTokens(tokenAId, tokenBId);
@@ -14858,8 +14858,8 @@ var ClmmModule = class extends ModuleBase {
14858
14858
  ],
14859
14859
  dustAmount: dustAmount ?? import_web333.MINIMAL_CONTRACT_DEPOSIT * 2n
14860
14860
  });
14861
- const poolAddress = this.getPoolAddress(tokens[0], tokens[1], configIndex);
14862
- return { poolAddress, result };
14861
+ const poolId = this.getPoolId(tokens[0], tokens[1], configIndex);
14862
+ return { poolId, result };
14863
14863
  }
14864
14864
  /** Adds liquidity to a tick range, minting a new position or updating an existing one. */
14865
14865
  async addLiquidity(p) {