UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

26 lines (20 loc) 1.27 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, getStructDecoder, getStructEncoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit'; import { getRebalanceTakeProfitStepDecoder, getRebalanceTakeProfitStepEncoder, type RebalanceTakeProfitStep, type RebalanceTakeProfitStepArgs } from '.'; export type RebalanceTakeProfitState = { step: RebalanceTakeProfitStep; }; export type RebalanceTakeProfitStateArgs = { step: RebalanceTakeProfitStepArgs; }; export function getRebalanceTakeProfitStateEncoder(): FixedSizeEncoder<RebalanceTakeProfitStateArgs> { return getStructEncoder([['step', getRebalanceTakeProfitStepEncoder()]]); } export function getRebalanceTakeProfitStateDecoder(): FixedSizeDecoder<RebalanceTakeProfitState> { return getStructDecoder([['step', getRebalanceTakeProfitStepDecoder()]]); } export function getRebalanceTakeProfitStateCodec(): FixedSizeCodec<RebalanceTakeProfitStateArgs, RebalanceTakeProfitState> { return combineCodec(getRebalanceTakeProfitStateEncoder(), getRebalanceTakeProfitStateDecoder()); }