/** * 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 { getWorkerInterfaceErrorFromCode, getWorkerInterfaceErrorFromName, } from '../errors'; export const WORKER_INTERFACE_PROGRAM_ID = '2iENutMTfTfxdFEjEQSbFCBstZqakXFZQCLZLLk4Ti58' as PublicKey<'2iENutMTfTfxdFEjEQSbFCBstZqakXFZQCLZLLk4Ti58'>; export function createWorkerInterfaceProgram(): Program { return { name: 'workerInterface', publicKey: WORKER_INTERFACE_PROGRAM_ID, getErrorFromCode(code: number, cause?: Error) { return getWorkerInterfaceErrorFromCode(code, this, cause); }, getErrorFromName(name: string, cause?: Error) { return getWorkerInterfaceErrorFromName(name, this, cause); }, isOnCluster() { return true; }, }; } export function getWorkerInterfaceProgram( context: Pick, clusterFilter?: ClusterFilter ): T { return context.programs.get('workerInterface', clusterFilter); } export function getWorkerInterfaceProgramId( context: Pick, clusterFilter?: ClusterFilter ): PublicKey { return context.programs.getPublicKey( 'workerInterface', WORKER_INTERFACE_PROGRAM_ID, clusterFilter ); }