/** * 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, getU8Encoder, type Address, type ProgramDerivedAddress, } from '@solana/kit'; export type RentSourceHeadSeeds = { gameId: Address; kind: number; key: Address; }; /** * The durable head of one price source. Its history is continuous for the life of the game: a source that * is removed and re-created keeps this head (generation is metadata only). */ export async function findRentSourceHeadPda( seeds: RentSourceHeadSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 82, 101, 110, 116, 83, 111, 117, 114, 99, 101, 72, 101, 97, 100, ]), ), getAddressEncoder().encode(seeds.gameId), getU8Encoder().encode(seeds.kind), getAddressEncoder().encode(seeds.key), ], }); }