/** * 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, getU32Encoder, type Address, type ProgramDerivedAddress, } from '@solana/kit'; export type CareerXpTargetDefinitionsV1Seeds = { gameId: Address; version: number; }; /** * Staged v1 threshold payload. Seeded * `[b"career_xp_target_definitions", game_id, 1u32_le]` per the #222 * contract — note the lower-case seed literal from the spec. * * The header fields are exactly the digest preimage header: `version:u32_le`, * `row_count:u32_le`, `renown_divisor:u32_le`, `feeder_mask:u16_le`. */ export async function findCareerXpTargetDefinitionsV1Pda( seeds: CareerXpTargetDefinitionsV1Seeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 99, 97, 114, 101, 101, 114, 95, 120, 112, 95, 116, 97, 114, 103, 101, 116, 95, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, ]), ), getAddressEncoder().encode(seeds.gameId), getU32Encoder().encode(seeds.version), ], }); }