/** * 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, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type DiscountToMaturityData = { discountPerYearBps: number; maturityTimestamp: bigint; }; export type DiscountToMaturityDataArgs = { discountPerYearBps: number; maturityTimestamp: number | bigint; }; export function getDiscountToMaturityDataEncoder(): FixedSizeEncoder { return getStructEncoder([ ["discountPerYearBps", getU16Encoder()], ["maturityTimestamp", getI64Encoder()], ]); } export function getDiscountToMaturityDataDecoder(): FixedSizeDecoder { return getStructDecoder([ ["discountPerYearBps", getU16Decoder()], ["maturityTimestamp", getI64Decoder()], ]); } export function getDiscountToMaturityDataCodec(): FixedSizeCodec< DiscountToMaturityDataArgs, DiscountToMaturityData > { return combineCodec( getDiscountToMaturityDataEncoder(), getDiscountToMaturityDataDecoder(), ); }