/** * 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 PositionSeeds = { /** The position NFT mint address */ positionNft: Address; }; /** * A liquidity position account that tracks a user's deposited liquidity. * Each position is uniquely identified by its associated NFT mint. */ export async function findPositionPda( seeds: PositionSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG" as Address<"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG">, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getUtf8Encoder().encode("position"), getAddressEncoder().encode(seeds.positionNft), ], }); }