/** * 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, getBooleanDecoder, getBooleanEncoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type RequestWithdrawVaultEvent = { vault: Address; user: Address; requestedAmount: bigint; isAmountInLp: boolean; isWithdrawAll: boolean; requestWithdrawVaultReceipt: Address; amountLpEscrowed: bigint; amountAssetToWithdrawDecimalBits: bigint; withdrawableFromTs: bigint; vaultAssetMint: Address; vaultAssetTotalValueUnlocked: bigint; vaultAssetTotalValue: bigint; vaultLpSupplyInclFees: bigint; requestedTs: bigint; }; export type RequestWithdrawVaultEventArgs = { vault: Address; user: Address; requestedAmount: number | bigint; isAmountInLp: boolean; isWithdrawAll: boolean; requestWithdrawVaultReceipt: Address; amountLpEscrowed: number | bigint; amountAssetToWithdrawDecimalBits: number | bigint; withdrawableFromTs: number | bigint; vaultAssetMint: Address; vaultAssetTotalValueUnlocked: number | bigint; vaultAssetTotalValue: number | bigint; vaultLpSupplyInclFees: number | bigint; requestedTs: number | bigint; }; export function getRequestWithdrawVaultEventEncoder(): FixedSizeEncoder { return getStructEncoder([ ["vault", getAddressEncoder()], ["user", getAddressEncoder()], ["requestedAmount", getU64Encoder()], ["isAmountInLp", getBooleanEncoder()], ["isWithdrawAll", getBooleanEncoder()], ["requestWithdrawVaultReceipt", getAddressEncoder()], ["amountLpEscrowed", getU64Encoder()], ["amountAssetToWithdrawDecimalBits", getU128Encoder()], ["withdrawableFromTs", getU64Encoder()], ["vaultAssetMint", getAddressEncoder()], ["vaultAssetTotalValueUnlocked", getU64Encoder()], ["vaultAssetTotalValue", getU64Encoder()], ["vaultLpSupplyInclFees", getU64Encoder()], ["requestedTs", getU64Encoder()], ]); } export function getRequestWithdrawVaultEventDecoder(): FixedSizeDecoder { return getStructDecoder([ ["vault", getAddressDecoder()], ["user", getAddressDecoder()], ["requestedAmount", getU64Decoder()], ["isAmountInLp", getBooleanDecoder()], ["isWithdrawAll", getBooleanDecoder()], ["requestWithdrawVaultReceipt", getAddressDecoder()], ["amountLpEscrowed", getU64Decoder()], ["amountAssetToWithdrawDecimalBits", getU128Decoder()], ["withdrawableFromTs", getU64Decoder()], ["vaultAssetMint", getAddressDecoder()], ["vaultAssetTotalValueUnlocked", getU64Decoder()], ["vaultAssetTotalValue", getU64Decoder()], ["vaultLpSupplyInclFees", getU64Decoder()], ["requestedTs", getU64Decoder()], ]); } export function getRequestWithdrawVaultEventCodec(): FixedSizeCodec< RequestWithdrawVaultEventArgs, RequestWithdrawVaultEvent > { return combineCodec( getRequestWithdrawVaultEventEncoder(), getRequestWithdrawVaultEventDecoder(), ); }