"use strict";
/**
 * 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/metaplex-foundation/kinobi
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSplTokenProgramId = exports.getSplTokenProgram = exports.createSplTokenProgram = exports.SPL_TOKEN_PROGRAM_ID = void 0;
const errors_1 = require("../errors");
exports.SPL_TOKEN_PROGRAM_ID = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
function createSplTokenProgram() {
    return {
        name: 'splToken',
        publicKey: exports.SPL_TOKEN_PROGRAM_ID,
        getErrorFromCode(code, cause) {
            return (0, errors_1.getSplTokenErrorFromCode)(code, this, cause);
        },
        getErrorFromName(name, cause) {
            return (0, errors_1.getSplTokenErrorFromName)(name, this, cause);
        },
        isOnCluster() {
            return true;
        },
    };
}
exports.createSplTokenProgram = createSplTokenProgram;
function getSplTokenProgram(context, clusterFilter) {
    return context.programs.get('splToken', clusterFilter);
}
exports.getSplTokenProgram = getSplTokenProgram;
function getSplTokenProgramId(context, clusterFilter) {
    return context.programs.getPublicKey('splToken', exports.SPL_TOKEN_PROGRAM_ID, clusterFilter);
}
exports.getSplTokenProgramId = getSplTokenProgramId;
//# sourceMappingURL=splToken.js.map