/** * 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, getBytesEncoder, getProgramDerivedAddress, type Address, type ProgramDerivedAddress, } from '@solana/kit'; import { getCelestialBodyIdEncoder, type CelestialBodyIdArgs } from '../types'; export type CelestialBodySeeds = { game: Address; id: CelestialBodyIdArgs; }; /** * CelestialBody * TODO: add new fields needed for research tree */ export async function findCelestialBodyPda( seeds: CelestialBodySeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 67, 101, 108, 101, 115, 116, 105, 97, 108, 66, 111, 100, 121, ]), ), getAddressEncoder().encode(seeds.game), getCelestialBodyIdEncoder().encode(seeds.id), ], }); }