"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRelayDataEncoder = getRelayDataEncoder;
exports.getRelayDataDecoder = getRelayDataDecoder;
exports.getRelayDataCodec = getRelayDataCodec;
var kit_1 = require("@solana/kit");
function getRelayDataEncoder() {
    return (0, kit_1.getStructEncoder)([
        ["depositor", (0, kit_1.getAddressEncoder)()],
        ["recipient", (0, kit_1.getAddressEncoder)()],
        ["exclusiveRelayer", (0, kit_1.getAddressEncoder)()],
        ["inputToken", (0, kit_1.getAddressEncoder)()],
        ["outputToken", (0, kit_1.getAddressEncoder)()],
        ["inputAmount", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
        ["outputAmount", (0, kit_1.getU64Encoder)()],
        ["originChainId", (0, kit_1.getU64Encoder)()],
        ["depositId", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
        ["fillDeadline", (0, kit_1.getU32Encoder)()],
        ["exclusivityDeadline", (0, kit_1.getU32Encoder)()],
        ["message", (0, kit_1.addEncoderSizePrefix)((0, kit_1.getBytesEncoder)(), (0, kit_1.getU32Encoder)())],
    ]);
}
function getRelayDataDecoder() {
    return (0, kit_1.getStructDecoder)([
        ["depositor", (0, kit_1.getAddressDecoder)()],
        ["recipient", (0, kit_1.getAddressDecoder)()],
        ["exclusiveRelayer", (0, kit_1.getAddressDecoder)()],
        ["inputToken", (0, kit_1.getAddressDecoder)()],
        ["outputToken", (0, kit_1.getAddressDecoder)()],
        ["inputAmount", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
        ["outputAmount", (0, kit_1.getU64Decoder)()],
        ["originChainId", (0, kit_1.getU64Decoder)()],
        ["depositId", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
        ["fillDeadline", (0, kit_1.getU32Decoder)()],
        ["exclusivityDeadline", (0, kit_1.getU32Decoder)()],
        ["message", (0, kit_1.addDecoderSizePrefix)((0, kit_1.getBytesDecoder)(), (0, kit_1.getU32Decoder)())],
    ]);
}
function getRelayDataCodec() {
    return (0, kit_1.combineCodec)(getRelayDataEncoder(), getRelayDataDecoder());
}
//# sourceMappingURL=relayData.js.map