UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

26 lines (20 loc) 1.31 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, getU8Decoder, getU8Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit'; import { getAccountsTypeDecoder, getAccountsTypeEncoder, type AccountsType, type AccountsTypeArgs } from '.'; export type RemainingAccountsSlice = { accountsType: AccountsType; length: number; }; export type RemainingAccountsSliceArgs = { accountsType: AccountsTypeArgs; length: number; }; export function getRemainingAccountsSliceEncoder(): FixedSizeEncoder<RemainingAccountsSliceArgs> { return getStructEncoder([['accountsType', getAccountsTypeEncoder()], ['length', getU8Encoder()]]); } export function getRemainingAccountsSliceDecoder(): FixedSizeDecoder<RemainingAccountsSlice> { return getStructDecoder([['accountsType', getAccountsTypeDecoder()], ['length', getU8Decoder()]]); } export function getRemainingAccountsSliceCodec(): FixedSizeCodec<RemainingAccountsSliceArgs, RemainingAccountsSlice> { return combineCodec(getRemainingAccountsSliceEncoder(), getRemainingAccountsSliceDecoder()); }