/** * 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, getEnumDecoder, getEnumEncoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; const FundingTypeLookup = { 0: "StakeDeposit", 1: "SolDeposit", 2: "SolWithdraw", StakeDeposit: 0, SolDeposit: 1, SolWithdraw: 2, } as const; /** * Defines which authority to update in the `SetFundingAuthority` * instruction */ export const FundingType: Omit = FundingTypeLookup; export type FundingType = (typeof FundingType)[keyof typeof FundingType]; export type FundingTypeArgs = FundingType; export function getFundingTypeEncoder(): FixedSizeEncoder { return getEnumEncoder(FundingType); } export function getFundingTypeDecoder(): FixedSizeDecoder { return getEnumDecoder(FundingType); } export function getFundingTypeCodec(): FixedSizeCodec< FundingTypeArgs, FundingType > { return combineCodec(getFundingTypeEncoder(), getFundingTypeDecoder()); }