• Opens a full-range position for a pool, typically used for Splash Pools or other full-range liquidity provisioning.

    Parameters

    • rpc: Rpc<
          GetAccountInfoApi & GetMultipleAccountsApi & GetMinimumBalanceForRentExemptionApi & GetEpochInfoApi,
      >

      The Solana RPC client.

    • poolAddress: Address

      The address of the liquidity pool.

    • param: IncreaseLiquidityQuoteParam

      The parameters for adding liquidity, where one of liquidity, tokenA, or tokenB must be specified. The SDK will compute the others.

    • OptionalslippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS

      The maximum acceptable slippage, in basis points (BPS).

    • Optionalfunder: TransactionSigner = FUNDER

      The account funding the transaction.

    Returns Promise<OpenPositionInstructions>

    A promise that resolves to an object containing the instructions, quote, position mint address, and initialization costs for increasing liquidity.

    import { openFullRangePositionInstructions, setWhirlpoolsConfig } from '@orca-so/whirlpools';
    import { generateKeyPairSigner, createSolanaRpc, devnet, address } from '@solana/web3.js';

    await setWhirlpoolsConfig('solanaDevnet');
    const devnetRpc = createSolanaRpc(devnet('https://api.devnet.solana.com'));
    const wallet = await generateKeyPairSigner(); // CAUTION: This wallet is not persistent.

    const whirlpoolAddress = address("POOL_ADDRESS");

    const param = { tokenA: 1_000_000n };

    const { quote, instructions, initializationCost, positionMint } = await openFullRangePositionInstructions(
    devnetRpc,
    whirlpoolAddress,
    param,
    100,
    wallet
    );