/** * 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 TokenBadgeSeeds = { /** The token mint address */ tokenMint: Address; }; /** * A token badge account that stores metadata about a token's permissions and status. * Used to whitelist or configure specific tokens for use in pools. */ export async function findTokenBadgePda( seeds: TokenBadgeSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG" as Address<"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG">, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getUtf8Encoder().encode("token_badge"), getAddressEncoder().encode(seeds.tokenMint), ], }); }