/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder, type Address, type ProgramDerivedAddress, } from "@solana/kit"; export type CustomizablePoolSeeds = { /** The first token mint (sorted) */ tokenAMint: Address; /** The second token mint (sorted) */ tokenBMint: Address; }; /** * A customizable pool account that allows for custom fee configurations. * Unlike regular pools, customizable pools are not tied to a config account. * Token mints must be sorted - tokenAMint should be lexicographically smaller than tokenBMint. */ export async function findCustomizablePoolPda( seeds: CustomizablePoolSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG" as Address<"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG">, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getUtf8Encoder().encode("cpool"), getAddressEncoder().encode(seeds.tokenAMint), getAddressEncoder().encode(seeds.tokenBMint), ], }); }