/** * 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 { getMinorFactionIdEncoder, type MinorFactionIdArgs } from '../types'; export type LoyaltyAtlasBankSeeds = { gameId: Address; profile: Address; factionId: MinorFactionIdArgs; }; /** * Persistent accumulated ATLAS entitlement for one `(profile, faction)`. * * Expiry is inactivity-based: a new credit extends the whole accumulated balance. Configuring expiry to * `0` makes the bank non-expiring. This is bounded state (one account per profile/faction), supports * week/month batching, and avoids an unbounded list of daily claim tranches. */ export async function findLoyaltyAtlasBankPda( seeds: LoyaltyAtlasBankSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF' as Address<'C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF'>, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getBytesEncoder().encode( new Uint8Array([ 76, 111, 121, 97, 108, 116, 121, 65, 116, 108, 97, 115, 66, 97, 110, 107, ]), ), getAddressEncoder().encode(seeds.gameId), getAddressEncoder().encode(seeds.profile), getMinorFactionIdEncoder().encode(seeds.factionId), ], }); }