/** * This code was AUTOGENERATED using the kinobi library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun kinobi to update it. * * @see https://github.com/kinobi-so/kinobi */ import { ClusterFilter, Context, Program, PublicKey, } from '@metaplex-foundation/umi'; import { getBlockedMessagelibErrorFromCode, getBlockedMessagelibErrorFromName, } from '../errors'; export const BLOCKED_MESSAGELIB_PROGRAM_ID = '2XrYqmhBMPJgDsb4SVbjV1PnJBprurd5bzRCkHwiFCJB' as PublicKey<'2XrYqmhBMPJgDsb4SVbjV1PnJBprurd5bzRCkHwiFCJB'>; export function createBlockedMessagelibProgram(): Program { return { name: 'blockedMessagelib', publicKey: BLOCKED_MESSAGELIB_PROGRAM_ID, getErrorFromCode(code: number, cause?: Error) { return getBlockedMessagelibErrorFromCode(code, this, cause); }, getErrorFromName(name: string, cause?: Error) { return getBlockedMessagelibErrorFromName(name, this, cause); }, isOnCluster() { return true; }, }; } export function getBlockedMessagelibProgram( context: Pick, clusterFilter?: ClusterFilter ): T { return context.programs.get('blockedMessagelib', clusterFilter); } export function getBlockedMessagelibProgramId( context: Pick, clusterFilter?: ClusterFilter ): PublicKey { return context.programs.getPublicKey( 'blockedMessagelib', BLOCKED_MESSAGELIB_PROGRAM_ID, clusterFilter ); }