/** * 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 type { Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, } from "@solana/kit"; import { combineCodec, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, } from "@solana/kit"; export interface WhirlpoolRewardInfo { mint: Address; vault: Address; authority: Address; emissionsPerSecondX64: bigint; growthGlobalX64: bigint; } export interface WhirlpoolRewardInfoArgs { mint: Address; vault: Address; authority: Address; emissionsPerSecondX64: number | bigint; growthGlobalX64: number | bigint; } export function getWhirlpoolRewardInfoEncoder(): FixedSizeEncoder { return getStructEncoder([ ["mint", getAddressEncoder()], ["vault", getAddressEncoder()], ["authority", getAddressEncoder()], ["emissionsPerSecondX64", getU128Encoder()], ["growthGlobalX64", getU128Encoder()], ]); } export function getWhirlpoolRewardInfoDecoder(): FixedSizeDecoder { return getStructDecoder([ ["mint", getAddressDecoder()], ["vault", getAddressDecoder()], ["authority", getAddressDecoder()], ["emissionsPerSecondX64", getU128Decoder()], ["growthGlobalX64", getU128Decoder()], ]); } export function getWhirlpoolRewardInfoCodec(): FixedSizeCodec< WhirlpoolRewardInfoArgs, WhirlpoolRewardInfo > { return combineCodec( getWhirlpoolRewardInfoEncoder(), getWhirlpoolRewardInfoDecoder(), ); }