"use strict";
/**
 * This code was AUTOGENERATED using the codama library.
 * Please DO NOT EDIT THIS FILE, instead use visitors
 * to add features, then rerun codama to update it.
 *
 * @see https://github.com/codama-idl/codama
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.MulticallHandlerInstruction = exports.MULTICALL_HANDLER_PROGRAM_ADDRESS = void 0;
exports.identifyMulticallHandlerInstruction = identifyMulticallHandlerInstruction;
const web3_v2_js_1 = require("@solana/web3-v2.js");
exports.MULTICALL_HANDLER_PROGRAM_ADDRESS = '27dua7HMuaZrAc6PRfxmvshHChypFLzZVSpKKaDAPjsq';
var MulticallHandlerInstruction;
(function (MulticallHandlerInstruction) {
    MulticallHandlerInstruction[MulticallHandlerInstruction["HandleV3AcrossMessage"] = 0] = "HandleV3AcrossMessage";
})(MulticallHandlerInstruction || (exports.MulticallHandlerInstruction = MulticallHandlerInstruction = {}));
function identifyMulticallHandlerInstruction(instruction) {
    const data = 'data' in instruction ? instruction.data : instruction;
    if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([131, 141, 52, 71, 16, 59, 196, 92])), 0)) {
        return MulticallHandlerInstruction.HandleV3AcrossMessage;
    }
    throw new Error('The provided instruction could not be identified as a multicallHandler instruction.');
}
