UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

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