/** * 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 { getRegionIdEncoder, type RegionIdArgs } from '../types'; export type RegionBorderUploadSeeds = { gameId: Address; regionId: RegionIdArgs; }; /** * Region Border Upload (staging) Account * * Stores an in-progress region border upload in chunks, without mutating the live * [`RegionTracker`] / [`Region`] data until a final commit step. */ export async function findRegionBorderUploadPda( seeds: RegionBorderUploadSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 82, 101, 103, 105, 111, 110, 66, 111, 114, 100, 101, 114, 85, 112, 108, 111, 97, 100, ]), ), getAddressEncoder().encode(seeds.gameId), getRegionIdEncoder().encode(seeds.regionId), ], }); }