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

export type SetXDomainAdminArgs = SetXDomainAdmin;

export function getSetXDomainAdminEncoder(): FixedSizeEncoder<SetXDomainAdminArgs> {
  return getStructEncoder([["newAdmin", getAddressEncoder()]]);
}

export function getSetXDomainAdminDecoder(): FixedSizeDecoder<SetXDomainAdmin> {
  return getStructDecoder([["newAdmin", getAddressDecoder()]]);
}

export function getSetXDomainAdminCodec(): FixedSizeCodec<
  SetXDomainAdminArgs,
  SetXDomainAdmin
> {
  return combineCodec(getSetXDomainAdminEncoder(), getSetXDomainAdminDecoder());
}
