@cetusprotocol/sui-clmm-sdk 1.2.5 → 1.2.7

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.mts CHANGED
@@ -510,8 +510,6 @@ type CreatePoolAddLiquidityParams = CreatePoolParams & {
510
510
  * The upper tick index for liquidity provision.
511
511
  */
512
512
  tick_upper: number;
513
- metadata_a: SuiObjectIdType;
514
- metadata_b: SuiObjectIdType;
515
513
  };
516
514
  type FetchParams = {
517
515
  pool_id: SuiObjectIdType;
@@ -1549,7 +1547,7 @@ declare class PoolModule implements IModule<CetusClmmSDK> {
1549
1547
  */
1550
1548
  createPoolPayload(params: CreatePoolAddLiquidityParams, tx?: Transaction): Promise<Transaction>;
1551
1549
  /**
1552
- * Create pool and add liquidity row. It will call `pool_creator_v2::create_pool_v2` function.
1550
+ * Create pool and add liquidity row. It will call `pool_creator_v3::create_pool_v3` function.
1553
1551
  * This method will return the position, coin_a, coin_b. User can use these to build own transaction.
1554
1552
  * @param {CreatePoolAddLiquidityParams}params The parameters for the create and liquidity.
1555
1553
  * @returns {Promise<CreatePoolAndAddLiquidityRowResult>} A promise that resolves to the transaction payload.
@@ -1569,14 +1567,14 @@ declare class PoolModule implements IModule<CetusClmmSDK> {
1569
1567
  }): Promise<DataPage<PoolTransactionInfo>>;
1570
1568
  calculateCreatePoolWithPrice(params: CalculateCreatePoolWithPriceParams): Promise<CalculateCreatePoolResult>;
1571
1569
  /**
1572
- * Create pool and add liquidity internal. It will call `pool_creator_v2::create_pool_v2` function in cetus integrate contract.
1570
+ * Create pool and add liquidity internal. It will call `pool_creator_v3::create_pool_v3` function in cetus integrate contract.
1573
1571
  * It encapsulates the original create_pool_v2 method from the Cetus CLMM and processes the additional outputs for position and coin within a single move call.
1574
1572
  * @param {CreatePoolAddLiquidityParams}params The parameters for the create and liquidity.
1575
1573
  * @returns {Promise<Transaction>} A promise that resolves to the transaction payload.
1576
1574
  */
1577
1575
  private createPoolAndAddLiquidity;
1578
1576
  /**
1579
- * Create pool and add liquidity row. It will call `pool_creator_v2::create_pool_v2` function.
1577
+ * Create pool and add liquidity row. It will call `pool_creator::create_pool_v3` function.
1580
1578
  * This method will return the position, coin_a, coin_b. User can use these to build own transaction.
1581
1579
  * @param {CreatePoolAddLiquidityParams}params The parameters for the create and liquidity.
1582
1580
  * @returns {Promise<Transaction>} A promise that resolves to the transaction payload.
@@ -1642,6 +1640,19 @@ declare class PoolModule implements IModule<CetusClmmSDK> {
1642
1640
  */
1643
1641
  claimPartnerRefFeePayload(partner_cap: string, partner: string, coin_type: string): Promise<Transaction>;
1644
1642
  getPoolStatus(poolId: string): Promise<PoolStatus | undefined>;
1643
+ /**
1644
+ * Claim all ref fees for a specific partner in a single transaction
1645
+ * This method combines getPartnerRefFeeAmount and claimPartnerRefFeePayload
1646
+ * to create a complete transaction that claims all ref fees for a partner
1647
+ * @param {string} partner The partner object ID
1648
+ * @param {string} partner_cap The partner cap ID (required)
1649
+ * @param {string[]} specific_coin_types Optional array of specific coin types to claim (if not provided, claims all)
1650
+ * @returns {Promise<{ ref_fees: CoinAsset[], tx: Transaction }>} CoinAsset array and the complete Transaction
1651
+ */
1652
+ claimAllPartnerRefFeesPayload(partner: string, partner_cap: string, specific_coin_types?: string[]): Promise<{
1653
+ ref_fees: CoinAsset[];
1654
+ tx: Transaction;
1655
+ }>;
1645
1656
  }
1646
1657
 
1647
1658
  /**
package/dist/index.d.ts CHANGED
@@ -510,8 +510,6 @@ type CreatePoolAddLiquidityParams = CreatePoolParams & {
510
510
  * The upper tick index for liquidity provision.
511
511
  */
512
512
  tick_upper: number;
513
- metadata_a: SuiObjectIdType;
514
- metadata_b: SuiObjectIdType;
515
513
  };
