@cetusprotocol/dlmm-sdk 0.1.0 → 0.1.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 +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -405,6 +405,16 @@ type WeightsInfo = {
|
|
|
405
405
|
active_weight_a: Decimal;
|
|
406
406
|
active_weight_b: Decimal;
|
|
407
407
|
} & WeightsOptions;
|
|
408
|
+
type GetBinInfoOption = {
|
|
409
|
+
bin_manager_handle: string;
|
|
410
|
+
bin_id: number;
|
|
411
|
+
bin_step: number;
|
|
412
|
+
};
|
|
413
|
+
type GetBinInfoResult = {
|
|
414
|
+
bin_manager_handle: string;
|
|
415
|
+
bin_id: number;
|
|
416
|
+
bin_step: number;
|
|
417
|
+
} & BinAmount;
|
|
408
418
|
|
|
409
419
|
declare class PoolModule implements IModule<CetusDlmmSDK> {
|
|
410
420
|
protected _sdk: CetusDlmmSDK;
|
|
@@ -432,6 +442,7 @@ declare class PoolModule implements IModule<CetusDlmmSDK> {
|
|
|
432
442
|
* @returns The bin info
|
|
433
443
|
*/
|
|
434
444
|
getBinInfo(bin_manager_handle: string, bin_id: number, bin_step: number, force_refresh?: boolean): Promise<BinAmount>;
|
|
445
|
+
getBinInfoList(options: GetBinInfoOption[]): Promise<GetBinInfoResult[]>;
|
|
435
446
|
getTotalFeeRate(option: GetTotalFeeRateOption): Promise<FeeRate>;
|
|
436
447
|
getPoolBinInfo(option: GetPoolBinInfoOption): Promise<BinAmount[]>;
|
|
437
448
|
getPoolTransactionList({ pool_id, pagination_args, order, full_rpc_url, }: {
|
|
@@ -1047,9 +1058,21 @@ type TokenTable = {
|
|
|
1047
1058
|
usdc_in_pool: string;
|
|
1048
1059
|
};
|
|
1049
1060
|
type IlmInputResult = {
|
|
1050
|
-
price_curve:
|
|
1051
|
-
|
|
1052
|
-
|
|
1061
|
+
price_curve: {
|
|
1062
|
+
data: Axis[];
|
|
1063
|
+
min_y: string;
|
|
1064
|
+
max_y: string;
|
|
1065
|
+
};
|
|
1066
|
+
liquidity_curve: {
|
|
1067
|
+
data: Axis[];
|
|
1068
|
+
min_y: string;
|
|
1069
|
+
max_y: string;
|
|
1070
|
+
};
|
|
1071
|
+
dlmm_bins: {
|
|
1072
|
+
data: Axis[];
|
|
1073
|
+
min_y: string;
|
|
1074
|
+
max_y: string;
|
|
1075
|
+
};
|
|
1053
1076
|
tokens_table: TokenTable[];
|
|
1054
1077
|
price_table: TokenTable[];
|
|
1055
1078
|
initial_fdv: string;
|
|
@@ -1078,4 +1101,4 @@ declare const dlmmMainnet: SdkOptions;
|
|
|
1078
1101
|
|
|
1079
1102
|
declare const dlmmTestnet: SdkOptions;
|
|
1080
1103
|
|
|
1081
|
-
export { type AddLiquidityOption, type AddRewardOption, type Axis, BASIS_POINT, BASIS_POINT_MAX, BIN_BOUND, type BaseAddLiquidityOption, type BaseCalculateAddLiquidityOption, type BaseCreatePoolAndAddOption, type BaseCreatePoolOption, type BinAmount, type BinLiquidityInfo, type BinManager, type BinStepConfig, type BinSwap, BinUtils, type BinWeight, type CalculateAddLiquidityAutoFillOption, type CalculateAddLiquidityOption, type CalculateRemoveLiquidityBothOption, type CalculateRemoveLiquidityOnlyOption, CetusDlmmSDK, type ClaimRefFeeOption, type ClosePositionOption, type CollectFeeOption, type CollectRewardAndFeeOption, type CollectRewardOption, type CreatePartnerOption, type CreatePoolAndAddOption, type CreatePoolAndAddWithPriceOption, type CreatePoolOption, DEFAULT_MAX_WEIGHT, DEFAULT_MIN_WEIGHT, type DlmmBasePool, type DlmmConfigs, type DlmmGlobalConfig, type DlmmPool, type DlmmPosition, FEE_PRECISION, type FeeRate, FeeUtils, type GetPoolBinInfoOption, type GetTotalFeeRateOption, type IlmInputOptions, type IlmInputResult, IlmUtils, type InitRewardOption, MAX_BIN_ID, MAX_BIN_PER_POSITION, MAX_FEE_RATE, MIN_BIN_ID, ONE, type OpenAndAddLiquidityOption, type OpenAndAddLiquidityWithPriceOption, type OpenPositionOption, type Partner, PoolModule, type PoolPermissions, type PoolTransactionInfo, type PositionFee, type PositionManager, type PositionReward, type PreSwapOption, type PreSwapQuote, REWARD_PERIOD, REWARD_PERIOD_START_AT, type RemoveLiquidityOption, type Reward, type RewardAccessOption, type RewardInfo, type RewardManager, type RewardPeriodEmission, type RewardPeriodEmissionFormat, type RewardWhiteListOption, SCALE_OFFSET, type SdkOptions, StrategyType, StrategyUtils, type SwapOption, type TokenTable, type UpdatePositionFeeAndRewardsOption, type UpdateRefFeeRateOption, type UpdateTimeRangeOption, type ValidateActiveIdSlippageOption, type VariableParameters, WeightUtils, type WeightsInfo, type WeightsOptions, buildPoolKey, CetusDlmmSDK as default, dlmmMainnet, dlmmTestnet, generateRewardSchedule, getRouterModule, parseBinInfo, parseBinInfoList, parseCurrentRewardPeriodEmission, parseDlmmBasePool, parseDlmmPool, parseDlmmPosition, parseLiquidityShares, parsePartner, parsePoolTransactionInfo, parseRewardPeriodEmission, parseStrategyType, parsedDlmmPosFeeData, parsedDlmmPosRewardData, parsedSwapQuoteData, poolFilterEvenTypes, safeAmount, safeMulAmount };
|
|
1104
|
+
export { type AddLiquidityOption, type AddRewardOption, type Axis, BASIS_POINT, BASIS_POINT_MAX, BIN_BOUND, type BaseAddLiquidityOption, type BaseCalculateAddLiquidityOption, type BaseCreatePoolAndAddOption, type BaseCreatePoolOption, type BinAmount, type BinLiquidityInfo, type BinManager, type BinStepConfig, type BinSwap, BinUtils, type BinWeight, type CalculateAddLiquidityAutoFillOption, type CalculateAddLiquidityOption, type CalculateRemoveLiquidityBothOption, type CalculateRemoveLiquidityOnlyOption, CetusDlmmSDK, type ClaimRefFeeOption, type ClosePositionOption, type CollectFeeOption, type CollectRewardAndFeeOption, type CollectRewardOption, type CreatePartnerOption, type CreatePoolAndAddOption, type CreatePoolAndAddWithPriceOption, type CreatePoolOption, DEFAULT_MAX_WEIGHT, DEFAULT_MIN_WEIGHT, type DlmmBasePool, type DlmmConfigs, type DlmmGlobalConfig, type DlmmPool, type DlmmPosition, FEE_PRECISION, type FeeRate, FeeUtils, type GetBinInfoOption, type GetBinInfoResult, type GetPoolBinInfoOption, type GetTotalFeeRateOption, type IlmInputOptions, type IlmInputResult, IlmUtils, type InitRewardOption, MAX_BIN_ID, MAX_BIN_PER_POSITION, MAX_FEE_RATE, MIN_BIN_ID, ONE, type OpenAndAddLiquidityOption, type OpenAndAddLiquidityWithPriceOption, type OpenPositionOption, type Partner, PoolModule, type PoolPermissions, type PoolTransactionInfo, type PositionFee, type PositionManager, type PositionReward, type PreSwapOption, type PreSwapQuote, REWARD_PERIOD, REWARD_PERIOD_START_AT, type RemoveLiquidityOption, type Reward, type RewardAccessOption, type RewardInfo, type RewardManager, type RewardPeriodEmission, type RewardPeriodEmissionFormat, type RewardWhiteListOption, SCALE_OFFSET, type SdkOptions, StrategyType, StrategyUtils, type SwapOption, type TokenTable, type UpdatePositionFeeAndRewardsOption, type UpdateRefFeeRateOption, type UpdateTimeRangeOption, type ValidateActiveIdSlippageOption, type VariableParameters, WeightUtils, type WeightsInfo, type WeightsOptions, buildPoolKey, CetusDlmmSDK as default, dlmmMainnet, dlmmTestnet, generateRewardSchedule, getRouterModule, parseBinInfo, parseBinInfoList, parseCurrentRewardPeriodEmission, parseDlmmBasePool, parseDlmmPool, parseDlmmPosition, parseLiquidityShares, parsePartner, parsePoolTransactionInfo, parseRewardPeriodEmission, parseStrategyType, parsedDlmmPosFeeData, parsedDlmmPosRewardData, parsedSwapQuoteData, poolFilterEvenTypes, safeAmount, safeMulAmount };
|
package/dist/index.d.ts
CHANGED
|
@@ -405,6 +405,16 @@ type WeightsInfo = {
|
|
|
405
405
|
active_weight_a: Decimal;
|
|
406
406
|
active_weight_b: Decimal;
|
|
407
407
|
} & WeightsOptions;
|
|
408
|
+
type GetBinInfoOption = {
|
|
409
|
+
bin_manager_handle: string;
|
|
410
|
+
bin_id: number;
|
|
411
|
+
bin_step: number;
|
|
412
|
+
};
|
|
413
|
+
type GetBinInfoResult = {
|
|
414
|
+
bin_manager_handle: string;
|
|
415
|
+
bin_id: number;
|
|
416
|
+
bin_step: number;
|
|
417
|
+
} & BinAmount;
|
|
408
418
|
|
|
409
419
|
declare class PoolModule implements IModule<CetusDlmmSDK> {
|
|
410
420
|
protected _sdk: CetusDlmmSDK;
|
|
@@ -432,6 +442,7 @@ declare class PoolModule implements IModule<CetusDlmmSDK> {
|
|
|
432
442
|
* @returns The bin info
|
|
433
443
|
*/
|
|
434
444
|
getBinInfo(bin_manager_handle: string, bin_id: number, bin_step: number, force_refresh?: boolean): Promise<BinAmount>;
|
|
445
|
+
getBinInfoList(options: GetBinInfoOption[]): Promise<GetBinInfoResult[]>;
|
|
435
446
|
getTotalFeeRate(option: GetTotalFeeRateOption): Promise<FeeRate>;
|
|
436
447
|
getPoolBinInfo(option: GetPoolBinInfoOption): Promise<BinAmount[]>;
|
|
437
448
|
getPoolTransactionList({ pool_id, pagination_args, order, full_rpc_url, }: {
|
|
@@ -1047,9 +1058,21 @@ type TokenTable = {
|
|
|
1047
1058
|
usdc_in_pool: string;
|
|
1048
1059
|
};
|
|
1049
1060
|
type IlmInputResult = {
|
|
1050
|
-
price_curve:
|
|
1051
|
-
|
|
1052
|
-
|
|
1061
|
+
price_curve: {
|
|
1062
|
+
data: Axis[];
|
|
1063
|
+
min_y: string;
|
|
1064
|
+
max_y: string;
|
|
1065
|
+
};
|
|
1066
|
+
liquidity_curve: {
|
|
1067
|
+
data: Axis[];
|
|
1068
|
+
min_y: string;
|
|
1069
|
+
max_y: string;
|
|
1070
|
+
};
|
|
1071
|
+
dlmm_bins: {
|
|
1072
|
+
data: Axis[];
|
|
1073
|
+
min_y: string;
|
|
1074
|
+
max_y: string;
|
|
1075
|
+
};
|
|
1053
1076
|
tokens_table: TokenTable[];
|
|
1054
1077
|
price_table: TokenTable[];
|
|
1055
1078
|
initial_fdv: string;
|
|
@@ -1078,4 +1101,4 @@ declare const dlmmMainnet: SdkOptions;
|
|
|
1078
1101
|
|
|
1079
1102
|
declare const dlmmTestnet: SdkOptions;
|
|
1080
1103
|
|
|
1081
|
-
export { type AddLiquidityOption, type AddRewardOption, type Axis, BASIS_POINT, BASIS_POINT_MAX, BIN_BOUND, type BaseAddLiquidityOption, type BaseCalculateAddLiquidityOption, type BaseCreatePoolAndAddOption, type BaseCreatePoolOption, type BinAmount, type BinLiquidityInfo, type BinManager, type BinStepConfig, type BinSwap, BinUtils, type BinWeight, type CalculateAddLiquidityAutoFillOption, type CalculateAddLiquidityOption, type CalculateRemoveLiquidityBothOption, type CalculateRemoveLiquidityOnlyOption, CetusDlmmSDK, type ClaimRefFeeOption, type ClosePositionOption, type CollectFeeOption, type CollectRewardAndFeeOption, type CollectRewardOption, type CreatePartnerOption, type CreatePoolAndAddOption, type CreatePoolAndAddWithPriceOption, type CreatePoolOption, DEFAULT_MAX_WEIGHT, DEFAULT_MIN_WEIGHT, type DlmmBasePool, type DlmmConfigs, type DlmmGlobalConfig, type DlmmPool, type DlmmPosition, FEE_PRECISION, type FeeRate, FeeUtils, type GetPoolBinInfoOption, type GetTotalFeeRateOption, type IlmInputOptions, type IlmInputResult, IlmUtils, type InitRewardOption, MAX_BIN_ID, MAX_BIN_PER_POSITION, MAX_FEE_RATE, MIN_BIN_ID, ONE, type OpenAndAddLiquidityOption, type OpenAndAddLiquidityWithPriceOption, type OpenPositionOption, type Partner, PoolModule, type PoolPermissions, type PoolTransactionInfo, type PositionFee, type PositionManager, type PositionReward, type PreSwapOption, type PreSwapQuote, REWARD_PERIOD, REWARD_PERIOD_START_AT, type RemoveLiquidityOption, type Reward, type RewardAccessOption, type RewardInfo, type RewardManager, type RewardPeriodEmission, type RewardPeriodEmissionFormat, type RewardWhiteListOption, SCALE_OFFSET, type SdkOptions, StrategyType, StrategyUtils, type SwapOption, type TokenTable, type UpdatePositionFeeAndRewardsOption, type UpdateRefFeeRateOption, type UpdateTimeRangeOption, type ValidateActiveIdSlippageOption, type VariableParameters, WeightUtils, type WeightsInfo, type WeightsOptions, buildPoolKey, CetusDlmmSDK as default, dlmmMainnet, dlmmTestnet, generateRewardSchedule, getRouterModule, parseBinInfo, parseBinInfoList, parseCurrentRewardPeriodEmission, parseDlmmBasePool, parseDlmmPool, parseDlmmPosition, parseLiquidityShares, parsePartner, parsePoolTransactionInfo, parseRewardPeriodEmission, parseStrategyType, parsedDlmmPosFeeData, parsedDlmmPosRewardData, parsedSwapQuoteData, poolFilterEvenTypes, safeAmount, safeMulAmount };
|
|
1104
|
+
export { type AddLiquidityOption, type AddRewardOption, type Axis, BASIS_POINT, BASIS_POINT_MAX, BIN_BOUND, type BaseAddLiquidityOption, type BaseCalculateAddLiquidityOption, type BaseCreatePoolAndAddOption, type BaseCreatePoolOption, type BinAmount, type BinLiquidityInfo, type BinManager, type BinStepConfig, type BinSwap, BinUtils, type BinWeight, type CalculateAddLiquidityAutoFillOption, type CalculateAddLiquidityOption, type CalculateRemoveLiquidityBothOption, type CalculateRemoveLiquidityOnlyOption, CetusDlmmSDK, type ClaimRefFeeOption, type ClosePositionOption, type CollectFeeOption, type CollectRewardAndFeeOption, type CollectRewardOption, type CreatePartnerOption, type CreatePoolAndAddOption, type CreatePoolAndAddWithPriceOption, type CreatePoolOption, DEFAULT_MAX_WEIGHT, DEFAULT_MIN_WEIGHT, type DlmmBasePool, type DlmmConfigs, type DlmmGlobalConfig, type DlmmPool, type DlmmPosition, FEE_PRECISION, type FeeRate, FeeUtils, type GetBinInfoOption, type GetBinInfoResult, type GetPoolBinInfoOption, type GetTotalFeeRateOption, type IlmInputOptions, type IlmInputResult, IlmUtils, type InitRewardOption, MAX_BIN_ID, MAX_BIN_PER_POSITION, MAX_FEE_RATE, MIN_BIN_ID, ONE, type OpenAndAddLiquidityOption, type OpenAndAddLiquidityWithPriceOption, type OpenPositionOption, type Partner, PoolModule, type PoolPermissions, type PoolTransactionInfo, type PositionFee, type PositionManager, type PositionReward, type PreSwapOption, type PreSwapQuote, REWARD_PERIOD, REWARD_PERIOD_START_AT, type RemoveLiquidityOption, type Reward, type RewardAccessOption, type RewardInfo, type RewardManager, type RewardPeriodEmission, type RewardPeriodEmissionFormat, type RewardWhiteListOption, SCALE_OFFSET, type SdkOptions, StrategyType, StrategyUtils, type SwapOption, type TokenTable, type UpdatePositionFeeAndRewardsOption, type UpdateRefFeeRateOption, type UpdateTimeRangeOption, type ValidateActiveIdSlippageOption, type VariableParameters, WeightUtils, type WeightsInfo, type WeightsOptions, buildPoolKey, CetusDlmmSDK as default, dlmmMainnet, dlmmTestnet, generateRewardSchedule, getRouterModule, parseBinInfo, parseBinInfoList, parseCurrentRewardPeriodEmission, parseDlmmBasePool, parseDlmmPool, parseDlmmPosition, parseLiquidityShares, parsePartner, parsePoolTransactionInfo, parseRewardPeriodEmission, parseStrategyType, parsedDlmmPosFeeData, parsedDlmmPosRewardData, parsedSwapQuoteData, poolFilterEvenTypes, safeAmount, safeMulAmount };
|