import { AuctionCalculator, EIP712TypedData, Extension, LimitOrderV4Struct, AmountCalculator } from '@1inch/fusion-sdk'; import { ProxyFactory } from '@1inch/limit-order-sdk'; import { EvmCrossChainOrderInfo, EvmDetails, EvmEscrowParams, EvmExtra, OrderInfoData } from './types.js'; import { InnerOrder } from './inner-order.js'; import { EscrowExtension } from './escrow-extension.js'; import { AddressLike, EvmAddress } from '../../domains/addresses/index.js'; import { BaseOrder } from '../base-order.js'; import { SupportedChain } from '../../chains.js'; import { HashLock } from '../../domains/hash-lock/index.js'; import { TimeLocks } from '../../domains/time-locks/index.js'; export declare class EvmCrossChainOrder extends BaseOrder { protected inner: InnerOrder; constructor(extension: EscrowExtension, orderInfo: OrderInfoData, extra?: EvmExtra); get hashLock(): HashLock; get timeLocks(): TimeLocks; get srcSafetyDeposit(): bigint; get dstSafetyDeposit(): bigint; get dstChainId(): SupportedChain; get escrowExtension(): EscrowExtension; get extension(): Extension; get maker(): EvmAddress; get takerAsset(): AddressLike; get makerAsset(): EvmAddress; get takingAmount(): bigint; get makingAmount(): bigint; get salt(): bigint; /** * Real receiver of funds on dst chain */ get receiver(): AddressLike; /** * Timestamp in sec */ get deadline(): bigint; /** * Timestamp in sec */ get auctionStartTime(): bigint; /** * Timestamp in sec */ get auctionEndTime(): bigint; get nonce(): bigint; get partialFillAllowed(): boolean; get multipleFillsAllowed(): boolean; /** * Create new EvmCrossChainOrder */ static new(escrowFactory: EvmAddress, orderInfo: EvmCrossChainOrderInfo, escrowParams: EvmEscrowParams, details: EvmDetails, extra?: EvmExtra): EvmCrossChainOrder; static isNativeOrder(chainId: number, ethOrderFactory: ProxyFactory, order: LimitOrderV4Struct, signature: string): boolean; /** * Create new order from native asset * * * Note, that such order should be submitted on-chain through `NativeOrderFactory.create` AND off-chain through submit to relayer * @see NativeOrderFactory.create https://github.com/1inch/limit-order-protocol/blob/feature/new-eth-orders/contracts/extensions/NativeOrderFactory.sol#L53 */ static fromNative(chainId: number, ethOrdersFactory: ProxyFactory, escrowFactory: EvmAddress, orderInfo: Omit, details: EvmDetails, escrowParams: EvmEscrowParams, extra?: EvmExtra): EvmCrossChainOrder; /** * Create CrossChainOrder from order data and extension * */ static fromDataAndExtension(order: LimitOrderV4Struct, extension: Extension): EvmCrossChainOrder; isNative(chainId: number, ethOrderFactory: ProxyFactory, signature: string): boolean; /** * Returns signature for submitting native order on-chain * Only valid if order is native * * @see EvmCrossChainOrder.isNative * @see EvmCrossChainOrder.fromNative */ nativeSignature(maker: EvmAddress): string; build(): LimitOrderV4Struct; toJSON(): LimitOrderV4Struct; getOrderHash(srcChainId: number): string; getOrderHashBuffer(srcChainId: number): Buffer; getTypedData(srcChainId: number): EIP712TypedData; getCalculator(): AuctionCalculator; /** * Check if `wallet` can fill order before other */ isExclusiveResolver(wallet: EvmAddress): boolean; /** * Check if the auction has exclusive resolver, and it is in the exclusivity period * * @param time timestamp to check, `now()` by default */ isExclusivityPeriod(time: bigint): boolean; /** * Check whether address allowed to execute order at the given time * * @param executor address of executor * @param executionTime timestamp in sec at which order planning to execute */ canExecuteAt(executor: EvmAddress, executionTime: bigint): boolean; /** * Calculate resolver fee for the given parameters * * @param taker address of taker (resolver) * @param time execution timestamp in sec * @param blockBaseFee block base fee in wei (optional) * @param makingAmount amount to fill (defaults to full order) */ getResolverFee(taker: EvmAddress, time: bigint, blockBaseFee?: bigint, makingAmount?: bigint): bigint; /** * Calculate integrator fee for the given parameters * * @param taker address of taker (resolver) * @param time execution timestamp in sec * @param blockBaseFee block base fee in wei (optional) * @param makingAmount amount to fill (defaults to full order) */ getIntegratorFee(taker: EvmAddress, time: bigint, blockBaseFee?: bigint, makingAmount?: bigint): bigint; /** * Get amount calculator for this order */ getAmountCalculator(): AmountCalculator; }