/** * 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 { getPricefeedErrorFromCode, getPricefeedErrorFromName, } from '../errors'; export const PRICEFEED_PROGRAM_ID = '8ahPGPjEbpgGaZx2NV1iG5Shj7TDwvsjkEDcGWjt94TP' as PublicKey<'8ahPGPjEbpgGaZx2NV1iG5Shj7TDwvsjkEDcGWjt94TP'>; export function createPricefeedProgram(): Program { return { name: 'pricefeed', publicKey: PRICEFEED_PROGRAM_ID, getErrorFromCode(code: number, cause?: Error) { return getPricefeedErrorFromCode(code, this, cause); }, getErrorFromName(name: string, cause?: Error) { return getPricefeedErrorFromName(name, this, cause); }, isOnCluster() { return true; }, }; } export function getPricefeedProgram( context: Pick, clusterFilter?: ClusterFilter ): T { return context.programs.get('pricefeed', clusterFilter); } export function getPricefeedProgramId( context: Pick, clusterFilter?: ClusterFilter ): PublicKey { return context.programs.getPublicKey( 'pricefeed', PRICEFEED_PROGRAM_ID, clusterFilter ); }