RPC client.
The mint address of the NFT that represents the position.
Maximum amounts of token A and B to deposit.
Optionalconfig: IncreaseLiquidityConfig = {}The parameters to build the increase liquidity instruction.
A promise that resolves to an object containing instructions.
import { increaseLiquidityInstructions, WhirlpoolDeployment } from '@orca-so/whirlpools';
import { createSolanaRpc, devnet, address } from '@solana/kit';
import { loadWallet } from './utils';
const devnetRpc = createSolanaRpc(devnet('https://api.devnet.solana.com'));
const wallet = await loadWallet();
const positionMint = address("HqoV7Qv27REUtmd9UKSJGGmCRNx3531t33bDG1BUfo9K");
const { instructions } = await increaseLiquidityInstructions(
devnetRpc,
positionMint,
{ tokenMaxA: 10n, tokenMaxB: 12n },
{
slippageToleranceBps: 100,
authority: wallet,
whirlpoolDeployment: WhirlpoolDeployment.devnet,
}
);
Generates instructions to increase liquidity for an existing position.