/** * 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, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; /** * Fee rate as a ratio, minted on `UpdateStakePoolBalance` as a proportion of * the rewards * If either the numerator or the denominator is 0, the fee is considered to be * 0 */ export type Fee = { /** denominator of the fee ratio */ denominator: bigint; /** numerator of the fee ratio */ numerator: bigint; }; export type FeeArgs = { /** denominator of the fee ratio */ denominator: number | bigint; /** numerator of the fee ratio */ numerator: number | bigint; }; export function getFeeEncoder(): FixedSizeEncoder { return getStructEncoder([ ["denominator", getU64Encoder()], ["numerator", getU64Encoder()], ]); } export function getFeeDecoder(): FixedSizeDecoder { return getStructDecoder([ ["denominator", getU64Decoder()], ["numerator", getU64Decoder()], ]); } export function getFeeCodec(): FixedSizeCodec { return combineCodec(getFeeEncoder(), getFeeDecoder()); }