/**
 * 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,
  getU64Decoder,
  getU64Encoder,
  type Address,
  type FixedSizeCodec,
  type FixedSizeDecoder,
  type FixedSizeEncoder,
} from "@solana/kit";

export type MinimumDepositAmountSet = { amount: bigint; burnToken: Address };

export type MinimumDepositAmountSetArgs = {
  amount: number | bigint;
  burnToken: Address;
};

export function getMinimumDepositAmountSetEncoder(): FixedSizeEncoder<MinimumDepositAmountSetArgs> {
  return getStructEncoder([
    ["amount", getU64Encoder()],
    ["burnToken", getAddressEncoder()],
  ]);
}

export function getMinimumDepositAmountSetDecoder(): FixedSizeDecoder<MinimumDepositAmountSet> {
  return getStructDecoder([
    ["amount", getU64Decoder()],
    ["burnToken", getAddressDecoder()],
  ]);
}

export function getMinimumDepositAmountSetCodec(): FixedSizeCodec<
  MinimumDepositAmountSetArgs,
  MinimumDepositAmountSet
> {
  return combineCodec(
    getMinimumDepositAmountSetEncoder(),
    getMinimumDepositAmountSetDecoder(),
  );
}
