/** * 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 { getShipIdEncoder, type ShipIdArgs } from '../types'; export type ShipDefinitionUploadSeeds = { gameId: Address; shipId: ShipIdArgs; }; /** * Ship-definition upload staging account. * * Used to upload a complete ship definition in chunks and apply it atomically * on commit. */ export async function findShipDefinitionUploadPda( seeds: ShipDefinitionUploadSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 83, 104, 105, 112, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 85, 112, 108, 111, 97, 100, ]), ), getAddressEncoder().encode(seeds.gameId), getShipIdEncoder().encode(seeds.shipId), ], }); }