@cetusprotocol/sui-clmm-sdk 1.2.0 → 1.2.2

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
@@ -2126,7 +2126,7 @@ declare function buildTickData(objects: SuiObjectResponse): TickData;
2126
2126
  declare function buildTickDataByEvent(fields: any): TickData;
2127
2127
  declare function buildClmmPositionName(pool_index: number, position_index: number): string;
2128
2128
  declare function buildPositionTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, filterIds: string[]): PositionTransactionInfo[];
2129
- declare function buildPoolTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, package_id: string, pool_id: string): PoolTransactionInfo[];
2129
+ declare function buildPoolTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, package_ids: string[], pool_id: string): PoolTransactionInfo[];
2130
2130
  declare function buildTransferCoinToSender(sdk: CetusClmmSDK, tx: Transaction, coin: TransactionObjectArgument, coinType: string): void;
2131
2131
  declare function buildTransferCoin(sdk: CetusClmmSDK, tx: Transaction, coin: TransactionObjectArgument, coinType: string, recipient?: string): void;
2132
2132
 
@@ -2314,8 +2314,10 @@ declare function estPositionAPRWithDeltaMethod(current_tick_index: number, lower
2314
2314
  declare function estPositionAPRWithMultiMethod(lower_user_price: number, upper_user_price: number, lower_hist_price: number, upper_hist_price: number): Decimal;
2315
2315
 
2316
2316
  declare const clmmMainnet: SdkOptions;
2317
+ declare const eventMainnetContractMaps: string[];
2317
2318
 
2318
2319
  declare const clmmTestnet: SdkOptions;
2320
+ declare const eventTestnetContractMaps: string[];
2319
2321
 
2320
2322
  declare enum SwapErrorCode {
2321
2323
  InvalidSqrtPriceLimitDirection = "InvalidSqrtPriceLimitDirection",
@@ -2386,4 +2388,4 @@ declare class ClmmError extends BaseError {
2386
2388
  declare const handleError: (code: ClmmErrorCode, error: Error, details?: Record<string, any>) => never;
2387
2389
  declare const handleMessageError: (code: ClmmErrorCode, message: string, details?: Record<string, any>) => never;
2388
2390
 
2389
- export { AMM_SWAP_MODULE, type AddLiquidityCommonParams, type AddLiquidityFixTokenParams, type AddLiquidityParams, type AddLiquidityWithPriceRangeParams, type AdjustResult, BPS, type BasePath, type BigNumber, type Bits, type CalculateAddLiquidityFixCoinWithPriceParams, type CalculateAddLiquidityResult, type CalculateAddLiquidityWithPriceParams, type CalculateCreatePoolResult, type CalculateCreatePoolWithPriceParams, type CalculateRatesParams, type CalculateRatesResult, CetusClmmSDK, type CetusConfigs, type ClmmConfig, ClmmError, type ClmmErrorCode, ClmmExpectSwapModule, ClmmFetcherModule, ClmmIntegratePoolModule, ClmmIntegratePoolV2Module, ClmmIntegratePoolV3Module, ClmmIntegrateRouterModule, ClmmIntegrateRouterWithPartnerModule, ClmmIntegrateUtilsModule, ClmmPartnerModule, type ClmmPoolConfig, ClmmPositionStatus, type ClmmVestInfo, type ClmmpoolData, type ClosePositionParams, type CoinConfig, type CollectFeeParams, type CollectFeesQuote, type CollectRewarderParams, ConfigErrorCode, ConfigModule, type CreatePartnerEvent, type CreatePoolAddLiquidityParams, type CreatePoolAddLiquidityWithPriceParams, type CreatePoolAndAddLiquidityRowResult, type CreatePoolCustomRangeParams, type CreatePoolParams, type CustomRangeParams, DeepbookClobV2Module, DeepbookCustodianV2Module, DeepbookEndpointsV2Module, type FetchParams, type FetchPosFeeParams, type FetchPosRewardParams, type FullRangeParams, type GetPositionInfoListParams, type GetPositionVestOption, type GlobalVestingPeriod, type LaunchpadPoolConfig, type NFT, type OpenPositionParams, type OpenPositionWithPriceParams, POOL_STRUCT, PartnerErrorCode, type PeriodDetail, type Pool, PoolErrorCode, type PoolImmutables, type PoolLiquiditySnapshot, PoolModule, type PoolStatus, type PoolTransactionInfo, type PosRewarderResult, type Position, PositionErrorCode, type PositionInfo, PositionModule, type PositionSnapshot, type PositionTransactionInfo, PositionUtils, type PositionVesting, type PreSwapLpChangeParams, type PreSwapParams, type PreSwapWithMultiPoolParams, type RedeemOption, type RemoveLiquidityParams, type Rewarder, type RewarderAmountOwned, RewarderModule, RouterErrorCode, type SdkOptions, type SplitPath, type SuiBasicTypes, type SuiInputTypes, type SuiStructTag, type SuiTxArg, SwapErrorCode, type SwapGasEstimateArg, SwapModule, type SwapParams, type SwapResult, type SwapStepResult, SwapUtils, type Tick, type TickData, type TransPreSwapWithMultiPoolParams, TypesErrorCode, UtilsErrorCode, type VestConfigs, VestErrorCode, VestModule, VestUtils, buildClmmPositionName, buildPool, buildPoolTransactionInfo, buildPosition, buildPositionInfo, buildPositionTransactionInfo, buildTickData, buildTickDataByEvent, buildTransferCoin, buildTransferCoinToSender, clmmMainnet, clmmTestnet, computeSwap, computeSwapStep, CetusClmmSDK as default, estPoolAPR, type estPosAPRResult, estPositionAPRWithDeltaMethod, estPositionAPRWithMultiMethod, findAdjustCoin, getDefaultSuiInputType, getLowerSqrtPriceFromCoinA, getLowerSqrtPriceFromCoinB, getUpperSqrtPriceFromCoinA, getUpperSqrtPriceFromCoinB, handleError, handleMessageError, newBits, poolFilterEvenTypes, poolLiquiditySnapshotType, transClmmpoolDataWithoutTicks };
2391
+ export { AMM_SWAP_MODULE, type AddLiquidityCommonParams, type AddLiquidityFixTokenParams, type AddLiquidityParams, type AddLiquidityWithPriceRangeParams, type AdjustResult, BPS, type BasePath, type BigNumber, type Bits, type CalculateAddLiquidityFixCoinWithPriceParams, type CalculateAddLiquidityResult, type CalculateAddLiquidityWithPriceParams, type CalculateCreatePoolResult, type CalculateCreatePoolWithPriceParams, type CalculateRatesParams, type CalculateRatesResult, CetusClmmSDK, type CetusConfigs, type ClmmConfig, ClmmError, type ClmmErrorCode, ClmmExpectSwapModule, ClmmFetcherModule, ClmmIntegratePoolModule, ClmmIntegratePoolV2Module, ClmmIntegratePoolV3Module, ClmmIntegrateRouterModule, ClmmIntegrateRouterWithPartnerModule, ClmmIntegrateUtilsModule, ClmmPartnerModule, type ClmmPoolConfig, ClmmPositionStatus, type ClmmVestInfo, type ClmmpoolData, type ClosePositionParams, type CoinConfig, type CollectFeeParams, type CollectFeesQuote, type CollectRewarderParams, ConfigErrorCode, ConfigModule, type CreatePartnerEvent, type CreatePoolAddLiquidityParams, type CreatePoolAddLiquidityWithPriceParams, type CreatePoolAndAddLiquidityRowResult, type CreatePoolCustomRangeParams, type CreatePoolParams, type CustomRangeParams, DeepbookClobV2Module, DeepbookCustodianV2Module, DeepbookEndpointsV2Module, type FetchParams, type FetchPosFeeParams, type FetchPosRewardParams, type FullRangeParams, type GetPositionInfoListParams, type GetPositionVestOption, type GlobalVestingPeriod, type LaunchpadPoolConfig, type NFT, type OpenPositionParams, type OpenPositionWithPriceParams, POOL_STRUCT, PartnerErrorCode, type PeriodDetail, type Pool, PoolErrorCode, type PoolImmutables, type PoolLiquiditySnapshot, PoolModule, type PoolStatus, type PoolTransactionInfo, type PosRewarderResult, type Position, PositionErrorCode, type PositionInfo, PositionModule, type PositionSnapshot, type PositionTransactionInfo, PositionUtils, type PositionVesting, type PreSwapLpChangeParams, type PreSwapParams, type PreSwapWithMultiPoolParams, type RedeemOption, type RemoveLiquidityParams, type Rewarder, type RewarderAmountOwned, RewarderModule, RouterErrorCode, type SdkOptions, type SplitPath, type SuiBasicTypes, type SuiInputTypes, type SuiStructTag, type SuiTxArg, SwapErrorCode, type SwapGasEstimateArg, SwapModule, type SwapParams, type SwapResult, type SwapStepResult, SwapUtils, type Tick, type TickData, type TransPreSwapWithMultiPoolParams, TypesErrorCode, UtilsErrorCode, type VestConfigs, VestErrorCode, VestModule, VestUtils, buildClmmPositionName, buildPool, buildPoolTransactionInfo, buildPosition, buildPositionInfo, buildPositionTransactionInfo, buildTickData, buildTickDataByEvent, buildTransferCoin, buildTransferCoinToSender, clmmMainnet, clmmTestnet, computeSwap, computeSwapStep, CetusClmmSDK as default, estPoolAPR, type estPosAPRResult, estPositionAPRWithDeltaMethod, estPositionAPRWithMultiMethod, eventMainnetContractMaps, eventTestnetContractMaps, findAdjustCoin, getDefaultSuiInputType, getLowerSqrtPriceFromCoinA, getLowerSqrtPriceFromCoinB, getUpperSqrtPriceFromCoinA, getUpperSqrtPriceFromCoinB, handleError, handleMessageError, newBits, poolFilterEvenTypes, poolLiquiditySnapshotType, transClmmpoolDataWithoutTicks };
package/dist/index.d.ts CHANGED
@@ -2126,7 +2126,7 @@ declare function buildTickData(objects: SuiObjectResponse): TickData;
2126
2126
  declare function buildTickDataByEvent(fields: any): TickData;
2127
2127
  declare function buildClmmPositionName(pool_index: number, position_index: number): string;
2128
2128
  declare function buildPositionTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, filterIds: string[]): PositionTransactionInfo[];
2129
- declare function buildPoolTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, package_id: string, pool_id: string): PoolTransactionInfo[];
2129
+ declare function buildPoolTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, package_ids: string[], pool_id: string): PoolTransactionInfo[];
2130
2130
  declare function buildTransferCoinToSender(sdk: CetusClmmSDK, tx: Transaction, coin: TransactionObjectArgument, coinType: string): void;
