/**
 * 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
 */
var _a;
import { isProgramError, } from "@solana/kit";
import { TOKEN_MESSENGER_MINTER_PROGRAM_ADDRESS } from "../programs";
/** InvalidAuthority: Invalid authority */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_AUTHORITY = 0x1770; // 6000
/** InvalidTokenMessengerState: Invalid token messenger state */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_MESSENGER_STATE = 0x1771; // 6001
/** InvalidTokenMessenger: Invalid token messenger */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_MESSENGER = 0x1772; // 6002
/** InvalidOwner: Invalid owner */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_OWNER = 0x1773; // 6003
/** MalformedMessage: Malformed message */
export var TOKEN_MESSENGER_MINTER_ERROR__MALFORMED_MESSAGE = 0x1774; // 6004
/** InvalidMessageBodyVersion: Invalid message body version */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_MESSAGE_BODY_VERSION = 0x1775; // 6005
/** InvalidAmount: Invalid amount */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_AMOUNT = 0x1776; // 6006
/** InvalidDestinationDomain: Invalid destination domain */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_DESTINATION_DOMAIN = 0x1777; // 6007
/** InvalidDestinationCaller: Invalid destination caller */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_DESTINATION_CALLER = 0x1778; // 6008
/** InvalidMintRecipient: Invalid mint recipient */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_MINT_RECIPIENT = 0x1779; // 6009
/** InvalidSender: Invalid sender */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_SENDER = 0x177a; // 6010
/** InvalidTokenPair: Invalid token pair */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_PAIR = 0x177b; // 6011
/** InvalidTokenMint: Invalid token mint */
export var TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_MINT = 0x177c; // 6012
var tokenMessengerMinterErrorMessages;
if (process.env.NODE_ENV !== "production") {
    tokenMessengerMinterErrorMessages = (_a = {},
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_AMOUNT] = "Invalid amount",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_AUTHORITY] = "Invalid authority",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_DESTINATION_CALLER] = "Invalid destination caller",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_DESTINATION_DOMAIN] = "Invalid destination domain",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_MESSAGE_BODY_VERSION] = "Invalid message body version",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_MINT_RECIPIENT] = "Invalid mint recipient",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_OWNER] = "Invalid owner",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_SENDER] = "Invalid sender",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_MESSENGER] = "Invalid token messenger",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_MESSENGER_STATE] = "Invalid token messenger state",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_MINT] = "Invalid token mint",
        _a[TOKEN_MESSENGER_MINTER_ERROR__INVALID_TOKEN_PAIR] = "Invalid token pair",
        _a[TOKEN_MESSENGER_MINTER_ERROR__MALFORMED_MESSAGE] = "Malformed message",
        _a);
}
export function getTokenMessengerMinterErrorMessage(code) {
    if (process.env.NODE_ENV !== "production") {
        return tokenMessengerMinterErrorMessages[code];
    }
    return "Error message not available in production bundles.";
}
export function isTokenMessengerMinterError(error, transactionMessage, code) {
    return isProgramError(error, transactionMessage, TOKEN_MESSENGER_MINTER_PROGRAM_ADDRESS, code);
}
//# sourceMappingURL=tokenMessengerMinter.js.map