/**
 * 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 LocalTokenRemoved = { custody: Address; mint: Address };

export type LocalTokenRemovedArgs = LocalTokenRemoved;

export function getLocalTokenRemovedEncoder(): FixedSizeEncoder<LocalTokenRemovedArgs> {
  return getStructEncoder([
    ["custody", getAddressEncoder()],
    ["mint", getAddressEncoder()],
  ]);
}

export function getLocalTokenRemovedDecoder(): FixedSizeDecoder<LocalTokenRemoved> {
  return getStructDecoder([
    ["custody", getAddressDecoder()],
    ["mint", getAddressDecoder()],
  ]);
}

export function getLocalTokenRemovedCodec(): FixedSizeCodec<
  LocalTokenRemovedArgs,
  LocalTokenRemoved
> {
  return combineCodec(
    getLocalTokenRemovedEncoder(),
    getLocalTokenRemovedDecoder(),
  );
}
