/** * 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, getProgramDerivedAddress, getUtf8Encoder, type Address, type ProgramDerivedAddress, } from "@solana/kit"; export type RuleSetSeeds = { /** The owner (creator) of the rule set */ owner: Address; /** The name of the rule set */ name: string; }; /** RuleSet PDA storing a named set of authorization rules */ export async function findRuleSetPda( seeds: RuleSetSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = "auth9SigNpDKz4sJJ1DfCTuZrZNSAgh9sFD3rboVmgg" as Address<"auth9SigNpDKz4sJJ1DfCTuZrZNSAgh9sFD3rboVmgg">, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getUtf8Encoder().encode("rule_set"), getAddressEncoder().encode(seeds.owner), getUtf8Encoder().encode(seeds.name), ], }); }