"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.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_RECIPIENT_KEY = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__RENT_CLAIM_OVERFLOW = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__MISSING_RENT_CLAIM_ACCOUNT = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__DEPOSIT_AMOUNT_BELOW_MINIMUM = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__SIGNER_UNCHANGED = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__QUOTE_DEADLINE_NOT_PASSED = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__AMOUNT_NOT_POSITIVE = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_BURN_TOKEN = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__CANNOT_SET_CURRENT_TIME = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_PROGRAM_DATA = exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__NOT_UPGRADE_AUTHORITY = void 0;
exports.getSponsoredCctpSrcPeripheryErrorMessage = getSponsoredCctpSrcPeripheryErrorMessage;
exports.isSponsoredCctpSrcPeripheryError = isSponsoredCctpSrcPeripheryError;
const kit_1 = require("@solana/kit");
const programs_1 = require("../programs");
/** NotUpgradeAuthority: Only the upgrade authority can call this instruction */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__NOT_UPGRADE_AUTHORITY = 0x1770; // 6000
/** InvalidProgramData: Invalid program data account */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_PROGRAM_DATA = 0x1771; // 6001
/** CannotSetCurrentTime: Cannot set time if not in test mode */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__CANNOT_SET_CURRENT_TIME = 0x1772; // 6002
/** InvalidBurnToken: Invalid burn_token key */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_BURN_TOKEN = 0x1773; // 6003
/** AmountNotPositive: Amount must be greater than 0 */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__AMOUNT_NOT_POSITIVE = 0x1774; // 6004
/** QuoteDeadlineNotPassed: The quote deadline has not passed! */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__QUOTE_DEADLINE_NOT_PASSED = 0x1775; // 6005
/** SignerUnchanged: New signer unchanged */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__SIGNER_UNCHANGED = 0x1776; // 6006
/** DepositAmountBelowMinimum: Deposit amount below minimum */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__DEPOSIT_AMOUNT_BELOW_MINIMUM = 0x1777; // 6007
/** MissingRentClaimAccount: Missing rent claim account */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__MISSING_RENT_CLAIM_ACCOUNT = 0x1778; // 6008
/** RentClaimOverflow: Rent claim amount overflow */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__RENT_CLAIM_OVERFLOW = 0x1779; // 6009
/** InvalidRecipientKey: Invalid recipient key */
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_RECIPIENT_KEY = 0x177a; // 6010
let sponsoredCctpSrcPeripheryErrorMessages;
if (process.env.NODE_ENV !== 'production') {
    sponsoredCctpSrcPeripheryErrorMessages = {
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__AMOUNT_NOT_POSITIVE]: `Amount must be greater than 0`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__CANNOT_SET_CURRENT_TIME]: `Cannot set time if not in test mode`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__DEPOSIT_AMOUNT_BELOW_MINIMUM]: `Deposit amount below minimum`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_BURN_TOKEN]: `Invalid burn_token key`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_PROGRAM_DATA]: `Invalid program data account`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_RECIPIENT_KEY]: `Invalid recipient key`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__MISSING_RENT_CLAIM_ACCOUNT]: `Missing rent claim account`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__NOT_UPGRADE_AUTHORITY]: `Only the upgrade authority can call this instruction`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__QUOTE_DEADLINE_NOT_PASSED]: `The quote deadline has not passed!`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__RENT_CLAIM_OVERFLOW]: `Rent claim amount overflow`,
        [exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__SIGNER_UNCHANGED]: `New signer unchanged`,
    };
}
function getSponsoredCctpSrcPeripheryErrorMessage(code) {
    if (process.env.NODE_ENV !== 'production') {
        return sponsoredCctpSrcPeripheryErrorMessages[code];
    }
    return 'Error message not available in production bundles.';
}
function isSponsoredCctpSrcPeripheryError(error, transactionMessage, code) {
    return (0, kit_1.isProgramError)(error, transactionMessage, programs_1.SPONSORED_CCTP_SRC_PERIPHERY_PROGRAM_ADDRESS, code);
}
