/** * 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, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; import { getAddLiquidityParametersDecoder, getAddLiquidityParametersEncoder, type AddLiquidityParameters, type AddLiquidityParametersArgs, } from "./index.js"; export type EvtAddLiquidity = { pool: Address; position: Address; owner: Address; params: AddLiquidityParameters; tokenAAmount: bigint; tokenBAmount: bigint; totalAmountA: bigint; totalAmountB: bigint; }; export type EvtAddLiquidityArgs = { pool: Address; position: Address; owner: Address; params: AddLiquidityParametersArgs; tokenAAmount: number | bigint; tokenBAmount: number | bigint; totalAmountA: number | bigint; totalAmountB: number | bigint; }; export function getEvtAddLiquidityEncoder(): FixedSizeEncoder { return getStructEncoder([ ["pool", getAddressEncoder()], ["position", getAddressEncoder()], ["owner", getAddressEncoder()], ["params", getAddLiquidityParametersEncoder()], ["tokenAAmount", getU64Encoder()], ["tokenBAmount", getU64Encoder()], ["totalAmountA", getU64Encoder()], ["totalAmountB", getU64Encoder()], ]); } export function getEvtAddLiquidityDecoder(): FixedSizeDecoder { return getStructDecoder([ ["pool", getAddressDecoder()], ["position", getAddressDecoder()], ["owner", getAddressDecoder()], ["params", getAddLiquidityParametersDecoder()], ["tokenAAmount", getU64Decoder()], ["tokenBAmount", getU64Decoder()], ["totalAmountA", getU64Decoder()], ["totalAmountB", getU64Decoder()], ]); } export function getEvtAddLiquidityCodec(): FixedSizeCodec< EvtAddLiquidityArgs, EvtAddLiquidity > { return combineCodec(getEvtAddLiquidityEncoder(), getEvtAddLiquidityDecoder()); }