/** * 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 { getDvnErrorFromCode, getDvnErrorFromName } from '../errors'; export const DVN_PROGRAM_ID = 'HtEYV4xB4wvsj5fgTkcfuChYpvGYzgzwvNhgDZQNh7wW' as PublicKey<'HtEYV4xB4wvsj5fgTkcfuChYpvGYzgzwvNhgDZQNh7wW'>; export function createDvnProgram(): Program { return { name: 'dvn', publicKey: DVN_PROGRAM_ID, getErrorFromCode(code: number, cause?: Error) { return getDvnErrorFromCode(code, this, cause); }, getErrorFromName(name: string, cause?: Error) { return getDvnErrorFromName(name, this, cause); }, isOnCluster() { return true; }, }; } export function getDvnProgram( context: Pick, clusterFilter?: ClusterFilter ): T { return context.programs.get('dvn', clusterFilter); } export function getDvnProgramId( context: Pick, clusterFilter?: ClusterFilter ): PublicKey { return context.programs.getPublicKey('dvn', DVN_PROGRAM_ID, clusterFilter); }