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

export type AttesterEnabledArgs = AttesterEnabled;

export function getAttesterEnabledEncoder(): FixedSizeEncoder<AttesterEnabledArgs> {
  return getStructEncoder([["attester", getAddressEncoder()]]);
}

export function getAttesterEnabledDecoder(): FixedSizeDecoder<AttesterEnabled> {
  return getStructDecoder([["attester", getAddressDecoder()]]);
}

export function getAttesterEnabledCodec(): FixedSizeCodec<
  AttesterEnabledArgs,
  AttesterEnabled
> {
  return combineCodec(getAttesterEnabledEncoder(), getAttesterEnabledDecoder());
}
