RPC client. Requires: GetAccountInfoApi, GetMultipleAccountsApi, GetMinimumBalanceForRentExemptionApi
The address of the liquidity pool.
Maximum amounts of token A and B to deposit.
Optionalconfig: OpenPositionConfig = {}The parameters to build the open full range position instructions.
A promise that resolves to an object containing instructions, position mint address, and initialization cost.
import { openFullRangePositionInstructions, WhirlpoolDeployment } from '@orca-so/whirlpools';
import { generateKeyPairSigner, createSolanaRpc, devnet, address } from '@solana/kit';
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 { instructions, initializationCost, positionMint } = await openFullRangePositionInstructions(
devnetRpc,
whirlpoolAddress,
{ tokenMaxA: 1_000_000n, tokenMaxB: 0n },
{
slippageToleranceBps: 100,
withTokenMetadataExtension: true,
funder: wallet,
whirlpoolDeployment: WhirlpoolDeployment.devnet,
},
);
Opens a full-range position for a pool, typically used for Splash Pools or other full-range liquidity provisioning.