@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
25 lines (19 loc) • 1.26 kB
text/typescript
/**
* 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, getU128Decoder, getU128Encoder, getU16Decoder, getU16Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
export type RebalanceExpanderState = { initialPoolPrice: bigint; expansionCount: number; };
export type RebalanceExpanderStateArgs = { initialPoolPrice: number | bigint; expansionCount: number; };
export function getRebalanceExpanderStateEncoder(): FixedSizeEncoder<RebalanceExpanderStateArgs> {
return getStructEncoder([['initialPoolPrice', getU128Encoder()], ['expansionCount', getU16Encoder()]]);
}
export function getRebalanceExpanderStateDecoder(): FixedSizeDecoder<RebalanceExpanderState> {
return getStructDecoder([['initialPoolPrice', getU128Decoder()], ['expansionCount', getU16Decoder()]]);
}
export function getRebalanceExpanderStateCodec(): FixedSizeCodec<RebalanceExpanderStateArgs, RebalanceExpanderState> {
return combineCodec(getRebalanceExpanderStateEncoder(), getRebalanceExpanderStateDecoder());
}