/** * 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 { getSimpleMessagelibErrorFromCode, getSimpleMessagelibErrorFromName, } from '../errors'; export const SIMPLE_MESSAGELIB_PROGRAM_ID = '6GsmxMTHAAiFKfemuM4zBjumTjNSX5CAiw4xSSXM2Toy' as PublicKey<'6GsmxMTHAAiFKfemuM4zBjumTjNSX5CAiw4xSSXM2Toy'>; export function createSimpleMessagelibProgram(): Program { return { name: 'simpleMessagelib', publicKey: SIMPLE_MESSAGELIB_PROGRAM_ID, getErrorFromCode(code: number, cause?: Error) { return getSimpleMessagelibErrorFromCode(code, this, cause); }, getErrorFromName(name: string, cause?: Error) { return getSimpleMessagelibErrorFromName(name, this, cause); }, isOnCluster() { return true; }, }; } export function getSimpleMessagelibProgram( context: Pick, clusterFilter?: ClusterFilter ): T { return context.programs.get('simpleMessagelib', clusterFilter); } export function getSimpleMessagelibProgramId( context: Pick, clusterFilter?: ClusterFilter ): PublicKey { return context.programs.getPublicKey( 'simpleMessagelib', SIMPLE_MESSAGELIB_PROGRAM_ID, clusterFilter ); }