import { ChainObject, UserAlias } from "@gala-chain/api"; import BigNumber from "bignumber.js"; import { IDexLimitOrderModel } from "./DexLimitOrderModel"; /** * On-chain representation of a revealed limit order in the DEX. * * This ChainObject contains the complete details of a limit order that has been * revealed from its commitment. It stores all the order parameters including * tokens, amounts, ratios, and expiration. The order can be executed by * authorized batching services when market conditions are favorable. * * The limit order uses a commit-reveal protocol where users first commit to * order parameters via a hash, and later reveal the actual parameters when * the order is ready to be executed. */ export declare class DexLimitOrder extends ChainObject { static INDEX_KEY: string; constructor(args: unknown); /** The user who owns this limit order */ owner: UserAlias; /** Token being sold in this limit order */ sellingToken: string; /** Token being bought in this limit order */ buyingToken: string; /** Amount of selling token to sell */ sellingAmount: BigNumber; /** Minimum amount of buying token to receive */ buyingMinimum: BigNumber; /** Ratio of buying token to selling token (price) */ buyingToSellingRatio: BigNumber; /** Unix timestamp when this order expires */ expires: number; /** * @description * * When a limit order commitment is written to chain, the DTO provided to * save the hash will require a `uniqueKey` property to ensure single-use * and prevent replay attacks. * * The `commitmentNonce` property on the fulfilled `LimitOrder` represents the * `uniqueKey` (also known as nonce) property from the original limit order * commitment. * * Not to be confused with the `uniqueKey` property that must be set on the * `FillLimitOrderDto` when revealing the buy. */ commitmentNonce: string; /** * Extracts limit order data for commitment generation. * * @returns Object containing all order parameters needed for hashing */ limitOrderCommitmentData(): IDexLimitOrderModel; /** * Creates a concatenated commitment string from this order's parameters. * * @returns String representation of order parameters for hashing */ concatenateCommitment(): string; /** * Generates the SHA256 hash for this limit order. * * @returns Hexadecimal hash string of this order's parameters */ generateHash(): string; /** * Verifies that a given hash matches this order's computed hash. * * @param hash - Hash to verify against this order * @returns True if the hash matches, false otherwise */ verifyHash(hash: string): boolean; } //# sourceMappingURL=DexLimitOrder.d.ts.map