• The maximum liquidity fundable by amount0 and amount1 at the current price sqrtRatioX64 over [sqrtA, sqrtB]. Exact port of the on-chain get_liquidity_from_amounts — the value openRaydiumClmmPositionV2 computes and passes to Raydium, so clients can predict each position's liquidity (and, with getClmmAmountsForLiquidity, the consumed amounts and leftover residue) before the opens execute:

    • price at/below the range -> token_0 only
    • price inside the range -> min of what each side can fund
    • price at/above the range -> token_1 only

    Parameters

    • sqrtRatioX64: bigint
    • sqrtRatioAX64: bigint
    • sqrtRatioBX64: bigint
    • amount0: bigint
    • amount1: bigint

    Returns bigint

Generated using TypeDoc