A Solana RPC client for communicating with the blockchain.
The first token mint address to include in the pool.
The second token mint address to include in the pool.
The spacing between price ticks for the pool.
Optionalconfig: CreatePoolConfig = {}The parameters to build the create concentrated liquidity pool instruction.
A promise that resolves to an object containing the pool creation instructions, the estimated initialization cost, and the pool address.
import { createConcentratedLiquidityPoolInstructions, 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 tokenMintOne = address("So11111111111111111111111111111111111111112");
const tokenMintTwo = address("BRjpCHtyQLNCo8gqRUr8jtdAj5AjPYQaoqbvcZiHok1k"); // devUSDC
const { poolAddress, instructions, initializationCost } = await createConcentratedLiquidityPoolInstructions(
devnetRpc,
tokenMintOne,
tokenMintTwo,
64,
{
initialPrice: 0.01,
funder: wallet,
whirlpoolDeployment: WhirlpoolDeployment.devnet,
},
);
console.log(`Pool Address: ${poolAddress}`);
console.log(`Initialization Cost: ${initializationCost} lamports`);
Creates the necessary instructions to initialize a Concentrated Liquidity Pool (CLMM) on Orca Whirlpools.