import { BatchDto, ChainCallDTO, FetchAllowancesResponse, GalaChainResponse, TokenAllowance } from "@gala-chain/api"; import { GalaChainContext, GalaContract } from "@gala-chain/chaincode"; import { AddLiquidityDTO, AuthorizeBatchSubmitterDto, BatchSubmitAuthoritiesResDto, BurnDto, BurnEstimateDto, CancelLimitOrderDto, CollectDto, CollectProtocolFeesDto, CollectProtocolFeesResDto, CompositePoolDto, ConfigureDexFeeAddressDto, ConfigurePoolDexFeeDto, ConfigurePoolDexFeeResDto, CreatePoolDto, CreatePoolResDto, DeauthorizeBatchSubmitterDto, DeleteSwapAllowancesDto, DexFeeConfig, DexOperationResDto, DexPositionData, DexPositionOwner, FetchBatchSubmitAuthoritiesDto, FetchSwapAllowancesDto, FillLimitOrderDto, GetAddLiquidityEstimationDto, GetAddLiquidityEstimationResDto, GetBitMapResDto, GetCompositePoolDto, GetLiquidityResDto, GetPoolBalanceDeltaResDto, GetPoolDto, GetPositionByIdDto, GetPositionDto, GetRemoveLiqEstimationResDto, GetTickDataDto, GetUserPositionsDto, GetUserPositionsResDto, GrantBulkSwapAllowanceDto, GrantSwapAllowanceDto, MakePoolPublicDto, ManageWhitelistDto, PlaceLimitOrderDto, PlaceLimitOrderResDto, Pool, QuoteExactAmountDto, QuoteExactAmountResDto, SetGlobalLimitOrderConfigDto, SetProtocolFeeDto, SetProtocolFeeResDto, Slot0ResDto, SwapDto, SwapResDto, TickData, TransferDexPositionDto } from "../api/"; /** * DexV3Contract provides Uniswap V3-style decentralized exchange functionality * including concentrated liquidity, limit orders, and automated market making. * * This contract implements a complete DEX with the following features: * - Liquidity pools with concentrated liquidity positions * - Token swapping with price impact calculations * - Limit order placement and execution using commit-reveal protocol * - Fee collection for liquidity providers and protocol * - Position management and transfers * * @extends GalaContract */ export declare class DexV3Contract extends GalaContract { /** * Creates a new DexV3Contract instance. */ constructor(); BatchSubmit(ctx: GalaChainContext, batchDto: BatchDto): Promise[]>; /** * Creates a new liquidity pool for a token pair with specified fee tier. * * @param ctx - The GalaChain context * @param dto - Pool creation parameters including tokens, fee tier, and initial price * @returns Response containing the created pool details */ CreatePool(ctx: GalaChainContext, dto: CreatePoolDto): Promise; /** * Adds liquidity to an existing pool within a specified price range. * * @param ctx - The GalaChain context * @param dto - Liquidity addition parameters including amounts and tick range * @returns Operation result with transaction details */ AddLiquidity(ctx: GalaChainContext, dto: AddLiquidityDTO): Promise; /** * Executes a token swap through the automated market maker. * * @param ctx - The GalaChain context * @param dto - Swap parameters including tokens, amounts, and slippage protection * @returns Swap result with executed amounts and fees */ Swap(ctx: GalaChainContext, dto: SwapDto): Promise; /** * Removes liquidity from a position and returns tokens to the user. * * @param ctx - The GalaChain context * @param dto - Liquidity removal parameters including position and amount * @returns Operation result with withdrawn token amounts */ RemoveLiquidity(ctx: GalaChainContext, dto: BurnDto): Promise; /** * Retrieves the current price and tick information for a pool. * * @param ctx - The GalaChain context * @param dto - Pool identifier parameters * @returns Current slot0 data including sqrt price and active tick */ GetSlot0(ctx: GalaChainContext, dto: GetPoolDto): Promise; /** * Gets the total active liquidity in a pool. * * @param ctx - The GalaChain context * @param dto - Pool identifier parameters * @returns Current liquidity amount in the pool */ GetLiquidity(ctx: GalaChainContext, dto: GetPoolDto): Promise; /** * Retrieves all liquidity positions owned by a specific user. * * @param ctx - The GalaChain context * @param dto - User position query parameters * @returns List of user's liquidity positions with details */ GetUserPositions(ctx: GalaChainContext, dto: GetUserPositionsDto): Promise; GetAddLiquidityEstimation(ctx: GalaChainContext, dto: GetAddLiquidityEstimationDto): Promise; QuoteExactAmount(ctx: GalaChainContext, dto: QuoteExactAmountDto): Promise; GetPoolData(ctx: GalaChainContext, dto: GetPoolDto): Promise; GetCompositePool(ctx: GalaChainContext, dto: GetCompositePoolDto): Promise; GetRemoveLiquidityEstimation(ctx: GalaChainContext, dto: BurnEstimateDto): Promise; CollectPositionFees(ctx: GalaChainContext, dto: CollectDto): Promise; CollectProtocolFees(ctx: GalaChainContext, dto: CollectProtocolFeesDto): Promise; SetProtocolFee(ctx: GalaChainContext, dto: SetProtocolFeeDto): Promise; ConfigurePoolDexFee(ctx: GalaChainContext, dto: ConfigurePoolDexFeeDto): Promise; GetDexFeeConfigration(ctx: GalaChainContext, dto: ChainCallDTO): Promise; ConfigureDexFeeAddress(ctx: GalaChainContext, dto: ConfigureDexFeeAddressDto): Promise; GetBitMapChanges(ctx: GalaChainContext, dto: GetPoolDto): Promise; GetBalanceDelta(ctx: GalaChainContext, dto: GetPoolDto): Promise; TransferDexPosition(ctx: GalaChainContext, dto: TransferDexPositionDto): Promise; GetPositions(ctx: GalaChainContext, dto: GetPositionDto): Promise; GetPositionByID(ctx: GalaChainContext, dto: GetPositionByIdDto): Promise; GetTickData(ctx: GalaChainContext, dto: GetTickDataDto): Promise; /** * Places a commitment for a limit order using a commit-reveal protocol. * * This method allows users to commit to a limit order by submitting a hash * of the order details along with an expiration time. The actual order * parameters remain hidden until execution time, providing privacy and * preventing front-running. * * @param ctx - The GalaChain context * @param dto - The limit order commitment data * @returns Response containing the commitment ID */ PlaceLimitOrder(ctx: GalaChainContext, dto: PlaceLimitOrderDto): Promise; /** * Cancels an existing limit order by revealing its parameters. * * This method allows users to cancel their limit orders by providing * the complete order details that match a previously placed commitment. * The order parameters are verified against the committed hash before * cancellation is allowed. * * @param ctx - The GalaChain context * @param dto - The complete limit order details for cancellation */ CancelLimitOrder(ctx: GalaChainContext, dto: CancelLimitOrderDto): Promise; /** * Executes a limit order by revealing its parameters and performing the trade. * * This method allows authorized parties (typically batching services) to * execute limit orders by revealing the complete order details and performing * the actual token swap. The order parameters are verified against the * committed hash before execution. * * @param ctx - The GalaChain context * @param dto - The complete limit order details for execution */ FillLimitOrder(ctx: GalaChainContext, dto: FillLimitOrderDto): Promise; /** * Configures global settings for limit order functionality. * * This method allows authorized administrators to set system-wide * configuration for limit orders, including which wallets are permitted * to execute limit order operations such as filling orders through * batching services. * * @param ctx - The GalaChain context * @param dto - The global limit order configuration */ SetGlobalLimitOrderConfig(ctx: GalaChainContext, dto: SetGlobalLimitOrderConfigDto): Promise; /** * Grants swap allowances for the specified token instance. * * This method allows users to create allowances that can be used for token swaps, * enabling third-party services to execute swaps on behalf of the user. * * @param ctx - The GalaChain context * @param dto - Swap allowance grant parameters * @returns Array of created TokenAllowance objects */ GrantSwapAllowance(ctx: GalaChainContext, dto: GrantSwapAllowanceDto): Promise; /** * Grants swap allowances for multiple token instances in a single operation. * * This method allows users to create allowances for multiple tokens at once, * enabling third-party services to execute swaps on behalf of the user across * different token types efficiently. * * @param ctx - The GalaChain context * @param dto - Bulk swap allowance grant parameters * @returns Array of created TokenAllowance objects */ GrantBulkSwapAllowance(ctx: GalaChainContext, dto: GrantBulkSwapAllowanceDto): Promise; /** * Fetches swap allowances with pagination support. * * This method allows users to query their swap allowances with various filtering * options and pagination support for large result sets. * * @param ctx - The GalaChain context * @param dto - Swap allowance query parameters * @returns Paginated response with allowances */ FetchSwapAllowances(ctx: GalaChainContext, dto: FetchSwapAllowancesDto): Promise; /** * Deletes swap allowances matching the specified criteria. * * This method allows users to revoke swap allowances that are no longer needed, * providing control over which services can execute swaps on their behalf. * * @param ctx - The GalaChain context * @param dto - Swap allowance deletion parameters * @returns Number of allowances deleted */ DeleteSwapAllowances(ctx: GalaChainContext, dto: DeleteSwapAllowancesDto): Promise; AuthorizeBatchSubmitter(ctx: GalaChainContext, dto: AuthorizeBatchSubmitterDto): Promise; DeauthorizeBatchSubmitter(ctx: GalaChainContext, dto: DeauthorizeBatchSubmitterDto): Promise; GetBatchSubmitAuthorities(ctx: GalaChainContext, dto: FetchBatchSubmitAuthoritiesDto): Promise; /** * Makes a private pool public. Only whitelisted users can make pools public. * * @param ctx - The GalaChain context * @param dto - Pool identification parameters * @returns void */ MakePoolPublic(ctx: GalaChainContext, dto: MakePoolPublicDto): Promise; /** * Manages the whitelist for a private pool. Only whitelisted users can modify the whitelist. * * @param ctx - The GalaChain context * @param dto - Whitelist management parameters * @returns void */ ManageWhitelist(ctx: GalaChainContext, dto: ManageWhitelistDto): Promise; } //# sourceMappingURL=DexV3Contract.d.ts.map