@marinade.finance/kamino-sdk
Version:
41 lines (40 loc) • 1.33 kB
TypeScript
import { TransactionInstruction, PublicKey } from '@solana/web3.js';
import BN from 'bn.js';
export interface CreatePoolArgs {
sqrtPriceX64: BN;
openTime: BN;
}
export interface CreatePoolAccounts {
/** Address paying to create the pool. Can be anyone */
poolCreator: PublicKey;
/** Which config the pool belongs to. */
ammConfig: PublicKey;
/** Initialize an account to store the pool state */
poolState: PublicKey;
/** Token_0 mint, the key must grater then token_1 mint. */
tokenMint0: PublicKey;
/** Token_1 mint */
tokenMint1: PublicKey;
/** Token_0 vault for the pool */
tokenVault0: PublicKey;
/** Token_1 vault for the pool */
tokenVault1: PublicKey;
observationState: PublicKey;
/** Spl token program */
tokenProgram: PublicKey;
/** To create a new program account */
systemProgram: PublicKey;
/** Sysvar for program account */
rent: PublicKey;
}
export declare const layout: any;
/**
* Creates a pool for the given token pair and the initial price
*
* # Arguments
*
* * `ctx`- The context of accounts
* * `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64
*
*/
export declare function createPool(args: CreatePoolArgs, accounts: CreatePoolAccounts): TransactionInstruction;