/** * 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, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, type Codec, type Decoder, type Encoder, type Option, type OptionOrNullable, } from '@solana/kit'; import { getCelestialBodyTypeBorshDecoder, getCelestialBodyTypeBorshEncoder, getNameDecoder, getNameEncoder, type CelestialBodyTypeBorsh, type CelestialBodyTypeBorshArgs, type Name, type NameArgs, } from '.'; export type UpdateCelestialBodyArgs = { /** `CelestialBody` name */ name: Option; /** `CelestialBody` type */ celestialBodyType: Option; }; export type UpdateCelestialBodyArgsArgs = { /** `CelestialBody` name */ name: OptionOrNullable; /** `CelestialBody` type */ celestialBodyType: OptionOrNullable; }; export function getUpdateCelestialBodyArgsEncoder(): Encoder { return getStructEncoder([ ['name', getOptionEncoder(getNameEncoder())], ['celestialBodyType', getOptionEncoder(getCelestialBodyTypeBorshEncoder())], ]); } export function getUpdateCelestialBodyArgsDecoder(): Decoder { return getStructDecoder([ ['name', getOptionDecoder(getNameDecoder())], ['celestialBodyType', getOptionDecoder(getCelestialBodyTypeBorshDecoder())], ]); } export function getUpdateCelestialBodyArgsCodec(): Codec< UpdateCelestialBodyArgsArgs, UpdateCelestialBodyArgs > { return combineCodec( getUpdateCelestialBodyArgsEncoder(), getUpdateCelestialBodyArgsDecoder(), ); }