"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.getMessageReceivedEncoder = getMessageReceivedEncoder;
exports.getMessageReceivedDecoder = getMessageReceivedDecoder;
exports.getMessageReceivedCodec = getMessageReceivedCodec;
const kit_1 = require("@solana/kit");
function getMessageReceivedEncoder() {
    return (0, kit_1.getStructEncoder)([
        ['caller', (0, kit_1.getAddressEncoder)()],
        ['sourceDomain', (0, kit_1.getU32Encoder)()],
        ['nonce', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
        ['sender', (0, kit_1.getAddressEncoder)()],
        ['finalityThresholdExecuted', (0, kit_1.getU32Encoder)()],
        ['messageBody', (0, kit_1.addEncoderSizePrefix)((0, kit_1.getBytesEncoder)(), (0, kit_1.getU32Encoder)())],
    ]);
}
function getMessageReceivedDecoder() {
    return (0, kit_1.getStructDecoder)([
        ['caller', (0, kit_1.getAddressDecoder)()],
        ['sourceDomain', (0, kit_1.getU32Decoder)()],
        ['nonce', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
        ['sender', (0, kit_1.getAddressDecoder)()],
        ['finalityThresholdExecuted', (0, kit_1.getU32Decoder)()],
        ['messageBody', (0, kit_1.addDecoderSizePrefix)((0, kit_1.getBytesDecoder)(), (0, kit_1.getU32Decoder)())],
    ]);
}
function getMessageReceivedCodec() {
    return (0, kit_1.combineCodec)(getMessageReceivedEncoder(), getMessageReceivedDecoder());
}