2131
2131
  declare function buildTransferCoin(sdk: CetusClmmSDK, tx: Transaction, coin: TransactionObjectArgument, coinType: string, recipient?: string): void;
2132
2132
 
@@ -2314,8 +2314,10 @@ declare function estPositionAPRWithDeltaMethod(current_tick_index: number, lower
2314
2314
  declare function estPositionAPRWithMultiMethod(lower_user_price: number, upper_user_price: number, lower_hist_price: number, upper_hist_price: number): Decimal;
2315
2315
 
2316
2316
  declare const clmmMainnet: SdkOptions;
2317
+ declare const eventMainnetContractMaps: string[];
2317
2318
 
2318
2319
  declare const clmmTestnet: SdkOptions;
2320
+ declare const eventTestnetContractMaps: string[];
2319
2321
 
2320
2322
  declare enum SwapErrorCode {
2321
2323
  InvalidSqrtPriceLimitDirection = "InvalidSqrtPriceLimitDirection",
@@ -2386,4 +2388,4 @@ declare class ClmmError extends BaseError {
2386
2388
  declare const handleError: (code: ClmmErrorCode, error: Error, details?: Record<string, any>) => never;
2387
2389
  declare const handleMessageError: (code: ClmmErrorCode, message: string, details?: Record<string, any>) => never;
2388
2390
 
2389
- export { AMM_SWAP_MODULE, type AddLiquidityCommonParams, type AddLiquidityFixTokenParams, type AddLiquidityParams, type AddLiquidityWithPriceRangeParams, type AdjustResult, BPS, type BasePath, type BigNumber, type Bits, type CalculateAddLiquidityFixCoinWithPriceParams, type CalculateAddLiquidityResult, type CalculateAddLiquidityWithPriceParams, type CalculateCreatePoolResult, type CalculateCreatePoolWithPriceParams, type CalculateRatesParams, type CalculateRatesResult, CetusClmmSDK, type CetusConfigs, type ClmmConfig, ClmmError, type ClmmErrorCode, ClmmExpectSwapModule, ClmmFetcherModule, ClmmIntegratePoolModule, ClmmIntegratePoolV2Module, ClmmIntegratePoolV3Module, ClmmIntegrateRouterModule, ClmmIntegrateRouterWithPartnerModule, ClmmIntegrateUtilsModule, ClmmPartnerModule, type ClmmPoolConfig, ClmmPositionStatus, type ClmmVestInfo, type ClmmpoolData, type ClosePositionParams, type CoinConfig, type CollectFeeParams, type CollectFeesQuote, type CollectRewarderParams, ConfigErrorCode, ConfigModule, type CreatePartnerEvent, type CreatePoolAddLiquidityParams, type CreatePoolAddLiquidityWithPriceParams, type CreatePoolAndAddLiquidityRowResult, type CreatePoolCustomRangeParams, type CreatePoolParams, type CustomRangeParams, DeepbookClobV2Module, DeepbookCustodianV2Module, DeepbookEndpointsV2Module, type FetchParams, type FetchPosFeeParams, type FetchPosRewardParams, type FullRangeParams, type GetPositionInfoListParams, type GetPositionVestOption, type GlobalVestingPeriod, type LaunchpadPoolConfig, type NFT, type OpenPositionParams, type OpenPositionWithPriceParams, POOL_STRUCT, PartnerErrorCode, type PeriodDetail, type Pool, PoolErrorCode, type PoolImmutables, type PoolLiquiditySnapshot, PoolModule, type PoolStatus, type PoolTransactionInfo, type PosRewarderResult, type Position, PositionErrorCode, type PositionInfo, PositionModule, type PositionSnapshot, type PositionTransactionInfo, PositionUtils, type PositionVesting, type PreSwapLpChangeParams, type PreSwapParams, type PreSwapWithMultiPoolParams, type RedeemOption, type RemoveLiquidityParams, type Rewarder, type RewarderAmountOwned, RewarderModule, RouterErrorCode, type SdkOptions, type SplitPath, type SuiBasicTypes, type SuiInputTypes, type SuiStructTag, type SuiTxArg, SwapErrorCode, type SwapGasEstimateArg, SwapModule, type SwapParams, type SwapResult, type SwapStepResult, SwapUtils, type Tick, type TickData, type TransPreSwapWithMultiPoolParams, TypesErrorCode, UtilsErrorCode, type VestConfigs, VestErrorCode, VestModule, VestUtils, buildClmmPositionName, buildPool, buildPoolTransactionInfo, buildPosition, buildPositionInfo, buildPositionTransactionInfo, buildTickData, buildTickDataByEvent, buildTransferCoin, buildTransferCoinToSender, clmmMainnet, clmmTestnet, computeSwap, computeSwapStep, CetusClmmSDK as default, estPoolAPR, type estPosAPRResult, estPositionAPRWithDeltaMethod, estPositionAPRWithMultiMethod, findAdjustCoin, getDefaultSuiInputType, getLowerSqrtPriceFromCoinA, getLowerSqrtPriceFromCoinB, getUpperSqrtPriceFromCoinA, getUpperSqrtPriceFromCoinB, handleError, handleMessageError, newBits, poolFilterEvenTypes, poolLiquiditySnapshotType, transClmmpoolDataWithoutTicks };
2391
+ export { AMM_SWAP_MODULE, type AddLiquidityCommonParams, type AddLiquidityFixTokenParams, type AddLiquidityParams, type AddLiquidityWithPriceRangeParams, type AdjustResult, BPS, type BasePath, type BigNumber, type Bits, type CalculateAddLiquidityFixCoinWithPriceParams, type CalculateAddLiquidityResult, type CalculateAddLiquidityWithPriceParams, type CalculateCreatePoolResult, type CalculateCreatePoolWithPriceParams, type CalculateRatesParams, type CalculateRatesResult, CetusClmmSDK, type CetusConfigs, type ClmmConfig, ClmmError, type ClmmErrorCode, ClmmExpectSwapModule, ClmmFetcherModule, ClmmIntegratePoolModule, ClmmIntegratePoolV2Module, ClmmIntegratePoolV3Module, ClmmIntegrateRouterModule, ClmmIntegrateRouterWithPartnerModule, ClmmIntegrateUtilsModule, ClmmPartnerModule, type ClmmPoolConfig, ClmmPositionStatus, type ClmmVestInfo, type ClmmpoolData, type ClosePositionParams, type CoinConfig, type CollectFeeParams, type CollectFeesQuote, type CollectRewarderParams, ConfigErrorCode, ConfigModule, type CreatePartnerEvent, type CreatePoolAddLiquidityParams, type CreatePoolAddLiquidityWithPriceParams, type CreatePoolAndAddLiquidityRowResult, type CreatePoolCustomRangeParams, type CreatePoolParams, type CustomRangeParams, DeepbookClobV2Module, DeepbookCustodianV2Module, DeepbookEndpointsV2Module, type FetchParams, type FetchPosFeeParams, type FetchPosRewardParams, type FullRangeParams, type GetPositionInfoListParams, type GetPositionVestOption, type GlobalVestingPeriod, type LaunchpadPoolConfig, type NFT, type OpenPositionParams, type OpenPositionWithPriceParams, POOL_STRUCT, PartnerErrorCode, type PeriodDetail, type Pool, PoolErrorCode, type PoolImmutables, type PoolLiquiditySnapshot, PoolModule, type PoolStatus, type PoolTransactionInfo, type PosRewarderResult, type Position, PositionErrorCode, type PositionInfo, PositionModule, type PositionSnapshot, type PositionTransactionInfo, PositionUtils, type PositionVesting, type PreSwapLpChangeParams, type PreSwapParams, type PreSwapWithMultiPoolParams, type RedeemOption, type RemoveLiquidityParams, type Rewarder, type RewarderAmountOwned, RewarderModule, RouterErrorCode, type SdkOptions, type SplitPath, type SuiBasicTypes, type SuiInputTypes, type SuiStructTag, type SuiTxArg, SwapErrorCode, type SwapGasEstimateArg, SwapModule, type SwapParams, type SwapResult, type SwapStepResult, SwapUtils, type Tick, type TickData, type TransPreSwapWithMultiPoolParams, TypesErrorCode, UtilsErrorCode, type VestConfigs, VestErrorCode, VestModule, VestUtils, buildClmmPositionName, buildPool, buildPoolTransactionInfo, buildPosition, buildPositionInfo, buildPositionTransactionInfo, buildTickData, buildTickDataByEvent, buildTransferCoin, buildTransferCoinToSender, clmmMainnet, clmmTestnet, computeSwap, computeSwapStep, CetusClmmSDK as default, estPoolAPR, type estPosAPRResult, estPositionAPRWithDeltaMethod, estPositionAPRWithMultiMethod, eventMainnetContractMaps, eventTestnetContractMaps, findAdjustCoin, getDefaultSuiInputType, getLowerSqrtPriceFromCoinA, getLowerSqrtPriceFromCoinB, getUpperSqrtPriceFromCoinA, getUpperSqrtPriceFromCoinB, handleError, handleMessageError, newBits, poolFilterEvenTypes, poolLiquiditySnapshotType, transClmmpoolDataWithoutTicks };