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