@meteora-ag/dlmm 1.9.0-rc.2 → 1.9.0-rc.3
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 +344 -344
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,65 +1,12 @@
|
|
|
1
1
|
import * as _coral_xyz_anchor from '@coral-xyz/anchor';
|
|
2
|
-
import {
|
|
2
|
+
import { Program, BN as BN$1, IdlAccounts, ProgramAccount, IdlTypes, EventParser } from '@coral-xyz/anchor';
|
|
3
3
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
4
4
|
import { PublicKey, Connection, AccountMeta, Keypair, TransactionInstruction, Cluster, AccountInfo, Transaction, GetProgramAccountsFilter } from '@solana/web3.js';
|
|
5
5
|
import Decimal from 'decimal.js';
|
|
6
6
|
import { IdlDiscriminator } from '@coral-xyz/anchor/dist/cjs/idl';
|
|
7
7
|
import { Mint } from '@solana/spl-token';
|
|
8
8
|
import { AllAccountsMap } from '@coral-xyz/anchor/dist/cjs/program/namespace/types';
|
|
9
|
-
import BN
|
|
10
|
-
|
|
11
|
-
declare const LBCLMM_PROGRAM_IDS: {
|
|
12
|
-
devnet: string;
|
|
13
|
-
localhost: string;
|
|
14
|
-
"mainnet-beta": string;
|
|
15
|
-
};
|
|
16
|
-
declare const ALT_ADDRESS: {
|
|
17
|
-
"mainnet-beta": string;
|
|
18
|
-
devnet: string;
|
|
19
|
-
};
|
|
20
|
-
declare const ADMIN: {
|
|
21
|
-
devnet: string;
|
|
22
|
-
localhost: string;
|
|
23
|
-
};
|
|
24
|
-
declare enum Network {
|
|
25
|
-
MAINNET = "mainnet-beta",
|
|
26
|
-
TESTNET = "testnet",
|
|
27
|
-
DEVNET = "devnet",
|
|
28
|
-
LOCAL = "localhost"
|
|
29
|
-
}
|
|
30
|
-
declare const BASIS_POINT_MAX = 10000;
|
|
31
|
-
declare const SCALE_OFFSET = 64;
|
|
32
|
-
declare const SCALE: BN;
|
|
33
|
-
declare const FEE_PRECISION: BN;
|
|
34
|
-
declare const MAX_FEE_RATE: BN;
|
|
35
|
-
declare const BIN_ARRAY_FEE = 0.07143744;
|
|
36
|
-
declare const POSITION_FEE = 0.05740608;
|
|
37
|
-
declare const TOKEN_ACCOUNT_FEE = 0.00203928;
|
|
38
|
-
declare const POOL_FEE = 0.00718272;
|
|
39
|
-
declare const BIN_ARRAY_BITMAP_FEE = 0.01180416;
|
|
40
|
-
declare const BIN_ARRAY_FEE_BN: BN;
|
|
41
|
-
declare const POSITION_FEE_BN: BN;
|
|
42
|
-
declare const TOKEN_ACCOUNT_FEE_BN: BN;
|
|
43
|
-
declare const POOL_FEE_BN: BN;
|
|
44
|
-
declare const BIN_ARRAY_BITMAP_FEE_BN: BN;
|
|
45
|
-
declare const MAX_BIN_ARRAY_SIZE: BN;
|
|
46
|
-
declare const DEFAULT_BIN_PER_POSITION: BN;
|
|
47
|
-
declare const BIN_ARRAY_BITMAP_SIZE: BN;
|
|
48
|
-
declare const EXTENSION_BINARRAY_BITMAP_SIZE: BN;
|
|
49
|
-
declare const POSITION_MAX_LENGTH: BN;
|
|
50
|
-
declare const MAX_RESIZE_LENGTH: BN;
|
|
51
|
-
declare const SIMULATION_USER: PublicKey;
|
|
52
|
-
declare const PRECISION = 18446744073709552000;
|
|
53
|
-
declare const MAX_CLAIM_ALL_ALLOWED = 2;
|
|
54
|
-
declare const MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26;
|
|
55
|
-
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
56
|
-
declare const ILM_BASE: PublicKey;
|
|
57
|
-
declare const MAX_EXTRA_BIN_ARRAYS = 3;
|
|
58
|
-
declare const U64_MAX: BN;
|
|
59
|
-
declare const MAX_BINS_PER_POSITION: BN;
|
|
60
|
-
declare enum FunctionType {
|
|
61
|
-
LiquidityMining = 0
|
|
62
|
-
}
|
|
9
|
+
import BN from 'bn.js';
|
|
63
10
|
|
|
64
11
|
/**
|
|
65
12
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
@@ -9424,33 +9371,33 @@ type LbClmm = {
|
|
|
9424
9371
|
];
|
|
9425
9372
|
};
|
|
9426
9373
|
|
|
9427
|
-
declare function buildBitFlagAndNegateStrategyParameters(x0: BN
|
|
9374
|
+
declare function buildBitFlagAndNegateStrategyParameters(x0: BN, y0: BN, deltaX: BN, deltaY: BN): {
|
|
9428
9375
|
bitFlag: number;
|
|
9429
|
-
x0: BN
|
|
9430
|
-
y0: BN
|
|
9431
|
-
deltaX: BN
|
|
9432
|
-
deltaY: BN
|
|
9376
|
+
x0: BN;
|
|
9377
|
+
y0: BN;
|
|
9378
|
+
deltaX: BN;
|
|
9379
|
+
deltaY: BN;
|
|
9433
9380
|
};
|
|
9434
9381
|
interface AmountIntoBin {
|
|
9435
|
-
binId: BN
|
|
9436
|
-
amountX: BN
|
|
9437
|
-
amountY: BN
|
|
9382
|
+
binId: BN;
|
|
9383
|
+
amountX: BN;
|
|
9384
|
+
amountY: BN;
|
|
9438
9385
|
}
|
|
9439
|
-
declare function getAmountInBinsBidSide(activeId: BN
|
|
9440
|
-
declare function getAmountInBinsAskSide(activeId: BN
|
|
9441
|
-
declare function toAmountIntoBins(activeId: BN
|
|
9386
|
+
declare function getAmountInBinsBidSide(activeId: BN, minDeltaId: BN, maxDeltaId: BN, deltaY: BN, y0: BN): AmountIntoBin[];
|
|
9387
|
+
declare function getAmountInBinsAskSide(activeId: BN, binStep: BN, minDeltaId: BN, maxDeltaId: BN, deltaX: BN, x0: BN): AmountIntoBin[];
|
|
9388
|
+
declare function toAmountIntoBins(activeId: BN, minDeltaId: BN, maxDeltaId: BN, deltaX: BN, deltaY: BN, x0: BN, y0: BN, binStep: BN, favorXInActiveBin: boolean): AmountIntoBin[];
|
|
9442
9389
|
interface SimulateWithdrawResult {
|
|
9443
|
-
liquidityAndFeeXWithdrawn: BN
|
|
9444
|
-
liquidityAndFeeYWithdrawn: BN
|
|
9445
|
-
rewardsAmountClaimed: BN
|
|
9390
|
+
liquidityAndFeeXWithdrawn: BN;
|
|
9391
|
+
liquidityAndFeeYWithdrawn: BN;
|
|
9392
|
+
rewardsAmountClaimed: BN[];
|
|
9446
9393
|
}
|
|
9447
9394
|
interface SimulateDepositResult {
|
|
9448
|
-
totalAmountXDeposited: BN
|
|
9449
|
-
totalAmountYDeposited: BN
|
|
9450
|
-
actualTotalAmountXDeposited: BN
|
|
9451
|
-
actualTotalAmountYDeposited: BN
|
|
9452
|
-
actualLiquidityAndFeeXWithdrawn: BN
|
|
9453
|
-
actualLiquidityAndFeeYWithdrawn: BN
|
|
9395
|
+
totalAmountXDeposited: BN;
|
|
9396
|
+
totalAmountYDeposited: BN;
|
|
9397
|
+
actualTotalAmountXDeposited: BN;
|
|
9398
|
+
actualTotalAmountYDeposited: BN;
|
|
9399
|
+
actualLiquidityAndFeeXWithdrawn: BN;
|
|
9400
|
+
actualLiquidityAndFeeYWithdrawn: BN;
|
|
9454
9401
|
}
|
|
9455
9402
|
interface CreateRebalancePositionParams {
|
|
9456
9403
|
program: Program<LbClmm>;
|
|
@@ -9462,109 +9409,109 @@ interface CreateRebalancePositionParams {
|
|
|
9462
9409
|
}
|
|
9463
9410
|
declare class RebalancePosition {
|
|
9464
9411
|
address: PublicKey;
|
|
9465
|
-
lowerBinId: BN
|
|
9466
|
-
upperBinId: BN
|
|
9412
|
+
lowerBinId: BN;
|
|
9413
|
+
upperBinId: BN;
|
|
9467
9414
|
lbPair: LbPair;
|
|
9468
9415
|
owner: PublicKey;
|
|
9469
9416
|
shouldClaimFee: boolean;
|
|
9470
9417
|
shouldClaimReward: boolean;
|
|
9471
9418
|
rebalancePositionBinData: RebalancePositionBinData[];
|
|
9472
9419
|
activeBin: Bin | null;
|
|
9473
|
-
currentTimestamp: BN
|
|
9474
|
-
constructor(positionAddress: PublicKey, positionData: PositionData, lbPair: LbPair, activeBin: Bin | null, shouldClaimFee: boolean, shouldClaimReward: boolean, currentTimestamp: BN
|
|
9420
|
+
currentTimestamp: BN;
|
|
9421
|
+
constructor(positionAddress: PublicKey, positionData: PositionData, lbPair: LbPair, activeBin: Bin | null, shouldClaimFee: boolean, shouldClaimReward: boolean, currentTimestamp: BN);
|
|
9475
9422
|
static create(params: CreateRebalancePositionParams): Promise<RebalancePosition>;
|
|
9476
|
-
_simulateDeposit(binStep: BN
|
|
9423
|
+
_simulateDeposit(binStep: BN, tokenXDecimal: BN, tokenYDecimal: BN, deposits: RebalanceWithDeposit[], simulatedWithdrawResult: SimulateWithdrawResult): {
|
|
9477
9424
|
result: SimulateDepositResult;
|
|
9478
9425
|
depositParams: RebalanceAddLiquidityParam[];
|
|
9479
9426
|
};
|
|
9480
|
-
_simulateResize(depositMinBinId: BN
|
|
9427
|
+
_simulateResize(depositMinBinId: BN, depositMaxBinId: BN, binStep: BN, tokenXDecimal: BN, tokenYDecimal: BN): void;
|
|
9481
9428
|
_simulateWithdraw(withdraws: RebalanceWithWithdraw[]): {
|
|
9482
9429
|
result: SimulateWithdrawResult;
|
|
9483
9430
|
withdrawParams: RebalanceRemoveLiquidityParam[];
|
|
9484
9431
|
};
|
|
9485
|
-
simulateRebalance(connection: Connection, binStep: BN
|
|
9486
|
-
totalAmounts(): BN
|
|
9487
|
-
totalFeeAmounts(): BN
|
|
9488
|
-
totalRewardAmounts(): BN
|
|
9432
|
+
simulateRebalance(connection: Connection, binStep: BN, tokenXDecimal: BN, tokenYDecimal: BN, withdraws: RebalanceWithWithdraw[], deposits: RebalanceWithDeposit[]): Promise<SimulateRebalanceResp>;
|
|
9433
|
+
totalAmounts(): BN[];
|
|
9434
|
+
totalFeeAmounts(): BN[];
|
|
9435
|
+
totalRewardAmounts(): BN[];
|
|
9489
9436
|
}
|
|
9490
9437
|
interface RebalancePositionBinData {
|
|
9491
9438
|
binId: number;
|
|
9492
9439
|
price: string;
|
|
9493
9440
|
pricePerToken: string;
|
|
9494
|
-
amountX: BN
|
|
9495
|
-
amountY: BN
|
|
9496
|
-
claimableRewardAmount: BN
|
|
9497
|
-
claimableFeeXAmount: BN
|
|
9498
|
-
claimableFeeYAmount: BN
|
|
9441
|
+
amountX: BN;
|
|
9442
|
+
amountY: BN;
|
|
9443
|
+
claimableRewardAmount: BN[];
|
|
9444
|
+
claimableFeeXAmount: BN;
|
|
9445
|
+
claimableFeeYAmount: BN;
|
|
9499
9446
|
}
|
|
9500
9447
|
interface RebalanceWithDeposit {
|
|
9501
|
-
minDeltaId: BN
|
|
9502
|
-
maxDeltaId: BN
|
|
9503
|
-
x0: BN
|
|
9504
|
-
y0: BN
|
|
9505
|
-
deltaX: BN
|
|
9506
|
-
deltaY: BN
|
|
9448
|
+
minDeltaId: BN;
|
|
9449
|
+
maxDeltaId: BN;
|
|
9450
|
+
x0: BN;
|
|
9451
|
+
y0: BN;
|
|
9452
|
+
deltaX: BN;
|
|
9453
|
+
deltaY: BN;
|
|
9507
9454
|
favorXInActiveBin: boolean;
|
|
9508
9455
|
}
|
|
9509
9456
|
interface RebalanceWithWithdraw {
|
|
9510
|
-
minBinId: BN
|
|
9511
|
-
maxBinId: BN
|
|
9512
|
-
bps: BN
|
|
9457
|
+
minBinId: BN | null;
|
|
9458
|
+
maxBinId: BN | null;
|
|
9459
|
+
bps: BN;
|
|
9513
9460
|
}
|
|
9514
9461
|
interface SimulateRebalanceResp {
|
|
9515
|
-
amountXDeposited: BN
|
|
9516
|
-
amountYDeposited: BN
|
|
9517
|
-
actualAmountXDeposited: BN
|
|
9518
|
-
actualAmountYDeposited: BN
|
|
9519
|
-
actualAmountXWithdrawn: BN
|
|
9520
|
-
actualAmountYWithdrawn: BN
|
|
9521
|
-
rewardAmountsClaimed: BN
|
|
9462
|
+
amountXDeposited: BN;
|
|
9463
|
+
amountYDeposited: BN;
|
|
9464
|
+
actualAmountXDeposited: BN;
|
|
9465
|
+
actualAmountYDeposited: BN;
|
|
9466
|
+
actualAmountXWithdrawn: BN;
|
|
9467
|
+
actualAmountYWithdrawn: BN;
|
|
9468
|
+
rewardAmountsClaimed: BN[];
|
|
9522
9469
|
depositParams: RebalanceAddLiquidityParam[];
|
|
9523
9470
|
withdrawParams: RebalanceRemoveLiquidityParam[];
|
|
9524
|
-
rentalCostLamports: BN
|
|
9471
|
+
rentalCostLamports: BN;
|
|
9525
9472
|
}
|
|
9526
9473
|
declare function getRebalanceBinArrayIndexesAndBitmapCoverage(adds: RebalanceAddLiquidityParam[], removes: RebalanceRemoveLiquidityParam[], activeId: number, pairAddress: PublicKey, programId: PublicKey): {
|
|
9527
|
-
binArrayIndexes: BN
|
|
9474
|
+
binArrayIndexes: BN[];
|
|
9528
9475
|
binArrayBitmap: PublicKey;
|
|
9529
9476
|
};
|
|
9530
9477
|
|
|
9531
9478
|
interface LiquidityStrategyParameters {
|
|
9532
|
-
x0: BN
|
|
9533
|
-
y0: BN
|
|
9534
|
-
deltaX: BN
|
|
9535
|
-
deltaY: BN
|
|
9479
|
+
x0: BN;
|
|
9480
|
+
y0: BN;
|
|
9481
|
+
deltaX: BN;
|
|
9482
|
+
deltaY: BN;
|
|
9536
9483
|
}
|
|
9537
9484
|
interface BidAskParameters {
|
|
9538
|
-
base: BN
|
|
9539
|
-
delta: BN
|
|
9485
|
+
base: BN;
|
|
9486
|
+
delta: BN;
|
|
9540
9487
|
}
|
|
9541
9488
|
interface LiquidityStrategyParameterBuilder {
|
|
9542
|
-
findXParameters(amountX: BN
|
|
9543
|
-
findYParameters(amountY: BN
|
|
9544
|
-
suggestBalancedXParametersFromY(activeId: BN
|
|
9545
|
-
amountX: BN
|
|
9489
|
+
findXParameters(amountX: BN, minDeltaId: BN, maxDeltaId: BN, binStep: BN, activeId: BN): BidAskParameters;
|
|
9490
|
+
findYParameters(amountY: BN, minDeltaId: BN, maxDeltaId: BN, activeId: BN): BidAskParameters;
|
|
9491
|
+
suggestBalancedXParametersFromY(activeId: BN, binStep: BN, favorXInActiveBin: boolean, minDeltaId: BN, maxDeltaId: BN, amountY: BN): BidAskParameters & {
|
|
9492
|
+
amountX: BN;
|
|
9546
9493
|
};
|
|
9547
|
-
suggestBalancedYParametersFromX(activeId: BN
|
|
9548
|
-
amountY: BN
|
|
9494
|
+
suggestBalancedYParametersFromX(activeId: BN, binStep: BN, favorXInActiveBin: boolean, minDeltaId: BN, maxDeltaId: BN, amountXInQuoteValue: BN): BidAskParameters & {
|
|
9495
|
+
amountY: BN;
|
|
9549
9496
|
};
|
|
9550
9497
|
}
|
|
9551
9498
|
declare function getLiquidityStrategyParameterBuilder(strategyType: StrategyType): LiquidityStrategyParameterBuilder;
|
|
9552
|
-
declare function suggestBalancedXParametersFromY(y0: BN
|
|
9553
|
-
amountX: BN
|
|
9499
|
+
declare function suggestBalancedXParametersFromY(y0: BN, deltaY: BN, minDeltaId: BN, maxDeltaId: BN, activeId: BN, binStep: BN, favorXInActiveBin: boolean, builder: LiquidityStrategyParameterBuilder): BidAskParameters & {
|
|
9500
|
+
amountX: BN;
|
|
9554
9501
|
};
|
|
9555
9502
|
declare function getAutoFillAmountByRebalancedPosition(rebalancePosition: RebalancePosition, strategyType: StrategyType): {
|
|
9556
|
-
amount: BN
|
|
9503
|
+
amount: BN;
|
|
9557
9504
|
isBidSide: boolean;
|
|
9558
9505
|
};
|
|
9559
|
-
declare function suggestBalancedYParametersFromX(x0: BN
|
|
9560
|
-
amountY: BN
|
|
9506
|
+
declare function suggestBalancedYParametersFromX(x0: BN, deltaX: BN, minDeltaId: BN, maxDeltaId: BN, activeId: BN, binStep: BN, favorXInActiveBin: boolean, builder: LiquidityStrategyParameterBuilder): BidAskParameters & {
|
|
9507
|
+
amountY: BN;
|
|
9561
9508
|
};
|
|
9562
|
-
declare function buildLiquidityStrategyParameters(amountX: BN
|
|
9509
|
+
declare function buildLiquidityStrategyParameters(amountX: BN, amountY: BN, minDeltaId: BN, maxDeltaId: BN, binStep: BN, favorXInActiveId: boolean, activeId: BN, strategyParameterBuilder: LiquidityStrategyParameterBuilder): LiquidityStrategyParameters;
|
|
9563
9510
|
|
|
9564
9511
|
interface BinAndAmount {
|
|
9565
9512
|
binId: number;
|
|
9566
|
-
xAmountBpsOfTotal: BN;
|
|
9567
|
-
yAmountBpsOfTotal: BN;
|
|
9513
|
+
xAmountBpsOfTotal: BN$1;
|
|
9514
|
+
yAmountBpsOfTotal: BN$1;
|
|
9568
9515
|
}
|
|
9569
9516
|
interface TokenReserve {
|
|
9570
9517
|
publicKey: PublicKey;
|
|
@@ -9639,12 +9586,12 @@ interface EmissionRate {
|
|
|
9639
9586
|
rewardTwo: Decimal | undefined;
|
|
9640
9587
|
}
|
|
9641
9588
|
interface SwapFee {
|
|
9642
|
-
feeX: BN;
|
|
9643
|
-
feeY: BN;
|
|
9589
|
+
feeX: BN$1;
|
|
9590
|
+
feeY: BN$1;
|
|
9644
9591
|
}
|
|
9645
9592
|
interface LMRewards {
|
|
9646
|
-
rewardOne: BN;
|
|
9647
|
-
rewardTwo: BN;
|
|
9593
|
+
rewardOne: BN$1;
|
|
9594
|
+
rewardTwo: BN$1;
|
|
9648
9595
|
}
|
|
9649
9596
|
declare enum PositionVersion {
|
|
9650
9597
|
V1 = 0,
|
|
@@ -9702,16 +9649,16 @@ interface TQuoteCreatePositionParams {
|
|
|
9702
9649
|
}
|
|
9703
9650
|
interface TInitializePositionAndAddLiquidityParams {
|
|
9704
9651
|
positionPubKey: PublicKey;
|
|
9705
|
-
totalXAmount: BN;
|
|
9706
|
-
totalYAmount: BN;
|
|
9652
|
+
totalXAmount: BN$1;
|
|
9653
|
+
totalYAmount: BN$1;
|
|
9707
9654
|
xYAmountDistribution: BinAndAmount[];
|
|
9708
9655
|
user: PublicKey;
|
|
9709
9656
|
slippage?: number;
|
|
9710
9657
|
}
|
|
9711
9658
|
interface TInitializePositionAndAddLiquidityParamsByStrategy {
|
|
9712
9659
|
positionPubKey: PublicKey;
|
|
9713
|
-
totalXAmount: BN;
|
|
9714
|
-
totalYAmount: BN;
|
|
9660
|
+
totalXAmount: BN$1;
|
|
9661
|
+
totalYAmount: BN$1;
|
|
9715
9662
|
strategy: StrategyParameters;
|
|
9716
9663
|
user: PublicKey;
|
|
9717
9664
|
slippage?: number;
|
|
@@ -9732,8 +9679,8 @@ interface InitializeMultiplePositionAndAddLiquidityByStrategyResponse2 {
|
|
|
9732
9679
|
lookupTableAddress?: PublicKey;
|
|
9733
9680
|
}
|
|
9734
9681
|
interface TInitializeMultiplePositionAndAddLiquidityParamsByStrategy {
|
|
9735
|
-
totalXAmount: BN;
|
|
9736
|
-
totalYAmount: BN;
|
|
9682
|
+
totalXAmount: BN$1;
|
|
9683
|
+
totalYAmount: BN$1;
|
|
9737
9684
|
strategy: StrategyParameters;
|
|
9738
9685
|
user: PublicKey;
|
|
9739
9686
|
slippage?: number;
|
|
@@ -9741,37 +9688,37 @@ interface TInitializeMultiplePositionAndAddLiquidityParamsByStrategy {
|
|
|
9741
9688
|
}
|
|
9742
9689
|
interface BinLiquidity {
|
|
9743
9690
|
binId: number;
|
|
9744
|
-
xAmount: BN;
|
|
9745
|
-
yAmount: BN;
|
|
9746
|
-
supply: BN;
|
|
9691
|
+
xAmount: BN$1;
|
|
9692
|
+
yAmount: BN$1;
|
|
9693
|
+
supply: BN$1;
|
|
9747
9694
|
version: number;
|
|
9748
9695
|
price: string;
|
|
9749
9696
|
pricePerToken: string;
|
|
9750
|
-
feeAmountXPerTokenStored: BN;
|
|
9751
|
-
feeAmountYPerTokenStored: BN;
|
|
9752
|
-
rewardPerTokenStored: BN[];
|
|
9697
|
+
feeAmountXPerTokenStored: BN$1;
|
|
9698
|
+
feeAmountYPerTokenStored: BN$1;
|
|
9699
|
+
rewardPerTokenStored: BN$1[];
|
|
9753
9700
|
}
|
|
9754
9701
|
declare namespace BinLiquidity {
|
|
9755
9702
|
function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity;
|
|
9756
9703
|
function empty(binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity;
|
|
9757
9704
|
}
|
|
9758
9705
|
interface SwapQuote {
|
|
9759
|
-
consumedInAmount: BN;
|
|
9760
|
-
outAmount: BN;
|
|
9761
|
-
fee: BN;
|
|
9762
|
-
protocolFee: BN;
|
|
9763
|
-
minOutAmount: BN;
|
|
9706
|
+
consumedInAmount: BN$1;
|
|
9707
|
+
outAmount: BN$1;
|
|
9708
|
+
fee: BN$1;
|
|
9709
|
+
protocolFee: BN$1;
|
|
9710
|
+
minOutAmount: BN$1;
|
|
9764
9711
|
priceImpact: Decimal;
|
|
9765
9712
|
binArraysPubkey: any[];
|
|
9766
9713
|
endPrice: Decimal;
|
|
9767
9714
|
}
|
|
9768
9715
|
interface SwapQuoteExactOut {
|
|
9769
|
-
inAmount: BN;
|
|
9770
|
-
outAmount: BN;
|
|
9771
|
-
fee: BN;
|
|
9716
|
+
inAmount: BN$1;
|
|
9717
|
+
outAmount: BN$1;
|
|
9718
|
+
fee: BN$1;
|
|
9772
9719
|
priceImpact: Decimal;
|
|
9773
|
-
protocolFee: BN;
|
|
9774
|
-
maxInAmount: BN;
|
|
9720
|
+
protocolFee: BN$1;
|
|
9721
|
+
maxInAmount: BN$1;
|
|
9775
9722
|
binArraysPubkey: any[];
|
|
9776
9723
|
}
|
|
9777
9724
|
interface IAccountsCache {
|
|
@@ -9796,22 +9743,22 @@ interface PositionData {
|
|
|
9796
9743
|
totalXAmount: string;
|
|
9797
9744
|
totalYAmount: string;
|
|
9798
9745
|
positionBinData: PositionBinData[];
|
|
9799
|
-
lastUpdatedAt: BN;
|
|
9746
|
+
lastUpdatedAt: BN$1;
|
|
9800
9747
|
upperBinId: number;
|
|
9801
9748
|
lowerBinId: number;
|
|
9802
|
-
feeX: BN;
|
|
9803
|
-
feeY: BN;
|
|
9804
|
-
rewardOne: BN;
|
|
9805
|
-
rewardTwo: BN;
|
|
9749
|
+
feeX: BN$1;
|
|
9750
|
+
feeY: BN$1;
|
|
9751
|
+
rewardOne: BN$1;
|
|
9752
|
+
rewardTwo: BN$1;
|
|
9806
9753
|
feeOwner: PublicKey;
|
|
9807
|
-
totalClaimedFeeXAmount: BN;
|
|
9808
|
-
totalClaimedFeeYAmount: BN;
|
|
9809
|
-
feeXExcludeTransferFee: BN;
|
|
9810
|
-
feeYExcludeTransferFee: BN;
|
|
9811
|
-
rewardOneExcludeTransferFee: BN;
|
|
9812
|
-
rewardTwoExcludeTransferFee: BN;
|
|
9813
|
-
totalXAmountExcludeTransferFee: BN;
|
|
9814
|
-
totalYAmountExcludeTransferFee: BN;
|
|
9754
|
+
totalClaimedFeeXAmount: BN$1;
|
|
9755
|
+
totalClaimedFeeYAmount: BN$1;
|
|
9756
|
+
feeXExcludeTransferFee: BN$1;
|
|
9757
|
+
feeYExcludeTransferFee: BN$1;
|
|
9758
|
+
rewardOneExcludeTransferFee: BN$1;
|
|
9759
|
+
rewardTwoExcludeTransferFee: BN$1;
|
|
9760
|
+
totalXAmountExcludeTransferFee: BN$1;
|
|
9761
|
+
totalYAmountExcludeTransferFee: BN$1;
|
|
9815
9762
|
owner: PublicKey;
|
|
9816
9763
|
}
|
|
9817
9764
|
interface SwapWithPriceImpactParams {
|
|
@@ -9826,11 +9773,11 @@ interface SwapWithPriceImpactParams {
|
|
|
9826
9773
|
/**
|
|
9827
9774
|
* in token amount
|
|
9828
9775
|
*/
|
|
9829
|
-
inAmount: BN;
|
|
9776
|
+
inAmount: BN$1;
|
|
9830
9777
|
/**
|
|
9831
9778
|
* price impact in bps
|
|
9832
9779
|
*/
|
|
9833
|
-
priceImpact: BN;
|
|
9780
|
+
priceImpact: BN$1;
|
|
9834
9781
|
/**
|
|
9835
9782
|
* desired lbPair to swap against
|
|
9836
9783
|
*/
|
|
@@ -9853,11 +9800,11 @@ interface SwapParams {
|
|
|
9853
9800
|
/**
|
|
9854
9801
|
* in token amount
|
|
9855
9802
|
*/
|
|
9856
|
-
inAmount: BN;
|
|
9803
|
+
inAmount: BN$1;
|
|
9857
9804
|
/**
|
|
9858
9805
|
* minimum out with slippage
|
|
9859
9806
|
*/
|
|
9860
|
-
minOutAmount: BN;
|
|
9807
|
+
minOutAmount: BN$1;
|
|
9861
9808
|
/**
|
|
9862
9809
|
* desired lbPair to swap against
|
|
9863
9810
|
*/
|
|
@@ -9880,11 +9827,11 @@ interface SwapExactOutParams {
|
|
|
9880
9827
|
/**
|
|
9881
9828
|
* out token amount
|
|
9882
9829
|
*/
|
|
9883
|
-
outAmount: BN;
|
|
9830
|
+
outAmount: BN$1;
|
|
9884
9831
|
/**
|
|
9885
9832
|
* maximum in amount, also known as slippage
|
|
9886
9833
|
*/
|
|
9887
|
-
maxInAmount: BN;
|
|
9834
|
+
maxInAmount: BN$1;
|
|
9888
9835
|
/**
|
|
9889
9836
|
* desired lbPair to swap against
|
|
9890
9837
|
*/
|
|
@@ -9914,19 +9861,19 @@ interface SeedLiquiditySingleBinResponse {
|
|
|
9914
9861
|
costBreakdown: SeedLiquidityCostBreakdown;
|
|
9915
9862
|
}
|
|
9916
9863
|
interface SeedLiquidityCostBreakdown {
|
|
9917
|
-
tokenOwnerProveAssociatedTokenAccountLamports: BN;
|
|
9918
|
-
totalPositionLamports: BN;
|
|
9919
|
-
totalBinArraysLamports: BN;
|
|
9920
|
-
totalPositionCount: BN;
|
|
9921
|
-
totalBinArraysCount: BN;
|
|
9922
|
-
binArrayBitmapLamports: BN;
|
|
9864
|
+
tokenOwnerProveAssociatedTokenAccountLamports: BN$1;
|
|
9865
|
+
totalPositionLamports: BN$1;
|
|
9866
|
+
totalBinArraysLamports: BN$1;
|
|
9867
|
+
totalPositionCount: BN$1;
|
|
9868
|
+
totalBinArraysCount: BN$1;
|
|
9869
|
+
binArrayBitmapLamports: BN$1;
|
|
9923
9870
|
}
|
|
9924
9871
|
interface Clock {
|
|
9925
|
-
slot: BN;
|
|
9926
|
-
epochStartTimestamp: BN;
|
|
9927
|
-
epoch: BN;
|
|
9928
|
-
leaderScheduleEpoch: BN;
|
|
9929
|
-
unixTimestamp: BN;
|
|
9872
|
+
slot: BN$1;
|
|
9873
|
+
epochStartTimestamp: BN$1;
|
|
9874
|
+
epoch: BN$1;
|
|
9875
|
+
leaderScheduleEpoch: BN$1;
|
|
9876
|
+
unixTimestamp: BN$1;
|
|
9930
9877
|
}
|
|
9931
9878
|
declare const ClockLayout: any;
|
|
9932
9879
|
declare enum PairStatus {
|
|
@@ -9965,14 +9912,14 @@ interface RebalancePositionBinArrayRentalCostQuote {
|
|
|
9965
9912
|
declare const REBALANCE_POSITION_PADDING: any[];
|
|
9966
9913
|
|
|
9967
9914
|
/** private */
|
|
9968
|
-
declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN): boolean;
|
|
9915
|
+
declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN$1): boolean;
|
|
9969
9916
|
declare function deriveBinArrayBitmapExtension(lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9970
|
-
declare function binIdToBinArrayIndex(binId: BN): BN;
|
|
9971
|
-
declare function getBinArrayLowerUpperBinId(binArrayIndex: BN): BN[];
|
|
9972
|
-
declare function isBinIdWithinBinArray(activeId: BN, binArrayIndex: BN): boolean;
|
|
9917
|
+
declare function binIdToBinArrayIndex(binId: BN$1): BN$1;
|
|
9918
|
+
declare function getBinArrayLowerUpperBinId(binArrayIndex: BN$1): BN$1[];
|
|
9919
|
+
declare function isBinIdWithinBinArray(activeId: BN$1, binArrayIndex: BN$1): boolean;
|
|
9973
9920
|
declare function getBinFromBinArray(binId: number, binArray: BinArray): Bin;
|
|
9974
|
-
declare function findNextBinArrayIndexWithLiquidity(swapForY: boolean, activeId: BN, lbPairState: LbPair, binArrayBitmapExtension: BinArrayBitmapExtension | null): BN | null;
|
|
9975
|
-
declare function findNextBinArrayWithLiquidity(swapForY: boolean, activeBinId: BN, lbPairState: LbPair, binArrayBitmapExtension: BinArrayBitmapExtension | null, binArrays: BinArrayAccount[]): BinArrayAccount | null;
|
|
9921
|
+
declare function findNextBinArrayIndexWithLiquidity(swapForY: boolean, activeId: BN$1, lbPairState: LbPair, binArrayBitmapExtension: BinArrayBitmapExtension | null): BN$1 | null;
|
|
9922
|
+
declare function findNextBinArrayWithLiquidity(swapForY: boolean, activeBinId: BN$1, lbPairState: LbPair, binArrayBitmapExtension: BinArrayBitmapExtension | null, binArrays: BinArrayAccount[]): BinArrayAccount | null;
|
|
9976
9923
|
/**
|
|
9977
9924
|
* Retrieves the bin arrays required to initialize multiple positions in continuous range.
|
|
9978
9925
|
*
|
|
@@ -9981,27 +9928,27 @@ declare function findNextBinArrayWithLiquidity(swapForY: boolean, activeBinId: B
|
|
|
9981
9928
|
* @param {BN} toBinId - The ending bin ID.
|
|
9982
9929
|
* @return {[{key: PublicKey, index: BN }]} An array of bin arrays required for the given position range.
|
|
9983
9930
|
*/
|
|
9984
|
-
declare function getBinArraysRequiredByPositionRange(pair: PublicKey, fromBinId: BN, toBinId: BN, programId: PublicKey): {
|
|
9931
|
+
declare function getBinArraysRequiredByPositionRange(pair: PublicKey, fromBinId: BN$1, toBinId: BN$1, programId: PublicKey): {
|
|
9985
9932
|
key: PublicKey;
|
|
9986
|
-
index: BN;
|
|
9933
|
+
index: BN$1;
|
|
9987
9934
|
}[];
|
|
9988
9935
|
declare function enumerateBins(binsById: Map<number, Bin>, lowerBinId: number, upperBinId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): Generator<BinLiquidity, void, unknown>;
|
|
9989
|
-
declare function getBinIdIndexInBinArray(binId: BN, lowerBinId: BN, upperBinId: BN): BN;
|
|
9990
|
-
declare function updateBinArray(activeId: BN, clock: Clock, allRewardInfos: RewardInfos, binArray: BinArray): {
|
|
9991
|
-
index: BN;
|
|
9936
|
+
declare function getBinIdIndexInBinArray(binId: BN$1, lowerBinId: BN$1, upperBinId: BN$1): BN$1;
|
|
9937
|
+
declare function updateBinArray(activeId: BN$1, clock: Clock, allRewardInfos: RewardInfos, binArray: BinArray): {
|
|
9938
|
+
index: BN$1;
|
|
9992
9939
|
version: number;
|
|
9993
9940
|
padding1: number[];
|
|
9994
9941
|
lbPair: PublicKey;
|
|
9995
9942
|
bins: {
|
|
9996
|
-
amountX: BN;
|
|
9997
|
-
amountY: BN;
|
|
9998
|
-
price: BN;
|
|
9999
|
-
liquiditySupply: BN;
|
|
10000
|
-
functionBytes: BN[];
|
|
10001
|
-
feeAmountXPerTokenStored: BN;
|
|
10002
|
-
feeAmountYPerTokenStored: BN;
|
|
10003
|
-
padding0: BN;
|
|
10004
|
-
padding1: BN;
|
|
9943
|
+
amountX: BN$1;
|
|
9944
|
+
amountY: BN$1;
|
|
9945
|
+
price: BN$1;
|
|
9946
|
+
liquiditySupply: BN$1;
|
|
9947
|
+
functionBytes: BN$1[];
|
|
9948
|
+
feeAmountXPerTokenStored: BN$1;
|
|
9949
|
+
feeAmountYPerTokenStored: BN$1;
|
|
9950
|
+
padding0: BN$1;
|
|
9951
|
+
padding1: BN$1;
|
|
10005
9952
|
}[];
|
|
10006
9953
|
};
|
|
10007
9954
|
declare function binDeltaToMinMaxBinId(binDelta: number, activeBinId: number): {
|
|
@@ -10010,49 +9957,49 @@ declare function binDeltaToMinMaxBinId(binDelta: number, activeBinId: number): {
|
|
|
10010
9957
|
};
|
|
10011
9958
|
|
|
10012
9959
|
/** private */
|
|
10013
|
-
declare function derivePresetParameterWithIndex(index: BN, programId: PublicKey): [PublicKey, number];
|
|
9960
|
+
declare function derivePresetParameterWithIndex(index: BN$1, programId: PublicKey): [PublicKey, number];
|
|
10014
9961
|
declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
10015
9962
|
/**
|
|
10016
9963
|
*
|
|
10017
9964
|
* @deprecated Use derivePresetParameter2
|
|
10018
9965
|
*/
|
|
10019
|
-
declare function derivePresetParameter(binStep: BN, programId: PublicKey): [PublicKey, number];
|
|
10020
|
-
declare function derivePresetParameter2(binStep: BN, baseFactor: BN, programId: PublicKey): [PublicKey, number];
|
|
10021
|
-
declare function deriveLbPair2(tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, programId: PublicKey): [PublicKey, number];
|
|
9966
|
+
declare function derivePresetParameter(binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9967
|
+
declare function derivePresetParameter2(binStep: BN$1, baseFactor: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9968
|
+
declare function deriveLbPair2(tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, baseFactor: BN$1, programId: PublicKey): [PublicKey, number];
|
|
10022
9969
|
/**
|
|
10023
9970
|
*
|
|
10024
9971
|
* @deprecated Use deriveLbPair2
|
|
10025
9972
|
*/
|
|
10026
|
-
declare function deriveLbPair(tokenX: PublicKey, tokenY: PublicKey, binStep: BN, programId: PublicKey): [PublicKey, number];
|
|
9973
|
+
declare function deriveLbPair(tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
10027
9974
|
declare function deriveCustomizablePermissionlessLbPair(tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
10028
|
-
declare function derivePermissionLbPair(baseKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, programId: PublicKey): [PublicKey, number];
|
|
9975
|
+
declare function derivePermissionLbPair(baseKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
10029
9976
|
declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
10030
|
-
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN, width: BN, programId: PublicKey): [PublicKey, number];
|
|
10031
|
-
declare function deriveBinArray(lbPair: PublicKey, index: BN, programId: PublicKey): [PublicKey, number];
|
|
9977
|
+
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN$1, width: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9978
|
+
declare function deriveBinArray(lbPair: PublicKey, index: BN$1, programId: PublicKey): [PublicKey, number];
|
|
10032
9979
|
declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
10033
9980
|
declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
10034
9981
|
declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number];
|
|
10035
|
-
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN, programId: PublicKey): [PublicKey, number];
|
|
9982
|
+
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN$1, programId: PublicKey): [PublicKey, number];
|
|
10036
9983
|
declare function derivePlaceHolderAccountMeta(programId: PublicKey): AccountMeta;
|
|
10037
9984
|
declare function deriveOperator(whitelistedSigner: PublicKey, programId: PublicKey): PublicKey;
|
|
10038
9985
|
|
|
10039
|
-
declare function getBaseFee(binStep: number, sParameter: sParameters): BN;
|
|
10040
|
-
declare function getVariableFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN;
|
|
10041
|
-
declare function getTotalFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN;
|
|
10042
|
-
declare function computeFee(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN): BN;
|
|
10043
|
-
declare function computeFeeFromAmount(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmountWithFees: BN): BN;
|
|
10044
|
-
declare function computeProtocolFee(feeAmount: BN, sParameter: sParameters): BN;
|
|
10045
|
-
declare function swapExactOutQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, outAmount: BN, swapForY: boolean): {
|
|
10046
|
-
amountIn: BN;
|
|
10047
|
-
amountOut: BN;
|
|
10048
|
-
fee: BN;
|
|
10049
|
-
protocolFee: BN;
|
|
9986
|
+
declare function getBaseFee(binStep: number, sParameter: sParameters): BN$1;
|
|
9987
|
+
declare function getVariableFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN$1;
|
|
9988
|
+
declare function getTotalFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN$1;
|
|
9989
|
+
declare function computeFee(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1): BN$1;
|
|
9990
|
+
declare function computeFeeFromAmount(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmountWithFees: BN$1): BN$1;
|
|
9991
|
+
declare function computeProtocolFee(feeAmount: BN$1, sParameter: sParameters): BN$1;
|
|
9992
|
+
declare function swapExactOutQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, outAmount: BN$1, swapForY: boolean): {
|
|
9993
|
+
amountIn: BN$1;
|
|
9994
|
+
amountOut: BN$1;
|
|
9995
|
+
fee: BN$1;
|
|
9996
|
+
protocolFee: BN$1;
|
|
10050
9997
|
};
|
|
10051
|
-
declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN, swapForY: boolean): {
|
|
10052
|
-
amountIn: BN;
|
|
10053
|
-
amountOut: BN;
|
|
10054
|
-
fee: BN;
|
|
10055
|
-
protocolFee: BN;
|
|
9998
|
+
declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1, swapForY: boolean): {
|
|
9999
|
+
amountIn: BN$1;
|
|
10000
|
+
amountOut: BN$1;
|
|
10001
|
+
fee: BN$1;
|
|
10002
|
+
protocolFee: BN$1;
|
|
10056
10003
|
};
|
|
10057
10004
|
|
|
10058
10005
|
/**
|
|
@@ -10075,27 +10022,27 @@ declare function getTokenProgramId(lbPairState: LbPair): {
|
|
|
10075
10022
|
|
|
10076
10023
|
interface IPosition {
|
|
10077
10024
|
address(): PublicKey;
|
|
10078
|
-
lowerBinId(): BN
|
|
10079
|
-
upperBinId(): BN
|
|
10080
|
-
liquidityShares(): BN
|
|
10025
|
+
lowerBinId(): BN;
|
|
10026
|
+
upperBinId(): BN;
|
|
10027
|
+
liquidityShares(): BN[];
|
|
10081
10028
|
rewardInfos(): UserRewardInfo[];
|
|
10082
10029
|
feeInfos(): UserFeeInfo[];
|
|
10083
|
-
lastUpdatedAt(): BN
|
|
10030
|
+
lastUpdatedAt(): BN;
|
|
10084
10031
|
lbPair(): PublicKey;
|
|
10085
|
-
totalClaimedFeeXAmount(): BN
|
|
10086
|
-
totalClaimedFeeYAmount(): BN
|
|
10087
|
-
totalClaimedRewards(): BN
|
|
10032
|
+
totalClaimedFeeXAmount(): BN;
|
|
10033
|
+
totalClaimedFeeYAmount(): BN;
|
|
10034
|
+
totalClaimedRewards(): BN[];
|
|
10088
10035
|
operator(): PublicKey;
|
|
10089
|
-
lockReleasePoint(): BN
|
|
10036
|
+
lockReleasePoint(): BN;
|
|
10090
10037
|
feeOwner(): PublicKey;
|
|
10091
10038
|
owner(): PublicKey;
|
|
10092
|
-
getBinArrayIndexesCoverage(): BN
|
|
10039
|
+
getBinArrayIndexesCoverage(): BN[];
|
|
10093
10040
|
getBinArrayKeysCoverage(programId: PublicKey): PublicKey[];
|
|
10094
10041
|
version(): PositionVersion;
|
|
10095
|
-
width(): BN
|
|
10042
|
+
width(): BN;
|
|
10096
10043
|
}
|
|
10097
10044
|
interface CombinedPositionBinData {
|
|
10098
|
-
liquidityShares: BN
|
|
10045
|
+
liquidityShares: BN[];
|
|
10099
10046
|
rewardInfos: UserRewardInfo[];
|
|
10100
10047
|
feeInfos: UserFeeInfo[];
|
|
10101
10048
|
}
|
|
@@ -10107,32 +10054,32 @@ declare class PositionV2Wrapper implements IPosition {
|
|
|
10107
10054
|
combinedPositionBinData: CombinedPositionBinData;
|
|
10108
10055
|
constructor(positionAddress: PublicKey, inner: PositionV2, extended: ExtendedPositionBinData[], combinedPositionBinData: CombinedPositionBinData);
|
|
10109
10056
|
address(): PublicKey;
|
|
10110
|
-
totalClaimedRewards(): BN
|
|
10057
|
+
totalClaimedRewards(): BN[];
|
|
10111
10058
|
feeOwner(): PublicKey;
|
|
10112
|
-
lockReleasePoint(): BN
|
|
10059
|
+
lockReleasePoint(): BN;
|
|
10113
10060
|
operator(): PublicKey;
|
|
10114
|
-
totalClaimedFeeYAmount(): BN
|
|
10115
|
-
totalClaimedFeeXAmount(): BN
|
|
10061
|
+
totalClaimedFeeYAmount(): BN;
|
|
10062
|
+
totalClaimedFeeXAmount(): BN;
|
|
10116
10063
|
lbPair(): PublicKey;
|
|
10117
|
-
lowerBinId(): BN
|
|
10118
|
-
upperBinId(): BN
|
|
10119
|
-
liquidityShares(): BN
|
|
10064
|
+
lowerBinId(): BN;
|
|
10065
|
+
upperBinId(): BN;
|
|
10066
|
+
liquidityShares(): BN[];
|
|
10120
10067
|
rewardInfos(): UserRewardInfo[];
|
|
10121
10068
|
feeInfos(): UserFeeInfo[];
|
|
10122
|
-
lastUpdatedAt(): BN
|
|
10123
|
-
getBinArrayIndexesCoverage(): BN
|
|
10069
|
+
lastUpdatedAt(): BN;
|
|
10070
|
+
getBinArrayIndexesCoverage(): BN[];
|
|
10124
10071
|
getBinArrayKeysCoverage(programId: PublicKey): PublicKey[];
|
|
10125
10072
|
version(): PositionVersion;
|
|
10126
10073
|
owner(): PublicKey;
|
|
10127
|
-
width(): BN
|
|
10074
|
+
width(): BN;
|
|
10128
10075
|
}
|
|
10129
10076
|
|
|
10130
|
-
declare function getBinArrayIndexesCoverage(lowerBinId: BN
|
|
10131
|
-
declare function getBinArrayKeysCoverage(lowerBinId: BN
|
|
10132
|
-
declare function getBinArrayAccountMetasCoverage(lowerBinId: BN
|
|
10077
|
+
declare function getBinArrayIndexesCoverage(lowerBinId: BN, upperBinId: BN): BN[];
|
|
10078
|
+
declare function getBinArrayKeysCoverage(lowerBinId: BN, upperBinId: BN, lbPair: PublicKey, programId: PublicKey): PublicKey[];
|
|
10079
|
+
declare function getBinArrayAccountMetasCoverage(lowerBinId: BN, upperBinId: BN, lbPair: PublicKey, programId: PublicKey): AccountMeta[];
|
|
10133
10080
|
declare function getPositionLowerUpperBinIdWithLiquidity(position: PositionData): {
|
|
10134
|
-
lowerBinId: BN
|
|
10135
|
-
upperBinId: BN
|
|
10081
|
+
lowerBinId: BN;
|
|
10082
|
+
upperBinId: BN;
|
|
10136
10083
|
} | null;
|
|
10137
10084
|
declare function isPositionNoFee(position: PositionData): boolean;
|
|
10138
10085
|
declare function isPositionNoReward(position: PositionData): boolean;
|
|
@@ -10166,13 +10113,13 @@ declare function chunkBinRange(minBinId: number, maxBinId: number): {
|
|
|
10166
10113
|
declare function chunkPositionBinRange(position: LbPosition, minBinId: number, maxBinId: number): {
|
|
10167
10114
|
minBinId: number;
|
|
10168
10115
|
maxBinId: number;
|
|
10169
|
-
amountX: BN
|
|
10170
|
-
amountY: BN
|
|
10171
|
-
feeXAmount: BN
|
|
10172
|
-
feeYAmount: BN
|
|
10173
|
-
rewardAmounts: BN
|
|
10116
|
+
amountX: BN;
|
|
10117
|
+
amountY: BN;
|
|
10118
|
+
feeXAmount: BN;
|
|
10119
|
+
feeYAmount: BN;
|
|
10120
|
+
rewardAmounts: BN[];
|
|
10174
10121
|
}[];
|
|
10175
|
-
declare function calculatePositionSize(binCount: BN
|
|
10122
|
+
declare function calculatePositionSize(binCount: BN): BN;
|
|
10176
10123
|
/**
|
|
10177
10124
|
* Get the minimum balance required to pay for the rent exemption of a
|
|
10178
10125
|
* position with the given bin count.
|
|
@@ -10181,7 +10128,7 @@ declare function calculatePositionSize(binCount: BN$1): BN$1;
|
|
|
10181
10128
|
* @param binCount The number of bins in the position.
|
|
10182
10129
|
* @returns The minimum balance required to pay for the rent exemption.
|
|
10183
10130
|
*/
|
|
10184
|
-
declare function getPositionRentExemption(connection: Connection, binCount: BN
|
|
10131
|
+
declare function getPositionRentExemption(connection: Connection, binCount: BN): Promise<number>;
|
|
10185
10132
|
/**
|
|
10186
10133
|
* Calculate the minimum lamports required to expand a position to a given
|
|
10187
10134
|
* width.
|
|
@@ -10197,7 +10144,7 @@ declare function getPositionRentExemption(connection: Connection, binCount: BN$1
|
|
|
10197
10144
|
* @returns The minimum lamports required to expand the position to the given
|
|
10198
10145
|
* width.
|
|
10199
10146
|
*/
|
|
10200
|
-
declare function getPositionExpandRentExemption(currentMinBinId: BN
|
|
10147
|
+
declare function getPositionExpandRentExemption(currentMinBinId: BN, currentMaxBinId: BN, connection: Connection, binCountToExpand: BN): Promise<number>;
|
|
10201
10148
|
/**
|
|
10202
10149
|
* Calculate the number of extended bins in a position.
|
|
10203
10150
|
*
|
|
@@ -10206,7 +10153,7 @@ declare function getPositionExpandRentExemption(currentMinBinId: BN$1, currentMa
|
|
|
10206
10153
|
* @returns The number of extended bins in the position. If the position width is
|
|
10207
10154
|
* less than or equal to the default bin count per position, returns 0.
|
|
10208
10155
|
*/
|
|
10209
|
-
declare function getExtendedPositionBinCount(minBinId: BN
|
|
10156
|
+
declare function getExtendedPositionBinCount(minBinId: BN, maxBinId: BN): BN;
|
|
10210
10157
|
/**
|
|
10211
10158
|
* Decode the extended position data.
|
|
10212
10159
|
*
|
|
@@ -10233,39 +10180,39 @@ declare function decodeExtendedPosition(base: PositionV2, program: Program<LbClm
|
|
|
10233
10180
|
* @param clock The clock info. Get from DLMM instance.
|
|
10234
10181
|
* @returns The distribution of liquidity.
|
|
10235
10182
|
*/
|
|
10236
|
-
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, strategyType: StrategyType, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
10183
|
+
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN$1, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, strategyType: StrategyType, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
10237
10184
|
binId: number;
|
|
10238
|
-
amountX: BN;
|
|
10239
|
-
amountY: BN;
|
|
10185
|
+
amountX: BN$1;
|
|
10186
|
+
amountY: BN$1;
|
|
10240
10187
|
}[];
|
|
10241
|
-
declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
|
|
10242
|
-
declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
|
|
10188
|
+
declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, minBinId: number, maxBinId: number, strategyType: StrategyType): BN$1;
|
|
10189
|
+
declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, minBinId: number, maxBinId: number, strategyType: StrategyType): BN$1;
|
|
10243
10190
|
declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): ProgramStrategyParameter;
|
|
10244
10191
|
|
|
10245
10192
|
declare function getPriceOfBinByBinId(binId: number, binStep: number): Decimal;
|
|
10246
10193
|
/** private */
|
|
10247
|
-
declare function toWeightDistribution(amountX: BN, amountY: BN, distributions: {
|
|
10194
|
+
declare function toWeightDistribution(amountX: BN$1, amountY: BN$1, distributions: {
|
|
10248
10195
|
binId: number;
|
|
10249
|
-
xAmountBpsOfTotal: BN;
|
|
10250
|
-
yAmountBpsOfTotal: BN;
|
|
10196
|
+
xAmountBpsOfTotal: BN$1;
|
|
10197
|
+
yAmountBpsOfTotal: BN$1;
|
|
10251
10198
|
}[], binStep: number): {
|
|
10252
10199
|
binId: number;
|
|
10253
10200
|
weight: number;
|
|
10254
10201
|
}[];
|
|
10255
10202
|
declare function calculateSpotDistribution(activeBin: number, binIds: number[]): {
|
|
10256
10203
|
binId: number;
|
|
10257
|
-
xAmountBpsOfTotal: BN;
|
|
10258
|
-
yAmountBpsOfTotal: BN;
|
|
10204
|
+
xAmountBpsOfTotal: BN$1;
|
|
10205
|
+
yAmountBpsOfTotal: BN$1;
|
|
10259
10206
|
}[];
|
|
10260
10207
|
declare function calculateBidAskDistribution(activeBin: number, binIds: number[]): {
|
|
10261
10208
|
binId: number;
|
|
10262
|
-
xAmountBpsOfTotal: BN;
|
|
10263
|
-
yAmountBpsOfTotal: BN;
|
|
10209
|
+
xAmountBpsOfTotal: BN$1;
|
|
10210
|
+
yAmountBpsOfTotal: BN$1;
|
|
10264
10211
|
}[];
|
|
10265
10212
|
declare function calculateNormalDistribution(activeBin: number, binIds: number[]): {
|
|
10266
10213
|
binId: number;
|
|
10267
|
-
xAmountBpsOfTotal: BN;
|
|
10268
|
-
yAmountBpsOfTotal: BN;
|
|
10214
|
+
xAmountBpsOfTotal: BN$1;
|
|
10215
|
+
yAmountBpsOfTotal: BN$1;
|
|
10269
10216
|
}[];
|
|
10270
10217
|
/**
|
|
10271
10218
|
* Converts a weight distribution into token amounts for one side (either bid or ask).
|
|
@@ -10279,12 +10226,12 @@ declare function calculateNormalDistribution(activeBin: number, binIds: number[]
|
|
|
10279
10226
|
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
10280
10227
|
* @returns An array of objects containing binId and amount for each bin.
|
|
10281
10228
|
*/
|
|
10282
|
-
declare function fromWeightDistributionToAmountOneSide(amount: BN, distributions: {
|
|
10229
|
+
declare function fromWeightDistributionToAmountOneSide(amount: BN$1, distributions: {
|
|
10283
10230
|
binId: number;
|
|
10284
10231
|
weight: number;
|
|
10285
10232
|
}[], binStep: number, activeId: number, depositForY: boolean, mint: Mint, clock: Clock): {
|
|
10286
10233
|
binId: number;
|
|
10287
|
-
amount: BN;
|
|
10234
|
+
amount: BN$1;
|
|
10288
10235
|
}[];
|
|
10289
10236
|
/**
|
|
10290
10237
|
* Converts a weight distribution into token amounts for both bid and ask sides.
|
|
@@ -10301,13 +10248,13 @@ declare function fromWeightDistributionToAmountOneSide(amount: BN, distributions
|
|
|
10301
10248
|
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
10302
10249
|
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
10303
10250
|
*/
|
|
10304
|
-
declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distributions: {
|
|
10251
|
+
declare function fromWeightDistributionToAmount(amountX: BN$1, amountY: BN$1, distributions: {
|
|
10305
10252
|
binId: number;
|
|
10306
10253
|
weight: number;
|
|
10307
|
-
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
10254
|
+
}[], binStep: number, activeId: number, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
10308
10255
|
binId: number;
|
|
10309
|
-
amountX: BN;
|
|
10310
|
-
amountY: BN;
|
|
10256
|
+
amountX: BN$1;
|
|
10257
|
+
amountY: BN$1;
|
|
10311
10258
|
}[];
|
|
10312
10259
|
|
|
10313
10260
|
/**
|
|
@@ -10319,12 +10266,12 @@ declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distri
|
|
|
10319
10266
|
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
10320
10267
|
* @returns array of {binId, amount} where amount is the amount of token Y in each bin
|
|
10321
10268
|
*/
|
|
10322
|
-
declare function toAmountBidSide(activeId: number, totalAmount: BN, distributions: {
|
|
10269
|
+
declare function toAmountBidSide(activeId: number, totalAmount: BN$1, distributions: {
|
|
10323
10270
|
binId: number;
|
|
10324
10271
|
weight: number;
|
|
10325
10272
|
}[], mintY: Mint, clock: Clock): {
|
|
10326
10273
|
binId: number;
|
|
10327
|
-
amount: BN;
|
|
10274
|
+
amount: BN$1;
|
|
10328
10275
|
}[];
|
|
10329
10276
|
/**
|
|
10330
10277
|
* Distribute totalAmount to all ask side bins according to given distributions.
|
|
@@ -10335,12 +10282,12 @@ declare function toAmountBidSide(activeId: number, totalAmount: BN, distribution
|
|
|
10335
10282
|
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
10336
10283
|
* @returns array of {binId, amount} where amount is the amount of token X in each bin
|
|
10337
10284
|
*/
|
|
10338
|
-
declare function toAmountAskSide(activeId: number, binStep: number, totalAmount: BN, distributions: {
|
|
10285
|
+
declare function toAmountAskSide(activeId: number, binStep: number, totalAmount: BN$1, distributions: {
|
|
10339
10286
|
binId: number;
|
|
10340
10287
|
weight: number;
|
|
10341
10288
|
}[], mintX: Mint, clock: Clock): {
|
|
10342
10289
|
binId: number;
|
|
10343
|
-
amount: BN;
|
|
10290
|
+
amount: BN$1;
|
|
10344
10291
|
}[];
|
|
10345
10292
|
/**
|
|
10346
10293
|
* Distributes the given amounts of tokens X and Y to both bid and ask side bins
|
|
@@ -10358,22 +10305,22 @@ declare function toAmountAskSide(activeId: number, binStep: number, totalAmount:
|
|
|
10358
10305
|
* @param clock - Clock instance. Get from DLMM instance.
|
|
10359
10306
|
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
10360
10307
|
*/
|
|
10361
|
-
declare function toAmountBothSide(activeId: number, binStep: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: {
|
|
10308
|
+
declare function toAmountBothSide(activeId: number, binStep: number, amountX: BN$1, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, distributions: {
|
|
10362
10309
|
binId: number;
|
|
10363
10310
|
weight: number;
|
|
10364
10311
|
}[], mintX: Mint, mintY: Mint, clock: Clock): {
|
|
10365
10312
|
binId: number;
|
|
10366
|
-
amountX: BN;
|
|
10367
|
-
amountY: BN;
|
|
10313
|
+
amountX: BN$1;
|
|
10314
|
+
amountY: BN$1;
|
|
10368
10315
|
}[];
|
|
10369
|
-
declare function autoFillYByWeight(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: {
|
|
10316
|
+
declare function autoFillYByWeight(activeId: number, binStep: number, amountX: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, distributions: {
|
|
10370
10317
|
binId: number;
|
|
10371
10318
|
weight: number;
|
|
10372
|
-
}[]): BN;
|
|
10373
|
-
declare function autoFillXByWeight(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: {
|
|
10319
|
+
}[]): BN$1;
|
|
10320
|
+
declare function autoFillXByWeight(activeId: number, binStep: number, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, distributions: {
|
|
10374
10321
|
binId: number;
|
|
10375
10322
|
weight: number;
|
|
10376
|
-
}[]): BN;
|
|
10323
|
+
}[]): BN$1;
|
|
10377
10324
|
|
|
10378
10325
|
declare function chunks<T>(array: T[], size: number): T[][];
|
|
10379
10326
|
declare function range<T>(min: number, max: number, mapfn: (i: number) => T): T[];
|
|
@@ -10397,7 +10344,7 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
10397
10344
|
volatilityReference: number;
|
|
10398
10345
|
indexReference: number;
|
|
10399
10346
|
padding: number[];
|
|
10400
|
-
lastUpdateTimestamp: BN;
|
|
10347
|
+
lastUpdateTimestamp: BN$1;
|
|
10401
10348
|
padding1: number[];
|
|
10402
10349
|
};
|
|
10403
10350
|
bumpSeed: number[];
|
|
@@ -10415,30 +10362,30 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
10415
10362
|
reserveX: PublicKey;
|
|
10416
10363
|
reserveY: PublicKey;
|
|
10417
10364
|
protocolFee: {
|
|
10418
|
-
amountX: BN;
|
|
10419
|
-
amountY: BN;
|
|
10365
|
+
amountX: BN$1;
|
|
10366
|
+
amountY: BN$1;
|
|
10420
10367
|
};
|
|
10421
10368
|
padding1: number[];
|
|
10422
10369
|
rewardInfos: {
|
|
10423
10370
|
mint: PublicKey;
|
|
10424
10371
|
vault: PublicKey;
|
|
10425
10372
|
funder: PublicKey;
|
|
10426
|
-
rewardDuration: BN;
|
|
10427
|
-
rewardDurationEnd: BN;
|
|
10428
|
-
rewardRate: BN;
|
|
10429
|
-
lastUpdateTime: BN;
|
|
10430
|
-
cumulativeSecondsWithEmptyLiquidityReward: BN;
|
|
10373
|
+
rewardDuration: BN$1;
|
|
10374
|
+
rewardDurationEnd: BN$1;
|
|
10375
|
+
rewardRate: BN$1;
|
|
10376
|
+
lastUpdateTime: BN$1;
|
|
10377
|
+
cumulativeSecondsWithEmptyLiquidityReward: BN$1;
|
|
10431
10378
|
}[];
|
|
10432
10379
|
oracle: PublicKey;
|
|
10433
|
-
binArrayBitmap: BN[];
|
|
10434
|
-
lastUpdatedAt: BN;
|
|
10380
|
+
binArrayBitmap: BN$1[];
|
|
10381
|
+
lastUpdatedAt: BN$1;
|
|
10435
10382
|
padding2: number[];
|
|
10436
10383
|
preActivationSwapAddress: PublicKey;
|
|
10437
10384
|
baseKey: PublicKey;
|
|
10438
|
-
activationPoint: BN;
|
|
10439
|
-
preActivationDuration: BN;
|
|
10385
|
+
activationPoint: BN$1;
|
|
10386
|
+
preActivationDuration: BN$1;
|
|
10440
10387
|
padding3: number[];
|
|
10441
|
-
padding4: BN;
|
|
10388
|
+
padding4: BN$1;
|
|
10442
10389
|
creator: PublicKey;
|
|
10443
10390
|
tokenMintXProgramFlag: number;
|
|
10444
10391
|
tokenMintYProgramFlag: number;
|
|
@@ -10447,10 +10394,10 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
10447
10394
|
}[]>;
|
|
10448
10395
|
declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{
|
|
10449
10396
|
lbPair: PublicKey;
|
|
10450
|
-
positiveBinArrayBitmap: BN[][];
|
|
10451
|
-
negativeBinArrayBitmap: BN[][];
|
|
10397
|
+
positiveBinArrayBitmap: BN$1[][];
|
|
10398
|
+
negativeBinArrayBitmap: BN$1[][];
|
|
10452
10399
|
}[]>;
|
|
10453
|
-
declare function getOutAmount(bin: Bin, inAmount: BN, swapForY: boolean): BN;
|
|
10400
|
+
declare function getOutAmount(bin: Bin, inAmount: BN$1, swapForY: boolean): BN$1;
|
|
10454
10401
|
declare function getTokenDecimals(conn: Connection, mint: PublicKey): Promise<number>;
|
|
10455
10402
|
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, programId?: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise<GetOrCreateATAResponse>;
|
|
10456
10403
|
declare function getTokenBalance(conn: Connection, tokenAccount: PublicKey): Promise<bigint>;
|
|
@@ -10518,7 +10465,7 @@ declare function getBinCount(minBinId: number, maxBinId: number): number;
|
|
|
10518
10465
|
* @returns The maximum amount of tokens after applying slippage. If the slippage is 100%, the maximum amount is U64_MAX.
|
|
10519
10466
|
*
|
|
10520
10467
|
**/
|
|
10521
|
-
declare function getSlippageMaxAmount(amount: BN, slippage: number): BN;
|
|
10468
|
+
declare function getSlippageMaxAmount(amount: BN$1, slippage: number): BN$1;
|
|
10522
10469
|
/**
|
|
10523
10470
|
* Calculates the minimum amount of tokens after applying slippage to the given amount.
|
|
10524
10471
|
*
|
|
@@ -10526,7 +10473,7 @@ declare function getSlippageMaxAmount(amount: BN, slippage: number): BN;
|
|
|
10526
10473
|
* @param slippage The percentage of slippage to apply.
|
|
10527
10474
|
* @returns The minimum amount of tokens after applying slippage.
|
|
10528
10475
|
*/
|
|
10529
|
-
declare function getSlippageMinAmount(amount: BN, slippage: number): BN;
|
|
10476
|
+
declare function getSlippageMinAmount(amount: BN$1, slippage: number): BN$1;
|
|
10530
10477
|
/**
|
|
10531
10478
|
* Calculates the number of positions required to cover a range of bins.
|
|
10532
10479
|
*
|
|
@@ -10550,11 +10497,11 @@ declare function getPositionCountByBinCount(binCount: number): number;
|
|
|
10550
10497
|
* @param params - The liquidity strategy parameters containing x0, y0, deltaX, and deltaY.
|
|
10551
10498
|
* @returns An object containing the adjusted x0, y0, deltaX, and deltaY values.
|
|
10552
10499
|
*/
|
|
10553
|
-
declare function resetUninvolvedLiquidityParams(minDeltaId: BN, maxDeltaId: BN, favorXInActiveId: boolean, params: LiquidityStrategyParameters): {
|
|
10554
|
-
x0: BN;
|
|
10555
|
-
y0: BN;
|
|
10556
|
-
deltaX: BN;
|
|
10557
|
-
deltaY: BN;
|
|
10500
|
+
declare function resetUninvolvedLiquidityParams(minDeltaId: BN$1, maxDeltaId: BN$1, favorXInActiveId: boolean, params: LiquidityStrategyParameters): {
|
|
10501
|
+
x0: BN$1;
|
|
10502
|
+
y0: BN$1;
|
|
10503
|
+
deltaX: BN$1;
|
|
10504
|
+
deltaY: BN$1;
|
|
10558
10505
|
};
|
|
10559
10506
|
declare function chunkDepositWithRebalanceEndpoint(dlmm: DLMM, strategy: StrategyParameters, slippagePercentage: number, maxActiveBinSlippage: number, position: PublicKey, positionMinBinId: number, positionMaxBinId: number, liquidityStrategyParameters: LiquidityStrategyParameters, owner: PublicKey, payer: PublicKey, isParallel: boolean, skipSolWrappingOperation?: boolean): Promise<TransactionInstruction[][]>;
|
|
10560
10507
|
|
|
@@ -10592,7 +10539,7 @@ declare class DLMM {
|
|
|
10592
10539
|
* @param opt Optional parameters.
|
|
10593
10540
|
* @returns The public key of the LB pair if it exists, or null.
|
|
10594
10541
|
*/
|
|
10595
|
-
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, baseFeePowerFactor: BN, opt?: Opt): Promise<PublicKey | null>;
|
|
10542
|
+
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, baseFactor: BN$1, baseFeePowerFactor: BN$1, opt?: Opt): Promise<PublicKey | null>;
|
|
10596
10543
|
static getCustomizablePermissionlessLbPairIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, opt?: Opt): Promise<PublicKey | null>;
|
|
10597
10544
|
/**
|
|
10598
10545
|
* The `create` function is a static method that creates a new instance of the `DLMM` class
|
|
@@ -10651,7 +10598,7 @@ declare class DLMM {
|
|
|
10651
10598
|
index: number;
|
|
10652
10599
|
baseFeePowerFactor: number;
|
|
10653
10600
|
functionType: number;
|
|
10654
|
-
padding1: BN[];
|
|
10601
|
+
padding1: BN$1[];
|
|
10655
10602
|
}>[];
|
|
10656
10603
|
}>;
|
|
10657
10604
|
/**
|
|
@@ -10692,7 +10639,7 @@ declare class DLMM {
|
|
|
10692
10639
|
* @param opt An options object.
|
|
10693
10640
|
* @returns A transaction that creates the pair.
|
|
10694
10641
|
*/
|
|
10695
|
-
static createCustomizablePermissionlessLbPair2(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey,
|
|
10642
|
+
static createCustomizablePermissionlessLbPair2(connection: Connection, binStep: BN$1, tokenX: PublicKey, tokenY: PublicKey, activeId: BN$1, feeBps: BN$1, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN$1, creatorPoolOnOffControl?: boolean, opt?: Opt): Promise<Transaction>;
|
|
10696
10643
|
/**
|
|
10697
10644
|
* Create a new customizable permissionless pair. Support only token program.
|
|
10698
10645
|
* @param connection A connection to the Solana cluster.
|
|
@@ -10708,7 +10655,7 @@ declare class DLMM {
|
|
|
10708
10655
|
* @param opt An options object.
|
|
10709
10656
|
* @returns A transaction that creates the pair.
|
|
10710
10657
|
*/
|
|
10711
|
-
static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey,
|
|
10658
|
+
static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN$1, tokenX: PublicKey, tokenY: PublicKey, activeId: BN$1, feeBps: BN$1, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN$1, creatorPoolOnOffControl?: boolean, opt?: Opt): Promise<Transaction>;
|
|
10712
10659
|
/**
|
|
10713
10660
|
* Create a new liquidity pair. Support only token program.
|
|
10714
10661
|
* @param connection A connection to the Solana cluster.
|
|
@@ -10723,7 +10670,7 @@ declare class DLMM {
|
|
|
10723
10670
|
* @returns A transaction that creates the pair.
|
|
10724
10671
|
* @throws If the pair already exists.
|
|
10725
10672
|
*/
|
|
10726
|
-
static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
10673
|
+
static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, baseFactor: BN$1, presetParameter: PublicKey, activeId: BN$1, opt?: Opt): Promise<Transaction>;
|
|
10727
10674
|
/**
|
|
10728
10675
|
* Create a new liquidity pair. Support both token and token2022 program.
|
|
10729
10676
|
* @param connection A connection to the Solana cluster.
|
|
@@ -10736,7 +10683,7 @@ declare class DLMM {
|
|
|
10736
10683
|
* @returns A transaction that creates the pair.
|
|
10737
10684
|
* @throws If the pair already exists.
|
|
10738
10685
|
*/
|
|
10739
|
-
static createLbPair2(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
10686
|
+
static createLbPair2(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, presetParameter: PublicKey, activeId: BN$1, opt?: Opt): Promise<Transaction>;
|
|
10740
10687
|
/**
|
|
10741
10688
|
* The function `refetchStates` retrieves and updates various states and data related to bin arrays
|
|
10742
10689
|
* and lb pairs.
|
|
@@ -10897,7 +10844,7 @@ declare class DLMM {
|
|
|
10897
10844
|
* - positionExtendCost: The estimated rent cost in lamports for extending the position.
|
|
10898
10845
|
* - binArrayCost: The estimated cost for creating necessary bin arrays.
|
|
10899
10846
|
*/
|
|
10900
|
-
quoteExtendPosition(currentMinBinId: BN, currentMaxBinId: BN, binCountToExpand: BN): Promise<{
|
|
10847
|
+
quoteExtendPosition(currentMinBinId: BN$1, currentMaxBinId: BN$1, binCountToExpand: BN$1): Promise<{
|
|
10901
10848
|
positionExtendCost: Decimal;
|
|
10902
10849
|
binArrayCost: Decimal;
|
|
10903
10850
|
}>;
|
|
@@ -10945,7 +10892,7 @@ declare class DLMM {
|
|
|
10945
10892
|
* @param slippagePercentage The slippage percentage for adding liquidity.
|
|
10946
10893
|
* @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
|
|
10947
10894
|
*/
|
|
10948
|
-
initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator: (count: number) => Promise<Keypair[]>, totalXAmount: BN, totalYAmount: BN, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number, altAddress?: PublicKey): Promise<InitializeMultiplePositionAndAddLiquidityByStrategyResponse2>;
|
|
10895
|
+
initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator: (count: number) => Promise<Keypair[]>, totalXAmount: BN$1, totalYAmount: BN$1, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number, altAddress?: PublicKey): Promise<InitializeMultiplePositionAndAddLiquidityByStrategyResponse2>;
|
|
10949
10896
|
/**
|
|
10950
10897
|
* Creates multiple positions and adds liquidity by strategy without chainsaw issues.
|
|
10951
10898
|
* @param positionKeypairGenerator A function that generates a specified number of keypairs.
|
|
@@ -10957,7 +10904,7 @@ declare class DLMM {
|
|
|
10957
10904
|
* @param slippagePercentage The slippage percentage for adding liquidity.
|
|
10958
10905
|
* @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
|
|
10959
10906
|
*/
|
|
10960
|
-
initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator: (count: number) => Promise<Keypair[]>, totalXAmount: BN, totalYAmount: BN, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number): Promise<InitializeMultiplePositionAndAddLiquidityByStrategyResponse>;
|
|
10907
|
+
initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator: (count: number) => Promise<Keypair[]>, totalXAmount: BN$1, totalYAmount: BN$1, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number): Promise<InitializeMultiplePositionAndAddLiquidityByStrategyResponse>;
|
|
10961
10908
|
/**
|
|
10962
10909
|
* Adds liquidity to an existing position using a specified strategy, allowing for chunkable transactions.
|
|
10963
10910
|
* If adding liquidity to bin out of position range, it will automatically expand. The limitation is 70 bins.
|
|
@@ -11045,7 +10992,7 @@ declare class DLMM {
|
|
|
11045
10992
|
position: PublicKey;
|
|
11046
10993
|
fromBinId: number;
|
|
11047
10994
|
toBinId: number;
|
|
11048
|
-
bps: BN;
|
|
10995
|
+
bps: BN$1;
|
|
11049
10996
|
shouldClaimAndClose?: boolean;
|
|
11050
10997
|
skipUnwrapSOL?: boolean;
|
|
11051
10998
|
}): Promise<Transaction[]>;
|
|
@@ -11084,7 +11031,7 @@ declare class DLMM {
|
|
|
11084
11031
|
* @throws {DlmmSdkError}
|
|
11085
11032
|
*
|
|
11086
11033
|
*/
|
|
11087
|
-
swapQuoteExactOut(outAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], maxExtraBinArrays?: number): SwapQuoteExactOut;
|
|
11034
|
+
swapQuoteExactOut(outAmount: BN$1, swapForY: boolean, allowedSlippage: BN$1, binArrays: BinArrayAccount[], maxExtraBinArrays?: number): SwapQuoteExactOut;
|
|
11088
11035
|
/**
|
|
11089
11036
|
* The `swapQuote` function returns a quote for a swap
|
|
11090
11037
|
* @param
|
|
@@ -11104,7 +11051,7 @@ declare class DLMM {
|
|
|
11104
11051
|
* - `binArraysPubkey`: Array of bin arrays involved in the swap
|
|
11105
11052
|
* @throws {DlmmSdkError}
|
|
11106
11053
|
*/
|
|
11107
|
-
swapQuote(inAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], isPartialFill?: boolean, maxExtraBinArrays?: number): SwapQuote;
|
|
11054
|
+
swapQuote(inAmount: BN$1, swapForY: boolean, allowedSlippage: BN$1, binArrays: BinArrayAccount[], isPartialFill?: boolean, maxExtraBinArrays?: number): SwapQuote;
|
|
11108
11055
|
swapExactOut({ inToken, outToken, outAmount, maxInAmount, lbPair, user, binArraysPubkey, }: SwapExactOutParams): Promise<Transaction>;
|
|
11109
11056
|
/**
|
|
11110
11057
|
* Returns a transaction to be signed and sent by user performing swap.
|
|
@@ -11155,7 +11102,7 @@ declare class DLMM {
|
|
|
11155
11102
|
owner: PublicKey;
|
|
11156
11103
|
positions: LbPosition[];
|
|
11157
11104
|
}): Promise<Transaction[]>;
|
|
11158
|
-
setActivationPoint(activationPoint: BN): Promise<Transaction>;
|
|
11105
|
+
setActivationPoint(activationPoint: BN$1): Promise<Transaction>;
|
|
11159
11106
|
setPairStatus(enabled: boolean): Promise<Transaction>;
|
|
11160
11107
|
/**
|
|
11161
11108
|
* The function `claimSwapFee` is used to claim swap fees for a specific position owned by a specific owner.
|
|
@@ -11207,7 +11154,7 @@ declare class DLMM {
|
|
|
11207
11154
|
* - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership.
|
|
11208
11155
|
* @returns {Promise<SeedLiquidityResponse>}
|
|
11209
11156
|
*/
|
|
11210
|
-
seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey, payer: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<SeedLiquidityResponse>;
|
|
11157
|
+
seedLiquidity(owner: PublicKey, seedAmount: BN$1, curvature: number, minPrice: number, maxPrice: number, base: PublicKey, payer: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN$1, shouldSeedPositionOwner?: boolean): Promise<SeedLiquidityResponse>;
|
|
11211
11158
|
/**
|
|
11212
11159
|
* The `seedLiquiditySingleBin` function seed liquidity into a single bin.
|
|
11213
11160
|
* @param
|
|
@@ -11225,7 +11172,7 @@ declare class DLMM {
|
|
|
11225
11172
|
* The returned instructions need to be executed sequentially if it was separated into multiple transactions.
|
|
11226
11173
|
* @returns {Promise<SeedLiquiditySingleBinResponse>}
|
|
11227
11174
|
*/
|
|
11228
|
-
seedLiquiditySingleBin(payer: PublicKey, base: PublicKey, seedAmount: BN, price: number, roundingUp: boolean, positionOwner: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<SeedLiquiditySingleBinResponse>;
|
|
11175
|
+
seedLiquiditySingleBin(payer: PublicKey, base: PublicKey, seedAmount: BN$1, price: number, roundingUp: boolean, positionOwner: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN$1, shouldSeedPositionOwner?: boolean): Promise<SeedLiquiditySingleBinResponse>;
|
|
11229
11176
|
/**
|
|
11230
11177
|
* Initializes bin arrays for the given bin array indexes if it wasn't initialized.
|
|
11231
11178
|
*
|
|
@@ -11233,7 +11180,7 @@ declare class DLMM {
|
|
|
11233
11180
|
* @param {PublicKey} funder - The public key of the funder.
|
|
11234
11181
|
* @return {Promise<TransactionInstruction[]>} An array of transaction instructions to initialize the bin arrays.
|
|
11235
11182
|
*/
|
|
11236
|
-
initializeBinArrays(binArrayIndexes: BN[], funder: PublicKey): Promise<TransactionInstruction[]>;
|
|
11183
|
+
initializeBinArrays(binArrayIndexes: BN$1[], funder: PublicKey): Promise<TransactionInstruction[]>;
|
|
11237
11184
|
/**
|
|
11238
11185
|
*
|
|
11239
11186
|
* @param
|
|
@@ -11248,14 +11195,14 @@ declare class DLMM {
|
|
|
11248
11195
|
* @returns
|
|
11249
11196
|
*/
|
|
11250
11197
|
initializePositionByOperator({ lowerBinId, positionWidth, owner, feeOwner, base, operator, payer, lockReleasePoint, }: {
|
|
11251
|
-
lowerBinId: BN;
|
|
11252
|
-
positionWidth: BN;
|
|
11198
|
+
lowerBinId: BN$1;
|
|
11199
|
+
positionWidth: BN$1;
|
|
11253
11200
|
owner: PublicKey;
|
|
11254
11201
|
feeOwner: PublicKey;
|
|
11255
11202
|
operator: PublicKey;
|
|
11256
11203
|
payer: PublicKey;
|
|
11257
11204
|
base: PublicKey;
|
|
11258
|
-
lockReleasePoint: BN;
|
|
11205
|
+
lockReleasePoint: BN$1;
|
|
11259
11206
|
}): Promise<Transaction>;
|
|
11260
11207
|
/**
|
|
11261
11208
|
* The `claimAllRewards` function to claim swap fees and LM rewards for multiple positions owned by a specific owner.
|
|
@@ -11293,7 +11240,7 @@ declare class DLMM {
|
|
|
11293
11240
|
* @param allowParallelExecution If true, the instructions will be grouped to allow parallel execution. Otherwise, the instructions will be executed sequentially.
|
|
11294
11241
|
* @returns An array of transactions if allowParallelExecution is true. Otherwise, an empty array.
|
|
11295
11242
|
*/
|
|
11296
|
-
decreasePositionLength(position: PublicKey, side: ResizeSide, length: BN, allowParallelExecution?: boolean): Promise<Transaction[]>;
|
|
11243
|
+
decreasePositionLength(position: PublicKey, side: ResizeSide, length: BN$1, allowParallelExecution?: boolean): Promise<Transaction[]>;
|
|
11297
11244
|
/**
|
|
11298
11245
|
* Expand the position bin range to the left or right (lower or upper).
|
|
11299
11246
|
*
|
|
@@ -11305,8 +11252,8 @@ declare class DLMM {
|
|
|
11305
11252
|
* @param allowParallelExecution Whether to allow parallel execution of the transaction.
|
|
11306
11253
|
* @returns The transaction to execute this instruction.
|
|
11307
11254
|
*/
|
|
11308
|
-
increasePositionLength(position: PublicKey, side: ResizeSide, length: BN, funder: PublicKey, allowParallelExecution?: boolean): Promise<Transaction[]>;
|
|
11309
|
-
simulateRebalancePositionWithBalancedStrategy(positionAddress: PublicKey, positionData: PositionData, strategy: StrategyType, topUpAmountX: BN, topUpAmountY: BN, xWithdrawBps: BN, yWithdrawBps: BN): Promise<RebalancePositionResponse & RebalancePositionBinArrayRentalCostQuote>;
|
|
11255
|
+
increasePositionLength(position: PublicKey, side: ResizeSide, length: BN$1, funder: PublicKey, allowParallelExecution?: boolean): Promise<Transaction[]>;
|
|
11256
|
+
simulateRebalancePositionWithBalancedStrategy(positionAddress: PublicKey, positionData: PositionData, strategy: StrategyType, topUpAmountX: BN$1, topUpAmountY: BN$1, xWithdrawBps: BN$1, yWithdrawBps: BN$1): Promise<RebalancePositionResponse & RebalancePositionBinArrayRentalCostQuote>;
|
|
11310
11257
|
private simulateRebalancePositionWithStrategy;
|
|
11311
11258
|
private quoteBinArrayAccountsRentalCost;
|
|
11312
11259
|
/**
|
|
@@ -11329,7 +11276,7 @@ declare class DLMM {
|
|
|
11329
11276
|
*
|
|
11330
11277
|
* @returns An object containing the instructions to initialize new bin arrays and the instruction to rebalance the position.
|
|
11331
11278
|
*/
|
|
11332
|
-
rebalancePosition(rebalancePositionResponse: RebalancePositionResponse, maxActiveBinSlippage: BN, rentPayer?: PublicKey, slippage?: number): Promise<{
|
|
11279
|
+
rebalancePosition(rebalancePositionResponse: RebalancePositionResponse, maxActiveBinSlippage: BN$1, rentPayer?: PublicKey, slippage?: number): Promise<{
|
|
11333
11280
|
initBinArrayInstructions: TransactionInstruction[];
|
|
11334
11281
|
rebalancePositionInstruction: TransactionInstruction[];
|
|
11335
11282
|
}>;
|
|
@@ -22531,9 +22478,62 @@ declare class DlmmSdkError extends Error {
|
|
|
22531
22478
|
constructor(name: ErrorName, message: string);
|
|
22532
22479
|
}
|
|
22533
22480
|
|
|
22534
|
-
declare const
|
|
22535
|
-
|
|
22536
|
-
|
|
22481
|
+
declare const LBCLMM_PROGRAM_IDS: {
|
|
22482
|
+
devnet: string;
|
|
22483
|
+
localhost: string;
|
|
22484
|
+
"mainnet-beta": string;
|
|
22485
|
+
};
|
|
22486
|
+
declare const ALT_ADDRESS: {
|
|
22487
|
+
"mainnet-beta": string;
|
|
22488
|
+
devnet: string;
|
|
22489
|
+
};
|
|
22490
|
+
declare const ADMIN: {
|
|
22491
|
+
devnet: string;
|
|
22492
|
+
localhost: string;
|
|
22493
|
+
};
|
|
22494
|
+
declare enum Network {
|
|
22495
|
+
MAINNET = "mainnet-beta",
|
|
22496
|
+
TESTNET = "testnet",
|
|
22497
|
+
DEVNET = "devnet",
|
|
22498
|
+
LOCAL = "localhost"
|
|
22499
|
+
}
|
|
22500
|
+
declare const BASIS_POINT_MAX = 10000;
|
|
22501
|
+
declare const SCALE_OFFSET = 64;
|
|
22502
|
+
declare const SCALE: BN$1;
|
|
22503
|
+
declare const FEE_PRECISION: BN$1;
|
|
22504
|
+
declare const MAX_FEE_RATE: BN$1;
|
|
22505
|
+
declare const BIN_ARRAY_FEE = 0.07143744;
|
|
22506
|
+
declare const POSITION_FEE = 0.05740608;
|
|
22507
|
+
declare const TOKEN_ACCOUNT_FEE = 0.00203928;
|
|
22508
|
+
declare const POOL_FEE = 0.00718272;
|
|
22509
|
+
declare const BIN_ARRAY_BITMAP_FEE = 0.01180416;
|
|
22510
|
+
declare const BIN_ARRAY_FEE_BN: BN$1;
|
|
22511
|
+
declare const POSITION_FEE_BN: BN$1;
|
|
22512
|
+
declare const TOKEN_ACCOUNT_FEE_BN: BN$1;
|
|
22513
|
+
declare const POOL_FEE_BN: BN$1;
|
|
22514
|
+
declare const BIN_ARRAY_BITMAP_FEE_BN: BN$1;
|
|
22515
|
+
declare const MAX_BIN_ARRAY_SIZE: BN$1;
|
|
22516
|
+
declare const DEFAULT_BIN_PER_POSITION: BN$1;
|
|
22517
|
+
declare const BIN_ARRAY_BITMAP_SIZE: BN$1;
|
|
22518
|
+
declare const EXTENSION_BINARRAY_BITMAP_SIZE: BN$1;
|
|
22519
|
+
declare const POSITION_MAX_LENGTH: BN$1;
|
|
22520
|
+
declare const MAX_RESIZE_LENGTH: BN$1;
|
|
22521
|
+
declare const SIMULATION_USER: PublicKey;
|
|
22522
|
+
declare const PRECISION = 18446744073709552000;
|
|
22523
|
+
declare const MAX_CLAIM_ALL_ALLOWED = 2;
|
|
22524
|
+
declare const MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26;
|
|
22525
|
+
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
22526
|
+
declare const ILM_BASE: PublicKey;
|
|
22527
|
+
declare const MAX_EXTRA_BIN_ARRAYS = 3;
|
|
22528
|
+
declare const U64_MAX: BN$1;
|
|
22529
|
+
declare const MAX_BINS_PER_POSITION: BN$1;
|
|
22530
|
+
declare enum FunctionType {
|
|
22531
|
+
LiquidityMining = 0
|
|
22532
|
+
}
|
|
22533
|
+
|
|
22534
|
+
declare const presetParameter2BinStepFilter: (binStep: BN) => GetProgramAccountsFilter;
|
|
22535
|
+
declare const presetParameter2BaseFactorFilter: (baseFactor: BN) => GetProgramAccountsFilter;
|
|
22536
|
+
declare const presetParameter2BaseFeePowerFactor: (baseFeePowerFactor: BN) => GetProgramAccountsFilter;
|
|
22537
22537
|
declare const binArrayLbPairFilter: (lbPair: PublicKey) => GetProgramAccountsFilter;
|
|
22538
22538
|
declare const positionOwnerFilter: (owner: PublicKey) => GetProgramAccountsFilter;
|
|
22539
22539
|
declare const positionLbPairFilter: (lbPair: PublicKey) => GetProgramAccountsFilter;
|