/** * 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, getU64Encoder, type Address, type ProgramDerivedAddress, } from '@solana/kit'; export type FactionMarketSeeds = { gameId: Address; system: Address; starbaseSeqId: number | bigint; }; /** A persistent faction market at one starbase. 120 B sized header + `offers: List` tail. */ export async function findFactionMarketPda( seeds: FactionMarketSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 70, 97, 99, 116, 105, 111, 110, 77, 97, 114, 107, 101, 116, ]), ), getAddressEncoder().encode(seeds.gameId), getAddressEncoder().encode(seeds.system), getU64Encoder().encode(seeds.starbaseSeqId), ], }); }