/** * 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 { getScanPatternIdEncoder, type ScanPatternIdArgs } from '../types'; export type ScanPatternNoiseMapUploadSeeds = { gameId: Address; scanPatternId: ScanPatternIdArgs; }; /** * Scan pattern noise-map upload staging account. * * Used to upload replacement noise maps in chunks without mutating the live * [`ScanPattern`] until an explicit commit step. */ export async function findScanPatternNoiseMapUploadPda( seeds: ScanPatternNoiseMapUploadSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 83, 99, 97, 110, 80, 97, 116, 116, 101, 114, 110, 78, 111, 105, 115, 101, 77, 97, 112, 85, 112, 108, 111, 97, 100, ]), ), getAddressEncoder().encode(seeds.gameId), getScanPatternIdEncoder().encode(seeds.scanPatternId), ], }); }