@magmaprotocol/magma-clmm-sdk 0.5.44 → 0.5.45
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.ts +200 -200
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -804,7 +804,7 @@ type CalculateRatesResult = {
|
|
|
804
804
|
/**
|
|
805
805
|
* Represents parameters for a swap operation.
|
|
806
806
|
*/
|
|
807
|
-
type SwapParams
|
|
807
|
+
type SwapParams = {
|
|
808
808
|
/**
|
|
809
809
|
* The identifier of the pool.
|
|
810
810
|
*/
|
|
@@ -1632,6 +1632,193 @@ type GetRewardByPosition = {
|
|
|
1632
1632
|
coinTypeB: string;
|
|
1633
1633
|
};
|
|
1634
1634
|
|
|
1635
|
+
type FetchPairParams = {
|
|
1636
|
+
pair: string;
|
|
1637
|
+
coinTypeA: string;
|
|
1638
|
+
coinTypeB: string;
|
|
1639
|
+
};
|
|
1640
|
+
type CreatePairParams = {
|
|
1641
|
+
bin_step: number;
|
|
1642
|
+
coinTypeA: string;
|
|
1643
|
+
coinTypeB: string;
|
|
1644
|
+
coinADecimal: number;
|
|
1645
|
+
coinBDecimal: number;
|
|
1646
|
+
priceTokenBPerTokenA: string;
|
|
1647
|
+
};
|
|
1648
|
+
type MintPercentParams = {
|
|
1649
|
+
pair: string;
|
|
1650
|
+
coinTypeA: string;
|
|
1651
|
+
coinTypeB: string;
|
|
1652
|
+
amountATotal: number;
|
|
1653
|
+
amountBTotal: number;
|
|
1654
|
+
storageIds: number[];
|
|
1655
|
+
binsAPercent: number[];
|
|
1656
|
+
binsBPercent: number[];
|
|
1657
|
+
to: string;
|
|
1658
|
+
};
|
|
1659
|
+
type MintAmountParams = {
|
|
1660
|
+
pair: string;
|
|
1661
|
+
coinTypeA: string;
|
|
1662
|
+
coinTypeB: string;
|
|
1663
|
+
amountATotal: number;
|
|
1664
|
+
amountBTotal: number;
|
|
1665
|
+
storageIds: number[];
|
|
1666
|
+
amountsA: number[];
|
|
1667
|
+
amountsB: number[];
|
|
1668
|
+
to: string;
|
|
1669
|
+
};
|
|
1670
|
+
type DLMMSwapParams = {
|
|
1671
|
+
pair: string;
|
|
1672
|
+
coinTypeA: string;
|
|
1673
|
+
coinTypeB: string;
|
|
1674
|
+
amountIn: number;
|
|
1675
|
+
minAmountOut: number;
|
|
1676
|
+
swapForY: boolean;
|
|
1677
|
+
to: string;
|
|
1678
|
+
};
|
|
1679
|
+
type FetchBinsParams = {
|
|
1680
|
+
pair: string;
|
|
1681
|
+
coinTypeA: string;
|
|
1682
|
+
coinTypeB: string;
|
|
1683
|
+
offset: number;
|
|
1684
|
+
limit: number;
|
|
1685
|
+
};
|
|
1686
|
+
type GetPositionLiquidityParams = {
|
|
1687
|
+
pair: string;
|
|
1688
|
+
positionId: string;
|
|
1689
|
+
coinTypeA: string;
|
|
1690
|
+
coinTypeB: string;
|
|
1691
|
+
};
|
|
1692
|
+
type GetPairLiquidityParams = {
|
|
1693
|
+
pair: string;
|
|
1694
|
+
coinTypeA: string;
|
|
1695
|
+
coinTypeB: string;
|
|
1696
|
+
};
|
|
1697
|
+
type EventPairParams = {
|
|
1698
|
+
base_factor: number;
|
|
1699
|
+
filter_period: number;
|
|
1700
|
+
decay_period: number;
|
|
1701
|
+
reduction_factor: number;
|
|
1702
|
+
variable_fee_control: number;
|
|
1703
|
+
protocol_share: number;
|
|
1704
|
+
max_volatility_accumulator: number;
|
|
1705
|
+
volatility_accumulator: number;
|
|
1706
|
+
volatility_reference: number;
|
|
1707
|
+
index_reference: number;
|
|
1708
|
+
time_of_last_update: number | string;
|
|
1709
|
+
oracle_index: number;
|
|
1710
|
+
active_index: number;
|
|
1711
|
+
};
|
|
1712
|
+
type EventBin = {
|
|
1713
|
+
storage_id: number | string;
|
|
1714
|
+
price_q128: number | string;
|
|
1715
|
+
reserve_x: number | string;
|
|
1716
|
+
reserve_y: number | string;
|
|
1717
|
+
staked_liquidity: number | string;
|
|
1718
|
+
staked_lp_amount: number | string;
|
|
1719
|
+
fee_x: number | string;
|
|
1720
|
+
fee_y: number | string;
|
|
1721
|
+
fee_growth_x: number | string;
|
|
1722
|
+
fee_growth_y: number | string;
|
|
1723
|
+
rewarder_growth: number[] | string[];
|
|
1724
|
+
distribution_growth: number | string;
|
|
1725
|
+
distribution_last_updated: number | string;
|
|
1726
|
+
};
|
|
1727
|
+
type EventPositionLiquidity = {
|
|
1728
|
+
shares: number | string;
|
|
1729
|
+
liquidity: number | string;
|
|
1730
|
+
x_equivalent: number | string;
|
|
1731
|
+
y_equivalent: number | string;
|
|
1732
|
+
bin_ids: number[] | string[];
|
|
1733
|
+
bin_x_eq: number[] | string[];
|
|
1734
|
+
bin_y_eq: number[] | string[];
|
|
1735
|
+
bin_liquidity: number[] | string[];
|
|
1736
|
+
};
|
|
1737
|
+
type EventPairLiquidity = {
|
|
1738
|
+
shares: number | string;
|
|
1739
|
+
liquidity: number | string;
|
|
1740
|
+
x: number | string;
|
|
1741
|
+
y: number | string;
|
|
1742
|
+
bin_ids: number[] | string[];
|
|
1743
|
+
bin_x: number[] | string[];
|
|
1744
|
+
bin_y: number[] | string[];
|
|
1745
|
+
};
|
|
1746
|
+
type DlmmPoolInfo = {
|
|
1747
|
+
pool_id: string;
|
|
1748
|
+
bin_step: number;
|
|
1749
|
+
coin_a: string;
|
|
1750
|
+
coin_b: string;
|
|
1751
|
+
base_factor: number;
|
|
1752
|
+
base_fee: number;
|
|
1753
|
+
active_index: number;
|
|
1754
|
+
};
|
|
1755
|
+
type DlmmAddLiquidityParams = {
|
|
1756
|
+
pool_id: string;
|
|
1757
|
+
coin_a: string;
|
|
1758
|
+
coin_b: string;
|
|
1759
|
+
position_id: string;
|
|
1760
|
+
amounts_a: number[];
|
|
1761
|
+
amounts_b: number[];
|
|
1762
|
+
receiver: string;
|
|
1763
|
+
rewards_token: string[];
|
|
1764
|
+
};
|
|
1765
|
+
type DlmmBurnPositionParams = {
|
|
1766
|
+
pool_id: string;
|
|
1767
|
+
position_id: string;
|
|
1768
|
+
coin_a: string;
|
|
1769
|
+
coin_b: string;
|
|
1770
|
+
rewards_token: string[];
|
|
1771
|
+
};
|
|
1772
|
+
type DlmmShrinkPosition = {
|
|
1773
|
+
pool_id: string;
|
|
1774
|
+
position_id: string;
|
|
1775
|
+
coin_a: string;
|
|
1776
|
+
coin_b: string;
|
|
1777
|
+
delta_percentage: number;
|
|
1778
|
+
rewards_token: string[];
|
|
1779
|
+
};
|
|
1780
|
+
type DlmmCollectRewardParams = {
|
|
1781
|
+
pool_id: string;
|
|
1782
|
+
coin_a: string;
|
|
1783
|
+
coin_b: string;
|
|
1784
|
+
position_id: string;
|
|
1785
|
+
rewards_token: string[];
|
|
1786
|
+
};
|
|
1787
|
+
type DlmmCollectFeeParams = {
|
|
1788
|
+
pool_id: string;
|
|
1789
|
+
coin_a: string;
|
|
1790
|
+
coin_b: string;
|
|
1791
|
+
position_id: string;
|
|
1792
|
+
};
|
|
1793
|
+
type DlmmRewardsParams = {
|
|
1794
|
+
pool_id: string;
|
|
1795
|
+
position_id: string;
|
|
1796
|
+
coin_a: string;
|
|
1797
|
+
coin_b: string;
|
|
1798
|
+
rewards_token: string[];
|
|
1799
|
+
};
|
|
1800
|
+
type DlmmEventEarnedFees = {
|
|
1801
|
+
position_id: string;
|
|
1802
|
+
x: string;
|
|
1803
|
+
y: string;
|
|
1804
|
+
fee_x: number;
|
|
1805
|
+
fee_y: number;
|
|
1806
|
+
};
|
|
1807
|
+
type DlmmEventEarnedRewards = {
|
|
1808
|
+
position_id: string;
|
|
1809
|
+
reward: string[];
|
|
1810
|
+
amount: number[];
|
|
1811
|
+
};
|
|
1812
|
+
type GetPairRewarderParams = {
|
|
1813
|
+
pool_id: string;
|
|
1814
|
+
coin_a: string;
|
|
1815
|
+
coin_b: string;
|
|
1816
|
+
};
|
|
1817
|
+
type DlmmEventPairRewardTypes = {
|
|
1818
|
+
pair_id: string;
|
|
1819
|
+
tokens: string[];
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1635
1822
|
type BigNumber = Decimal.Value | number | string;
|
|
1636
1823
|
|
|
1637
1824
|
interface IModule {
|
|
@@ -3122,7 +3309,7 @@ declare class SwapModule implements IModule {
|
|
|
3122
3309
|
* If this parameter is not passed, gas estimation is not performed
|
|
3123
3310
|
* @returns
|
|
3124
3311
|
*/
|
|
3125
|
-
createSwapTransactionPayload(params: SwapParams
|
|
3312
|
+
createSwapTransactionPayload(params: SwapParams, gasEstimateArg?: {
|
|
3126
3313
|
byAmountIn: boolean;
|
|
3127
3314
|
slippage: Percentage;
|
|
3128
3315
|
decimalsA: number;
|
|
@@ -3137,7 +3324,7 @@ declare class SwapModule implements IModule {
|
|
|
3137
3324
|
* If this parameter is not passed, gas estimation is not performed
|
|
3138
3325
|
* @returns tx and coin ABs
|
|
3139
3326
|
*/
|
|
3140
|
-
createSwapTransactionWithoutTransferCoinsPayload(params: SwapParams
|
|
3327
|
+
createSwapTransactionWithoutTransferCoinsPayload(params: SwapParams, gasEstimateArg?: {
|
|
3141
3328
|
byAmountIn: boolean;
|
|
3142
3329
|
slippage: Percentage;
|
|
3143
3330
|
decimalsA: number;
|
|
@@ -3500,193 +3687,6 @@ declare class GaugeModule implements IModule {
|
|
|
3500
3687
|
getEpochRewardByPool(pool: string, incentive_tokens: string[]): Promise<Map<string, string>>;
|
|
3501
3688
|
}
|
|
3502
3689
|
|
|
3503
|
-
type FetchPairParams = {
|
|
3504
|
-
pair: string;
|
|
3505
|
-
coinTypeA: string;
|
|
3506
|
-
coinTypeB: string;
|
|
3507
|
-
};
|
|
3508
|
-
type CreatePairParams = {
|
|
3509
|
-
bin_step: number;
|
|
3510
|
-
coinTypeA: string;
|
|
3511
|
-
coinTypeB: string;
|
|
3512
|
-
coinADecimal: number;
|
|
3513
|
-
coinBDecimal: number;
|
|
3514
|
-
priceTokenBPerTokenA: string;
|
|
3515
|
-
};
|
|
3516
|
-
type MintPercentParams = {
|
|
3517
|
-
pair: string;
|
|
3518
|
-
coinTypeA: string;
|
|
3519
|
-
coinTypeB: string;
|
|
3520
|
-
amountATotal: number;
|
|
3521
|
-
amountBTotal: number;
|
|
3522
|
-
storageIds: number[];
|
|
3523
|
-
binsAPercent: number[];
|
|
3524
|
-
binsBPercent: number[];
|
|
3525
|
-
to: string;
|
|
3526
|
-
};
|
|
3527
|
-
type MintAmountParams = {
|
|
3528
|
-
pair: string;
|
|
3529
|
-
coinTypeA: string;
|
|
3530
|
-
coinTypeB: string;
|
|
3531
|
-
amountATotal: number;
|
|
3532
|
-
amountBTotal: number;
|
|
3533
|
-
storageIds: number[];
|
|
3534
|
-
amountsA: number[];
|
|
3535
|
-
amountsB: number[];
|
|
3536
|
-
to: string;
|
|
3537
|
-
};
|
|
3538
|
-
type SwapParams = {
|
|
3539
|
-
pair: string;
|
|
3540
|
-
coinTypeA: string;
|
|
3541
|
-
coinTypeB: string;
|
|
3542
|
-
amountIn: number;
|
|
3543
|
-
minAmountOut: number;
|
|
3544
|
-
swapForY: boolean;
|
|
3545
|
-
to: string;
|
|
3546
|
-
};
|
|
3547
|
-
type FetchBinsParams = {
|
|
3548
|
-
pair: string;
|
|
3549
|
-
coinTypeA: string;
|
|
3550
|
-
coinTypeB: string;
|
|
3551
|
-
offset: number;
|
|
3552
|
-
limit: number;
|
|
3553
|
-
};
|
|
3554
|
-
type GetPositionLiquidityParams = {
|
|
3555
|
-
pair: string;
|
|
3556
|
-
positionId: string;
|
|
3557
|
-
coinTypeA: string;
|
|
3558
|
-
coinTypeB: string;
|
|
3559
|
-
};
|
|
3560
|
-
type GetPairLiquidityParams = {
|
|
3561
|
-
pair: string;
|
|
3562
|
-
coinTypeA: string;
|
|
3563
|
-
coinTypeB: string;
|
|
3564
|
-
};
|
|
3565
|
-
type EventPairParams = {
|
|
3566
|
-
base_factor: number;
|
|
3567
|
-
filter_period: number;
|
|
3568
|
-
decay_period: number;
|
|
3569
|
-
reduction_factor: number;
|
|
3570
|
-
variable_fee_control: number;
|
|
3571
|
-
protocol_share: number;
|
|
3572
|
-
max_volatility_accumulator: number;
|
|
3573
|
-
volatility_accumulator: number;
|
|
3574
|
-
volatility_reference: number;
|
|
3575
|
-
index_reference: number;
|
|
3576
|
-
time_of_last_update: number | string;
|
|
3577
|
-
oracle_index: number;
|
|
3578
|
-
active_index: number;
|
|
3579
|
-
};
|
|
3580
|
-
type EventBin = {
|
|
3581
|
-
storage_id: number | string;
|
|
3582
|
-
price_q128: number | string;
|
|
3583
|
-
reserve_x: number | string;
|
|
3584
|
-
reserve_y: number | string;
|
|
3585
|
-
staked_liquidity: number | string;
|
|
3586
|
-
staked_lp_amount: number | string;
|
|
3587
|
-
fee_x: number | string;
|
|
3588
|
-
fee_y: number | string;
|
|
3589
|
-
fee_growth_x: number | string;
|
|
3590
|
-
fee_growth_y: number | string;
|
|
3591
|
-
rewarder_growth: number[] | string[];
|
|
3592
|
-
distribution_growth: number | string;
|
|
3593
|
-
distribution_last_updated: number | string;
|
|
3594
|
-
};
|
|
3595
|
-
type EventPositionLiquidity = {
|
|
3596
|
-
shares: number | string;
|
|
3597
|
-
liquidity: number | string;
|
|
3598
|
-
x_equivalent: number | string;
|
|
3599
|
-
y_equivalent: number | string;
|
|
3600
|
-
bin_ids: number[] | string[];
|
|
3601
|
-
bin_x_eq: number[] | string[];
|
|
3602
|
-
bin_y_eq: number[] | string[];
|
|
3603
|
-
bin_liquidity: number[] | string[];
|
|
3604
|
-
};
|
|
3605
|
-
type EventPairLiquidity = {
|
|
3606
|
-
shares: number | string;
|
|
3607
|
-
liquidity: number | string;
|
|
3608
|
-
x: number | string;
|
|
3609
|
-
y: number | string;
|
|
3610
|
-
bin_ids: number[] | string[];
|
|
3611
|
-
bin_x: number[] | string[];
|
|
3612
|
-
bin_y: number[] | string[];
|
|
3613
|
-
};
|
|
3614
|
-
type DlmmPoolInfo = {
|
|
3615
|
-
pool_id: string;
|
|
3616
|
-
bin_step: number;
|
|
3617
|
-
coin_a: string;
|
|
3618
|
-
coin_b: string;
|
|
3619
|
-
base_factor: number;
|
|
3620
|
-
base_fee: number;
|
|
3621
|
-
active_index: number;
|
|
3622
|
-
};
|
|
3623
|
-
type DlmmAddLiquidityParams = {
|
|
3624
|
-
pool_id: string;
|
|
3625
|
-
coin_a: string;
|
|
3626
|
-
coin_b: string;
|
|
3627
|
-
position_id: string;
|
|
3628
|
-
amounts_a: number[];
|
|
3629
|
-
amounts_b: number[];
|
|
3630
|
-
receiver: string;
|
|
3631
|
-
rewards_token: string[];
|
|
3632
|
-
};
|
|
3633
|
-
type DlmmBurnPositionParams = {
|
|
3634
|
-
pool_id: string;
|
|
3635
|
-
position_id: string;
|
|
3636
|
-
coin_a: string;
|
|
3637
|
-
coin_b: string;
|
|
3638
|
-
rewards_token: string[];
|
|
3639
|
-
};
|
|
3640
|
-
type DlmmShrinkPosition = {
|
|
3641
|
-
pool_id: string;
|
|
3642
|
-
position_id: string;
|
|
3643
|
-
coin_a: string;
|
|
3644
|
-
coin_b: string;
|
|
3645
|
-
delta_percentage: number;
|
|
3646
|
-
rewards_token: string[];
|
|
3647
|
-
};
|
|
3648
|
-
type DlmmCollectRewardParams = {
|
|
3649
|
-
pool_id: string;
|
|
3650
|
-
coin_a: string;
|
|
3651
|
-
coin_b: string;
|
|
3652
|
-
position_id: string;
|
|
3653
|
-
rewards_token: string[];
|
|
3654
|
-
};
|
|
3655
|
-
type DlmmCollectFeeParams = {
|
|
3656
|
-
pool_id: string;
|
|
3657
|
-
coin_a: string;
|
|
3658
|
-
coin_b: string;
|
|
3659
|
-
position_id: string;
|
|
3660
|
-
};
|
|
3661
|
-
type DlmmRewardsParams = {
|
|
3662
|
-
pool_id: string;
|
|
3663
|
-
position_id: string;
|
|
3664
|
-
coin_a: string;
|
|
3665
|
-
coin_b: string;
|
|
3666
|
-
rewards_token: string[];
|
|
3667
|
-
};
|
|
3668
|
-
type DlmmEventEarnedFees = {
|
|
3669
|
-
position_id: string;
|
|
3670
|
-
x: string;
|
|
3671
|
-
y: string;
|
|
3672
|
-
fee_x: number;
|
|
3673
|
-
fee_y: number;
|
|
3674
|
-
};
|
|
3675
|
-
type DlmmEventEarnedRewards = {
|
|
3676
|
-
position_id: string;
|
|
3677
|
-
reward: string[];
|
|
3678
|
-
amount: number[];
|
|
3679
|
-
};
|
|
3680
|
-
type GetPairRewarderParams = {
|
|
3681
|
-
pool_id: string;
|
|
3682
|
-
coin_a: string;
|
|
3683
|
-
coin_b: string;
|
|
3684
|
-
};
|
|
3685
|
-
type DlmmEventPairRewardTypes = {
|
|
3686
|
-
pair_id: string;
|
|
3687
|
-
tokens: string[];
|
|
3688
|
-
};
|
|
3689
|
-
|
|
3690
3690
|
declare class DlmmModule implements IModule {
|
|
3691
3691
|
protected _sdk: MagmaClmmSDK;
|
|
3692
3692
|
constructor(sdk: MagmaClmmSDK);
|
|
@@ -3705,7 +3705,7 @@ declare class DlmmModule implements IModule {
|
|
|
3705
3705
|
shrinkPosition(params: DlmmShrinkPosition): Promise<Transaction>;
|
|
3706
3706
|
collectReward(params: DlmmCollectRewardParams): Promise<Transaction>;
|
|
3707
3707
|
collectFees(params: DlmmCollectFeeParams): Promise<Transaction>;
|
|
3708
|
-
swap(params:
|
|
3708
|
+
swap(params: DLMMSwapParams): Promise<Transaction>;
|
|
3709
3709
|
fetchBins(params: FetchBinsParams): Promise<EventBin[]>;
|
|
3710
3710
|
getPositionLiquidity(params: GetPositionLiquidityParams): Promise<EventPositionLiquidity>;
|
|
3711
3711
|
getPairLiquidity(params: GetPairLiquidityParams): Promise<EventPairLiquidity>;
|
|
@@ -4182,7 +4182,7 @@ declare class TransactionUtil {
|
|
|
4182
4182
|
* @param curSqrtPrice
|
|
4183
4183
|
* @returns
|
|
4184
4184
|
*/
|
|
4185
|
-
static buildSwapTransactionForGas(sdk: MagmaClmmSDK, params: SwapParams
|
|
4185
|
+
static buildSwapTransactionForGas(sdk: MagmaClmmSDK, params: SwapParams, allCoinAsset: CoinAsset[], gasEstimateArg: {
|
|
4186
4186
|
byAmountIn: boolean;
|
|
4187
4187
|
slippage: Percentage;
|
|
4188
4188
|
decimalsA: number;
|
|
@@ -4196,7 +4196,7 @@ declare class TransactionUtil {
|
|
|
4196
4196
|
* @param packageId
|
|
4197
4197
|
* @returns
|
|
4198
4198
|
*/
|
|
4199
|
-
static buildSwapTransaction(sdk: MagmaClmmSDK, params: SwapParams
|
|
4199
|
+
static buildSwapTransaction(sdk: MagmaClmmSDK, params: SwapParams, allCoinAsset: CoinAsset[]): Transaction;
|
|
4200
4200
|
static buildCreateLockTransaction(sdk: MagmaClmmSDK, params: CreateLockParams, allCoinAsset: CoinAsset[]): Transaction;
|
|
4201
4201
|
static buildCreateTransactionArgs(tx: Transaction, params: CreateLockParams, sdkOptions: SdkOptions, lockCoinInput: BuildCoinResult): Transaction;
|
|
4202
4202
|
static buildIncreaseLockAmountTransaction(sdk: MagmaClmmSDK, params: IncreaseLockAmountParams, allCoinAsset: CoinAsset[]): Transaction;
|
|
@@ -4220,7 +4220,7 @@ declare class TransactionUtil {
|
|
|
4220
4220
|
* @param packageId
|
|
4221
4221
|
* @returns
|
|
4222
4222
|
*/
|
|
4223
|
-
static buildSwapTransactionArgs(tx: Transaction, params: SwapParams
|
|
4223
|
+
static buildSwapTransactionArgs(tx: Transaction, params: SwapParams, sdkOptions: SdkOptions, primaryCoinInputA: BuildCoinResult, primaryCoinInputB: BuildCoinResult): Transaction;
|
|
4224
4224
|
/**
|
|
4225
4225
|
* build add liquidity transaction with out transfer coins
|
|
4226
4226
|
* @param params
|
|
@@ -4228,7 +4228,7 @@ declare class TransactionUtil {
|
|
|
4228
4228
|
* @param curSqrtPrice
|
|
4229
4229
|
* @returns
|
|
4230
4230
|
*/
|
|
4231
|
-
static buildSwapTransactionWithoutTransferCoinsForGas(sdk: MagmaClmmSDK, params: SwapParams
|
|
4231
|
+
static buildSwapTransactionWithoutTransferCoinsForGas(sdk: MagmaClmmSDK, params: SwapParams, allCoinAsset: CoinAsset[], gasEstimateArg: {
|
|
4232
4232
|
byAmountIn: boolean;
|
|
4233
4233
|
slippage: Percentage;
|
|
4234
4234
|
decimalsA: number;
|
|
@@ -4245,7 +4245,7 @@ declare class TransactionUtil {
|
|
|
4245
4245
|
* @param packageId
|
|
4246
4246
|
* @returns
|
|
4247
4247
|
*/
|
|
4248
|
-
static buildSwapTransactionWithoutTransferCoins(sdk: MagmaClmmSDK, params: SwapParams
|
|
4248
|
+
static buildSwapTransactionWithoutTransferCoins(sdk: MagmaClmmSDK, params: SwapParams, allCoinAsset: CoinAsset[]): {
|
|
4249
4249
|
tx: Transaction;
|
|
4250
4250
|
coinABs: TransactionObjectArgument[];
|
|
4251
4251
|
};
|
|
@@ -4255,18 +4255,18 @@ declare class TransactionUtil {
|
|
|
4255
4255
|
* @param packageId
|
|
4256
4256
|
* @returns
|
|
4257
4257
|
*/
|
|
4258
|
-
static buildSwapTransactionWithoutTransferCoinArgs(sdk: MagmaClmmSDK, tx: Transaction, params: SwapParams
|
|
4258
|
+
static buildSwapTransactionWithoutTransferCoinArgs(sdk: MagmaClmmSDK, tx: Transaction, params: SwapParams, sdkOptions: SdkOptions, primaryCoinInputA: BuildCoinResult, primaryCoinInputB: BuildCoinResult): {
|
|
4259
4259
|
tx: Transaction;
|
|
4260
4260
|
txRes: TransactionObjectArgument[];
|
|
4261
4261
|
};
|
|
4262
|
-
static fixSwapParams(sdk: MagmaClmmSDK, params: SwapParams
|
|
4262
|
+
static fixSwapParams(sdk: MagmaClmmSDK, params: SwapParams, gasEstimateArg: {
|
|
4263
4263
|
byAmountIn: boolean;
|
|
4264
4264
|
slippage: Percentage;
|
|
4265
4265
|
decimalsA: number;
|
|
4266
4266
|
decimalsB: number;
|
|
4267
4267
|
swapTicks: Array<TickData>;
|
|
4268
4268
|
currentPool: Pool;
|
|
4269
|
-
}): Promise<SwapParams
|
|
4269
|
+
}): Promise<SwapParams>;
|
|
4270
4270
|
static syncBuildCoinInputForAmount(sdk: MagmaClmmSDK, tx: Transaction, amount: bigint, coinType: string, buildVector?: boolean, fixAmount?: boolean): Promise<TransactionObjectArgument | undefined>;
|
|
4271
4271
|
static buildCoinForAmount(tx: Transaction, allCoins: CoinAsset[], amount: bigint, coinType: string, buildVector?: boolean, fixAmount?: boolean): BuildCoinResult;
|
|
4272
4272
|
private static buildVectorCoin;
|
|
@@ -4446,4 +4446,4 @@ interface InitMagmaSDKOptions {
|
|
|
4446
4446
|
*/
|
|
4447
4447
|
declare function initMagmaSDK(options: InitMagmaSDKOptions): MagmaClmmSDK;
|
|
4448
4448
|
|
|
4449
|
-
export { AMM_SWAP_MODULE, AddBribeReward, AddLiquidityCommonParams, AddLiquidityFixTokenParams, AddLiquidityParams, AddLiquidityWithProtectionParams, AddressAndDirection, AdjustResult, AggregatorResult, AmountSpecified, BasePath, BigNumber, BinLiquidity, BinMath, Bits, BuildCoinResult, CLOCK_ADDRESS, CachedContent, CalculateRatesParams, CalculateRatesResult, ClaimAndLockParams, ClaimFeesParams, ClaimFeesPoolsParams, ClmmConfig, ClmmExpectSwapModule, ClmmFetcherModule, ClmmIntegratePoolModule, ClmmIntegratePoolV2Module, ClmmIntegratePoolV3Module, ClmmIntegrateRouterModule, ClmmIntegrateRouterWithPartnerModule, ClmmIntegrateUtilsModule, ClmmPartnerModule, ClmmPoolConfig, ClmmPoolUtil, ClmmPositionStatus, ClmmpoolData, ClosePositionParams, CoinAmounts, CoinAsset, CoinAssist, CoinConfig, CoinInfoAddress, CoinNode, CoinPairType, CoinProvider, CoinStoreAddress, CollectFeeParams, CollectFeesQuote, CollectFeesQuoteParam, CollectRewarderParams, ConfigModule, CreateLockParams, CreatePartnerEvent, CreatePoolAddLiquidityParams, CreatePoolParams, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, DataPage, DeepbookClobV2Moudle, DeepbookCustodianV2Moudle, DeepbookEndpointsV2Moudle, DeepbookPool, DeepbookUtils, DepositPosition, DlmmConfig, DlmmScript, EpochEmission, FEE_RATE_DENOMINATOR, FaucetCoin, FetchParams, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, Gauge, GetRewardByPosition, IncreaseLockAmountParams, IncreaseUnlockTimeParams, LaunchpadPoolConfig, LiquidityAndCoinYResult, LiquidityInput, LockModule, LockPermanentParams, LockVoteEvent, MAX_SQRT_PRICE, MAX_TICK_INDEX, MIN_SQRT_PRICE, MIN_TICK_INDEX, MagmaClmmSDK, MagmaConfigs, MathUtil, MergeLockParams, Minter, NFT, ONE, OnePath, OpenPositionAddLiquidityWithProtectionParams, OpenPositionParams, Order, POOL_NO_LIQUIDITY, POOL_STRUCT, Package, PageQuery, PaginationArgs, PathLink, PathProvider, Percentage, PokeParams, Pool, PoolImmutables, PoolInfo, PoolModule, Position, PositionModule, PositionReward, PositionStatus, PositionUtil, PreRouterSwapParams, PreSwapLpChangeParams, PreSwapParams, PreSwapResult, PreSwapWithMultiPoolParams, PriceResult, RemoveLiquidityParams, RewardDistributor, Rewarder, RewarderAmountOwed, RouterModule, RouterModuleV2, RpcModule, SUI_SYSTEM_STATE_OBJECT_ID, SdkOptions, SplitPath, SplitSwap, SplitSwapResult, SplitUnit, StakedPositionOfPool, StrategyType, SuiAddressType, SuiBasicTypes, SuiInputTypes, SuiObjectDataWithContent, SuiObjectIdType, SuiResource, SuiStructTag, SuiTxArg, SwapDirection, SwapModule, SwapParams
|
|
4449
|
+
export { AMM_SWAP_MODULE, AddBribeReward, AddLiquidityCommonParams, AddLiquidityFixTokenParams, AddLiquidityParams, AddLiquidityWithProtectionParams, AddressAndDirection, AdjustResult, AggregatorResult, AmountSpecified, BasePath, BigNumber, BinLiquidity, BinMath, Bits, BuildCoinResult, CLOCK_ADDRESS, CachedContent, CalculateRatesParams, CalculateRatesResult, ClaimAndLockParams, ClaimFeesParams, ClaimFeesPoolsParams, ClmmConfig, ClmmExpectSwapModule, ClmmFetcherModule, ClmmIntegratePoolModule, ClmmIntegratePoolV2Module, ClmmIntegratePoolV3Module, ClmmIntegrateRouterModule, ClmmIntegrateRouterWithPartnerModule, ClmmIntegrateUtilsModule, ClmmPartnerModule, ClmmPoolConfig, ClmmPoolUtil, ClmmPositionStatus, ClmmpoolData, ClosePositionParams, CoinAmounts, CoinAsset, CoinAssist, CoinConfig, CoinInfoAddress, CoinNode, CoinPairType, CoinProvider, CoinStoreAddress, CollectFeeParams, CollectFeesQuote, CollectFeesQuoteParam, CollectRewarderParams, ConfigModule, CreateLockParams, CreatePairParams, CreatePartnerEvent, CreatePoolAddLiquidityParams, CreatePoolParams, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, DLMMSwapParams, DataPage, DeepbookClobV2Moudle, DeepbookCustodianV2Moudle, DeepbookEndpointsV2Moudle, DeepbookPool, DeepbookUtils, DepositPosition, DlmmAddLiquidityParams, DlmmBurnPositionParams, DlmmCollectFeeParams, DlmmCollectRewardParams, DlmmConfig, DlmmEventEarnedFees, DlmmEventEarnedRewards, DlmmEventPairRewardTypes, DlmmPoolInfo, DlmmRewardsParams, DlmmScript, DlmmShrinkPosition, EpochEmission, EventBin, EventPairLiquidity, EventPairParams, EventPositionLiquidity, FEE_RATE_DENOMINATOR, FaucetCoin, FetchBinsParams, FetchPairParams, FetchParams, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, Gauge, GetPairLiquidityParams, GetPairRewarderParams, GetPositionLiquidityParams, GetRewardByPosition, IncreaseLockAmountParams, IncreaseUnlockTimeParams, LaunchpadPoolConfig, LiquidityAndCoinYResult, LiquidityInput, LockModule, LockPermanentParams, LockVoteEvent, MAX_SQRT_PRICE, MAX_TICK_INDEX, MIN_SQRT_PRICE, MIN_TICK_INDEX, MagmaClmmSDK, MagmaConfigs, MathUtil, MergeLockParams, MintAmountParams, MintPercentParams, Minter, NFT, ONE, OnePath, OpenPositionAddLiquidityWithProtectionParams, OpenPositionParams, Order, POOL_NO_LIQUIDITY, POOL_STRUCT, Package, PageQuery, PaginationArgs, PathLink, PathProvider, Percentage, PokeParams, Pool, PoolImmutables, PoolInfo, PoolModule, Position, PositionModule, PositionReward, PositionStatus, PositionUtil, PreRouterSwapParams, PreSwapLpChangeParams, PreSwapParams, PreSwapResult, PreSwapWithMultiPoolParams, PriceResult, RemoveLiquidityParams, RewardDistributor, Rewarder, RewarderAmountOwed, RouterModule, RouterModuleV2, RpcModule, SUI_SYSTEM_STATE_OBJECT_ID, SdkOptions, SplitPath, SplitSwap, SplitSwapResult, SplitUnit, StakedPositionOfPool, StrategyType, SuiAddressType, SuiBasicTypes, SuiInputTypes, SuiObjectDataWithContent, SuiObjectIdType, SuiResource, SuiStructTag, SuiTxArg, SwapDirection, SwapModule, SwapParams, SwapResult, SwapStepResult, SwapUtils, SwapWithRouterParams, TICK_ARRAY_SIZE, TWO, Tick, TickData, TickMath, TickUtil, TokenConfig, TokenConfigEvent, TokenInfo, TokenModule, TransPreSwapWithMultiPoolParams, TransactionUtil, TransferLockParams, TxBlock, U128, U128_MAX, U64_MAX, VoteParams, Voter, VotingEscrow, WithdrawPosition, ZERO, addHexPrefix, adjustForCoinSlippage, adjustForSlippage, asIntN, asUintN, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, bufferToHex, buildClmmPositionName, buildNFT, buildPool, buildPosition, buildPositionReward, buildTickData, buildTickDataByEvent, cacheTime24h, cacheTime5min, checkAddress, checkInvalidSuiAddress, clmmMainnet, clmmTestnet, collectFeesQuote, composeType, computeSwap, computeSwapStep, createSplitAmountArray, createSplitArray, createTestTransferTxPayloadParams, d, decimalsMultiplier, MagmaClmmSDK as default, estPoolAPR, estPosAPRResult, estPositionAPRWithDeltaMethod, estPositionAPRWithMultiMethod, estimateLiquidityForCoinA, estimateLiquidityForCoinB, extractAddressFromType, extractStructTagFromType, findAdjustCoin, fixCoinType, fixSuiObjectId, fromDecimalsAmount, getAmountFixedDelta, getAmountUnfixedDelta, getCoinAFromLiquidity, getCoinBFromLiquidity, getCoinXYForLiquidity, getDefaultSuiInputType, getDeltaA, getDeltaB, getDeltaDownFromOutput, getDeltaUpFromInput, getFutureTime, getLiquidityAndCoinYByCoinX, getLiquidityFromCoinA, getLiquidityFromCoinB, getLowerSqrtPriceFromCoinA, getLowerSqrtPriceFromCoinB, getMoveObject, getMoveObjectType, getMovePackageContent, getNearestTickByTick, getNextSqrtPriceAUp, getNextSqrtPriceBDown, getNextSqrtPriceFromInput, getNextSqrtPriceFromOutput, getObjectDeletedResponse, getObjectDisplay, getObjectFields, getObjectId, getObjectNotExistsResponse, getObjectOwner, getObjectPreviousTransactionDigest, getObjectReference, getObjectType, getObjectVersion, getPackagerConfigs, getPriceOfBinByBinId, getRewardInTickRange, getSuiObjectData, getTickDataFromUrlData, getUpperSqrtPriceFromCoinA, getUpperSqrtPriceFromCoinB, hasPublicTransfer, hexToNumber, hexToString, initMagmaSDK, initMainnetSDK, initTestnetSDK, isSortedSymbols, isSuiObjectResponse, newBits, normalizeCoinType, patchFixSuiObjectId, printTransaction, removeHexPrefix, secretKeyToEd25519Keypair, secretKeyToSecp256k1Keypair, shortAddress, shortString, tickScore, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy, toBuffer, toCoinAmount, toDecimalsAmount, transClmmpoolDataWithoutTicks, utf8to16, withLiquiditySlippage };
|