/** * 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, getU128Decoder, getU128Encoder, getU16Decoder, getU16Encoder, getU64Decoder, getU64Encoder, type Codec, type Decoder, type Encoder, type Option, type OptionOrNullable, } from "@solana/kit"; export type VestingParameters = { cliffPoint: Option; periodFrequency: bigint; cliffUnlockLiquidity: bigint; liquidityPerPeriod: bigint; numberOfPeriod: number; }; export type VestingParametersArgs = { cliffPoint: OptionOrNullable; periodFrequency: number | bigint; cliffUnlockLiquidity: number | bigint; liquidityPerPeriod: number | bigint; numberOfPeriod: number; }; export function getVestingParametersEncoder(): Encoder { return getStructEncoder([ ["cliffPoint", getOptionEncoder(getU64Encoder())], ["periodFrequency", getU64Encoder()], ["cliffUnlockLiquidity", getU128Encoder()], ["liquidityPerPeriod", getU128Encoder()], ["numberOfPeriod", getU16Encoder()], ]); } export function getVestingParametersDecoder(): Decoder { return getStructDecoder([ ["cliffPoint", getOptionDecoder(getU64Decoder())], ["periodFrequency", getU64Decoder()], ["cliffUnlockLiquidity", getU128Decoder()], ["liquidityPerPeriod", getU128Decoder()], ["numberOfPeriod", getU16Decoder()], ]); } export function getVestingParametersCodec(): Codec< VestingParametersArgs, VestingParameters > { return combineCodec( getVestingParametersEncoder(), getVestingParametersDecoder(), ); }