/**
 * 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 FeeRecipientSet = { newFeeRecipient: Address };

export type FeeRecipientSetArgs = FeeRecipientSet;

export function getFeeRecipientSetEncoder(): FixedSizeEncoder<FeeRecipientSetArgs> {
  return getStructEncoder([["newFeeRecipient", getAddressEncoder()]]);
}

export function getFeeRecipientSetDecoder(): FixedSizeDecoder<FeeRecipientSet> {
  return getStructDecoder([["newFeeRecipient", getAddressDecoder()]]);
}

export function getFeeRecipientSetCodec(): FixedSizeCodec<
  FeeRecipientSetArgs,
  FeeRecipientSet
> {
  return combineCodec(getFeeRecipientSetEncoder(), getFeeRecipientSetDecoder());
}
