/** * 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 { Codec, Decoder, Encoder } from "@solana/kit"; import type { RemainingAccountsSlice, RemainingAccountsSliceArgs, } from "./index.js"; import { combineCodec, getArrayDecoder, getArrayEncoder, getStructDecoder, getStructEncoder, } from "@solana/kit"; import { getRemainingAccountsSliceDecoder, getRemainingAccountsSliceEncoder, } from "./index.js"; export interface RemainingAccountsInfo { slices: RemainingAccountsSlice[]; } export interface RemainingAccountsInfoArgs { slices: RemainingAccountsSliceArgs[]; } export function getRemainingAccountsInfoEncoder(): Encoder { return getStructEncoder([ ["slices", getArrayEncoder(getRemainingAccountsSliceEncoder())], ]); } export function getRemainingAccountsInfoDecoder(): Decoder { return getStructDecoder([ ["slices", getArrayDecoder(getRemainingAccountsSliceDecoder())], ]); } export function getRemainingAccountsInfoCodec(): Codec< RemainingAccountsInfoArgs, RemainingAccountsInfo > { return combineCodec( getRemainingAccountsInfoEncoder(), getRemainingAccountsInfoDecoder(), ); }