/** * 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, getBooleanDecoder, getBooleanEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; /** Price data for ChainlinkX type (v10) */ export type ChainlinkXPriceData = { observationsTimestamp: bigint; suspended: boolean; activationDateTime: bigint; }; export type ChainlinkXPriceDataArgs = { observationsTimestamp: number | bigint; suspended: boolean; activationDateTime: number | bigint; }; export function getChainlinkXPriceDataEncoder(): FixedSizeEncoder { return getStructEncoder([ ["observationsTimestamp", getU64Encoder()], ["suspended", getBooleanEncoder()], ["activationDateTime", getU64Encoder()], ]); } export function getChainlinkXPriceDataDecoder(): FixedSizeDecoder { return getStructDecoder([ ["observationsTimestamp", getU64Decoder()], ["suspended", getBooleanDecoder()], ["activationDateTime", getU64Decoder()], ]); } export function getChainlinkXPriceDataCodec(): FixedSizeCodec< ChainlinkXPriceDataArgs, ChainlinkXPriceData > { return combineCodec( getChainlinkXPriceDataEncoder(), getChainlinkXPriceDataDecoder(), ); }