"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.TokenMessengerMinterV2Instruction = exports.TokenMessengerMinterV2Account = exports.TOKEN_MESSENGER_MINTER_V2_PROGRAM_ADDRESS = void 0;
exports.identifyTokenMessengerMinterV2Account = identifyTokenMessengerMinterV2Account;
exports.identifyTokenMessengerMinterV2Instruction = identifyTokenMessengerMinterV2Instruction;
const kit_1 = require("@solana/kit");
exports.TOKEN_MESSENGER_MINTER_V2_PROGRAM_ADDRESS = 'CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe';
var TokenMessengerMinterV2Account;
(function (TokenMessengerMinterV2Account) {
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["DenylistedAccount"] = 0] = "DenylistedAccount";
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["LocalToken"] = 1] = "LocalToken";
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["MessageTransmitter"] = 2] = "MessageTransmitter";
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["RemoteTokenMessenger"] = 3] = "RemoteTokenMessenger";
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["TokenMessenger"] = 4] = "TokenMessenger";
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["TokenMinter"] = 5] = "TokenMinter";
    TokenMessengerMinterV2Account[TokenMessengerMinterV2Account["TokenPair"] = 6] = "TokenPair";
})(TokenMessengerMinterV2Account || (exports.TokenMessengerMinterV2Account = TokenMessengerMinterV2Account = {}));
function identifyTokenMessengerMinterV2Account(account) {
    const data = 'data' in account ? account.data : account;
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([186, 58, 212, 239, 102, 131, 157, 146])), 0)) {
        return TokenMessengerMinterV2Account.DenylistedAccount;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([159, 131, 58, 170, 193, 84, 128, 182])), 0)) {
        return TokenMessengerMinterV2Account.LocalToken;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([71, 40, 180, 142, 19, 203, 35, 252])), 0)) {
        return TokenMessengerMinterV2Account.MessageTransmitter;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([105, 115, 174, 34, 95, 233, 138, 252])), 0)) {
        return TokenMessengerMinterV2Account.RemoteTokenMessenger;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([162, 4, 242, 52, 147, 243, 221, 96])), 0)) {
        return TokenMessengerMinterV2Account.TokenMessenger;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([122, 133, 84, 63, 57, 159, 171, 206])), 0)) {
        return TokenMessengerMinterV2Account.TokenMinter;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([17, 214, 45, 176, 229, 149, 197, 71])), 0)) {
        return TokenMessengerMinterV2Account.TokenPair;
    }
    throw new Error('The provided account could not be identified as a tokenMessengerMinterV2 account.');
}
var TokenMessengerMinterV2Instruction;
(function (TokenMessengerMinterV2Instruction) {
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["AcceptOwnership"] = 0] = "AcceptOwnership";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["AddLocalToken"] = 1] = "AddLocalToken";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["AddRemoteTokenMessenger"] = 2] = "AddRemoteTokenMessenger";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["BurnTokenCustody"] = 3] = "BurnTokenCustody";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["DenylistAccount"] = 4] = "DenylistAccount";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["DepositForBurn"] = 5] = "DepositForBurn";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["DepositForBurnWithHook"] = 6] = "DepositForBurnWithHook";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["HandleReceiveFinalizedMessage"] = 7] = "HandleReceiveFinalizedMessage";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["HandleReceiveUnfinalizedMessage"] = 8] = "HandleReceiveUnfinalizedMessage";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["Initialize"] = 9] = "Initialize";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["LinkTokenPair"] = 10] = "LinkTokenPair";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["Pause"] = 11] = "Pause";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["RemoveLocalToken"] = 12] = "RemoveLocalToken";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["RemoveRemoteTokenMessenger"] = 13] = "RemoveRemoteTokenMessenger";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["SetFeeRecipient"] = 14] = "SetFeeRecipient";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["SetMaxBurnAmountPerMessage"] = 15] = "SetMaxBurnAmountPerMessage";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["SetMinFee"] = 16] = "SetMinFee";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["SetMinFeeController"] = 17] = "SetMinFeeController";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["SetTokenController"] = 18] = "SetTokenController";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["TransferOwnership"] = 19] = "TransferOwnership";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["UndenylistAccount"] = 20] = "UndenylistAccount";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["UnlinkTokenPair"] = 21] = "UnlinkTokenPair";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["Unpause"] = 22] = "Unpause";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["UpdateDenylister"] = 23] = "UpdateDenylister";
    TokenMessengerMinterV2Instruction[TokenMessengerMinterV2Instruction["UpdatePauser"] = 24] = "UpdatePauser";
})(TokenMessengerMinterV2Instruction || (exports.TokenMessengerMinterV2Instruction = TokenMessengerMinterV2Instruction = {}));
function identifyTokenMessengerMinterV2Instruction(instruction) {
    const data = 'data' in instruction ? instruction.data : instruction;
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([172, 23, 43, 13, 238, 213, 85, 150])), 0)) {
        return TokenMessengerMinterV2Instruction.AcceptOwnership;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([213, 199, 205, 18, 98, 124, 73, 198])), 0)) {
        return TokenMessengerMinterV2Instruction.AddLocalToken;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([12, 149, 172, 165, 111, 202, 24, 33])), 0)) {
        return TokenMessengerMinterV2Instruction.AddRemoteTokenMessenger;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([233, 136, 180, 175, 112, 41, 62, 71])), 0)) {
        return TokenMessengerMinterV2Instruction.BurnTokenCustody;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([101, 116, 197, 112, 81, 249, 75, 194])), 0)) {
        return TokenMessengerMinterV2Instruction.DenylistAccount;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([215, 60, 61, 46, 114, 55, 128, 176])), 0)) {
        return TokenMessengerMinterV2Instruction.DepositForBurn;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([111, 245, 62, 131, 204, 108, 223, 155])), 0)) {
        return TokenMessengerMinterV2Instruction.DepositForBurnWithHook;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([186, 252, 239, 70, 86, 180, 110, 95])), 0)) {
        return TokenMessengerMinterV2Instruction.HandleReceiveFinalizedMessage;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([200, 169, 175, 20, 200, 58, 182, 61])), 0)) {
        return TokenMessengerMinterV2Instruction.HandleReceiveUnfinalizedMessage;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([175, 175, 109, 31, 13, 152, 155, 237])), 0)) {
        return TokenMessengerMinterV2Instruction.Initialize;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([68, 162, 24, 104, 125, 46, 130, 12])), 0)) {
        return TokenMessengerMinterV2Instruction.LinkTokenPair;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([211, 22, 221, 251, 74, 121, 193, 47])), 0)) {
        return TokenMessengerMinterV2Instruction.Pause;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([27, 43, 66, 170, 188, 44, 109, 97])), 0)) {
        return TokenMessengerMinterV2Instruction.RemoveLocalToken;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([65, 114, 66, 85, 169, 98, 177, 146])), 0)) {
        return TokenMessengerMinterV2Instruction.RemoveRemoteTokenMessenger;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([227, 18, 215, 42, 237, 246, 151, 66])), 0)) {
        return TokenMessengerMinterV2Instruction.SetFeeRecipient;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([30, 128, 145, 240, 70, 237, 109, 207])), 0)) {
        return TokenMessengerMinterV2Instruction.SetMaxBurnAmountPerMessage;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([114, 198, 35, 3, 41, 196, 194, 246])), 0)) {
        return TokenMessengerMinterV2Instruction.SetMinFee;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([195, 142, 74, 84, 234, 94, 180, 113])), 0)) {
        return TokenMessengerMinterV2Instruction.SetMinFeeController;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([88, 6, 98, 10, 79, 59, 15, 24])), 0)) {
        return TokenMessengerMinterV2Instruction.SetTokenController;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([65, 177, 215, 73, 53, 45, 99, 47])), 0)) {
        return TokenMessengerMinterV2Instruction.TransferOwnership;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([57, 36, 43, 168, 62, 172, 33, 39])), 0)) {
        return TokenMessengerMinterV2Instruction.UndenylistAccount;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([52, 198, 100, 114, 104, 174, 85, 58])), 0)) {
        return TokenMessengerMinterV2Instruction.UnlinkTokenPair;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([169, 144, 4, 38, 10, 141, 188, 255])), 0)) {
        return TokenMessengerMinterV2Instruction.Unpause;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([193, 66, 198, 201, 84, 57, 14, 222])), 0)) {
        return TokenMessengerMinterV2Instruction.UpdateDenylister;
    }
    if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([140, 171, 211, 132, 57, 201, 16, 254])), 0)) {
        return TokenMessengerMinterV2Instruction.UpdatePauser;
    }
    throw new Error('The provided instruction could not be identified as a tokenMessengerMinterV2 instruction.');
}
