TxBuilder
) that can be used to build, sign, and send the transaction.
Example
config
parameter should be a valid configuration accountpreparePoolCreationParams
to calculate proper initSqrtPrice
and liquidityDelta
tx
: The transaction to sign and sendpool
: The public key of the created poolposition
: The public key of the initial positioncreatePool
when you need custom fee structurespreparePoolCreationParams
to calculate proper initSqrtPrice
and liquidityDelta
tx
: The transaction to sign and sendpool
: The public key of the created poolposition
: The public key of the initial positionTxBuilder
) that can be used to build, sign, and send the transaction.
Example
positionNft
should be a new mint that doesn’t already have a positionaddLiquidity
to provide tokensswapInAmount
: The original input amountconsumedInAmount
: The actual input amount used (after transfer fees)swapOutAmount
: The expected output amountminSwapOutAmount
: The minimum output amount accounting for slippagetotalFee
: The total fee to be paidpriceImpact
: The price impact of the swap as a percentageslippage
parameter protects users from price movementsminSwapOutAmount
as the minimumAmountOut
parameter for swap
actualInputAmount
: The actual input amount (after transfer fees)consumedInputAmount
: The full input amount including transfer feesliquidityDelta
: The amount of liquidity that will be addedoutputAmount
: The calculated amount of the other token to be pairedliquidityDelta
: The amount of liquidity being removedoutAmountA
: The calculated amount of token A to receiveoutAmountB
: The calculated amount of token B to receiveTxBuilder
) that can be used to build, sign, and send the transaction.
Example
getQuote
to determine the minimumAmountOut
minimumAmountOut
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
getDepositQuote
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
refreshVesting
first if needed)TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
TxBuilder
) that can be used to build, sign, and send the transaction.
Example
removeAllLiquidity
first if the position still has liquidityremoveAllLiquidityAndClosePosition
insteadconfig
: Public key of the config account.pool
: Public key of the pool.position
: Public key of the position.pool
: Public key of the pool.pool
: Public key of the pool.user
: Public key of the user.user
: Public key of the user.position
: Public key of the position.position
: The position state.pool
: Public key of the pool.initSqrtPrice
: The initial sqrt price in Q64 formatliquidityDelta
: The initial liquidity in Q64 formatvestingData
: The vesting account state datacurrentPoint
: Current timestamp or slot numbervestingData
: The vesting account state datavestingData
: The vesting account state datacurrentPoint
: Current timestamp or slot numberamount
: The base amount as a BNrate
: The slippage rate as a percentage (e.g., 0.5 for 0.5%)amount
: The base amount as a BNrate
: The slippage rate as a percentage (e.g., 0.5 for 0.5%)actualAmount
: The actual amount after slippage in token unitsidealAmount
: The theoretical amount without slippage in token unitssqrtPrice
: The sqrt price in Q64 formattokenADecimal
: The number of decimals for token AtokenBDecimal
: The number of decimals for token Bprice
: The price as a string in human-readable formattokenADecimal
: The number of decimals for token AtokenBDecimal
: The number of decimals for token Bsqrt(price / 10^(tokenADecimal - tokenBDecimal)) << 64
poolState
: The current state of the poolpositionState
: The current state of the positionfeeTokenA
: Unclaimed fees in token AfeeTokenB
: Unclaimed fees in token Brewards
: Array of unclaimed reward amounts for each reward tokenfeeSchedulerMode
: The fee reduction mode (Linear or Exponential)cliffFeeNumerator
: The initial maximum fee numerator (starting point)period
: The number of elapsed periods since fee reduction beganreductionFactor
: The rate of fee reduction per periodBN
: The calculated base fee numerator for the current periodvolatilityAccumulator
: Accumulated measure of market volatility over timebinStep
: The price bin step size used in the liquidity distribution systemvariableFeeControl
: Control parameter that determines how much volatility affects feesBN
: The calculated dynamic fee numerator0
if variableFeeControl
is zero (dynamic fees disabled)