"use strict";
var _a;
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;
var kit_1 = require("@solana/kit");
var programs_1 = require("../programs");
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__NOT_UPGRADE_AUTHORITY = 0x1770;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_PROGRAM_DATA = 0x1771;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__CANNOT_SET_CURRENT_TIME = 0x1772;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_BURN_TOKEN = 0x1773;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__AMOUNT_NOT_POSITIVE = 0x1774;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__QUOTE_DEADLINE_NOT_PASSED = 0x1775;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__SIGNER_UNCHANGED = 0x1776;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__DEPOSIT_AMOUNT_BELOW_MINIMUM = 0x1777;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__MISSING_RENT_CLAIM_ACCOUNT = 0x1778;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__RENT_CLAIM_OVERFLOW = 0x1779;
exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_RECIPIENT_KEY = 0x177a;
var sponsoredCctpSrcPeripheryErrorMessages;
if (process.env.NODE_ENV !== "production") {
    sponsoredCctpSrcPeripheryErrorMessages = (_a = {},
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__AMOUNT_NOT_POSITIVE] = "Amount must be greater than 0",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__CANNOT_SET_CURRENT_TIME] = "Cannot set time if not in test mode",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__DEPOSIT_AMOUNT_BELOW_MINIMUM] = "Deposit amount below minimum",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_BURN_TOKEN] = "Invalid burn_token key",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_PROGRAM_DATA] = "Invalid program data account",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__INVALID_RECIPIENT_KEY] = "Invalid recipient key",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__MISSING_RENT_CLAIM_ACCOUNT] = "Missing rent claim account",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__NOT_UPGRADE_AUTHORITY] = "Only the upgrade authority can call this instruction",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__QUOTE_DEADLINE_NOT_PASSED] = "The quote deadline has not passed!",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__RENT_CLAIM_OVERFLOW] = "Rent claim amount overflow",
        _a[exports.SPONSORED_CCTP_SRC_PERIPHERY_ERROR__SIGNER_UNCHANGED] = "New signer unchanged",
        _a);
}
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);
}
//# sourceMappingURL=sponsoredCctpSrcPeriphery.js.map