import { cusper as defaultCandyGuardCusper, PROGRAM_ID as DEFAULT_CANDY_GUARD_PROGRAM_ID, } from '@metaplex-foundation/mpl-candy-guard';
import { cusper as candyMachineCusper, PROGRAM_ID as CANDY_MACHINE_PROGRAM_ID, } from '@metaplex-foundation/mpl-candy-machine-core';
import { defaultCandyGuardNames } from './guards';
import { assert } from '../../utils';
import { PublicKey } from '../../types';
/** @group Programs */
export const candyMachineProgram = {
    name: 'CandyMachineProgram',
    address: CANDY_MACHINE_PROGRAM_ID,
    errorResolver: (error) => candyMachineCusper.errorFromProgramLogs(error.logs, false),
};
export const isCandyGuardProgram = (value) => typeof value === 'object' && 'availableGuards' in value;
export function assertCandyGuardProgram(value) {
    assert(isCandyGuardProgram(value), `Expected CandyGuardProgram model`);
}
/** @group Programs */
export const defaultCandyGuardProgram = {
    name: 'CandyGuardProgram',
    address: DEFAULT_CANDY_GUARD_PROGRAM_ID,
    errorResolver: (error) => defaultCandyGuardCusper.errorFromProgramLogs(error.logs, false),
    availableGuards: defaultCandyGuardNames,
};
/** @group Programs */
export const gatewayProgram = {
    name: 'GatewayProgram',
    address: new PublicKey('gatem74V238djXdzWnJf94Wo1DcnuGkfijbf3AuBhfs'),
};
//# sourceMappingURL=programs.js.map