516
514
  type FetchParams = {
517
515
  pool_id: SuiObjectIdType;
@@ -1549,7 +1547,7 @@ declare class PoolModule implements IModule<CetusClmmSDK> {
1549
1547
  */
1550
1548
  createPoolPayload(params: CreatePoolAddLiquidityParams, tx?: Transaction): Promise<Transaction>;
1551
1549
  /**
1552
- * Create pool and add liquidity row. It will call `pool_creator_v2::create_pool_v2` function.
1550
+ * Create pool and add liquidity row. It will call `pool_creator_v3::create_pool_v3` function.
1553
1551
  * This method will return the position, coin_a, coin_b. User can use these to build own transaction.
1554
1552
  * @param {CreatePoolAddLiquidityParams}params The parameters for the create and liquidity.
1555
1553
  * @returns {Promise<CreatePoolAndAddLiquidityRowResult>} A promise that resolves to the transaction payload.
@@ -1569,14 +1567,14 @@ declare class PoolModule implements IModule<CetusClmmSDK> {
1569
1567
  }): Promise<DataPage<PoolTransactionInfo>>;
1570
1568
  calculateCreatePoolWithPrice(params: CalculateCreatePoolWithPriceParams): Promise<CalculateCreatePoolResult>;
1571
1569
  /**
1572
- * Create pool and add liquidity internal. It will call `pool_creator_v2::create_pool_v2` function in cetus integrate contract.
1570
+ * Create pool and add liquidity internal. It will call `pool_creator_v3::create_pool_v3` function in cetus integrate contract.
1573
1571
  * It encapsulates the original create_pool_v2 method from the Cetus CLMM and processes the additional outputs for position and coin within a single move call.
1574
1572
  * @param {CreatePoolAddLiquidityParams}params The parameters for the create and liquidity.
1575
1573
  * @returns {Promise<Transaction>} A promise that resolves to the transaction payload.
1576
1574
  */
1577
1575
  private createPoolAndAddLiquidity;
1578
1576
  /**
1579
- * Create pool and add liquidity row. It will call `pool_creator_v2::create_pool_v2` function.
1577
+ * Create pool and add liquidity row. It will call `pool_creator::create_pool_v3` function.
1580
1578
  * This method will return the position, coin_a, coin_b. User can use these to build own transaction.
1581
1579
  * @param {CreatePoolAddLiquidityParams}params The parameters for the create and liquidity.
1582
1580
  * @returns {Promise<Transaction>} A promise that resolves to the transaction payload.
@@ -1642,6 +1640,19 @@ declare class PoolModule implements IModule<CetusClmmSDK> {
1642
1640
  */
1643
1641
  claimPartnerRefFeePayload(partner_cap: string, partner: string, coin_type: string): Promise<Transaction>;
1644
1642
  getPoolStatus(poolId: string): Promise<PoolStatus | undefined>;
1643
+ /**
1644
+ * Claim all ref fees for a specific partner in a single transaction
1645
+ * This method combines getPartnerRefFeeAmount and claimPartnerRefFeePayload
1646
+ * to create a complete transaction that claims all ref fees for a partner
1647
+ * @param {string} partner The partner object ID
1648
+ * @param {string} partner_cap The partner cap ID (required)
1649
+ * @param {string[]} specific_coin_types Optional array of specific coin types to claim (if not provided, claims all)
1650
+ * @returns {Promise<{ ref_fees: CoinAsset[], tx: Transaction }>} CoinAsset array and the complete Transaction
1651
+ */
1652
+ claimAllPartnerRefFeesPayload(partner: string, partner_cap: string, specific_coin_types?: string[]): Promise<{
1653
+ ref_fees: CoinAsset[];
1654
+ tx: Transaction;
1655
+ }>;
1645
1656
  }
1646
1657
 
1647
1658
  /**