/**
 * 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
 */

import {
  combineCodec,
  getAddressDecoder,
  getAddressEncoder,
  getStructDecoder,
  getStructEncoder,
  type Address,
  type FixedSizeCodec,
  type FixedSizeDecoder,
  type FixedSizeEncoder,
} from "@solana/kit";

export type CreatedEventAccount = { messageSentEventData: Address };

export type CreatedEventAccountArgs = CreatedEventAccount;

export function getCreatedEventAccountEncoder(): FixedSizeEncoder<CreatedEventAccountArgs> {
  return getStructEncoder([["messageSentEventData", getAddressEncoder()]]);
}

export function getCreatedEventAccountDecoder(): FixedSizeDecoder<CreatedEventAccount> {
  return getStructDecoder([["messageSentEventData", getAddressDecoder()]]);
}

export function getCreatedEventAccountCodec(): FixedSizeCodec<
  CreatedEventAccountArgs,
  CreatedEventAccount
> {
  return combineCodec(
    getCreatedEventAccountEncoder(),
    getCreatedEventAccountDecoder(),
  );
}
