import { DstImmutablesComplement } from './dst-immutables-complement.js'; import { ImmutablesData } from './types.js'; import { HashLock } from '../hash-lock/index.js'; import { TimeLocks } from '../time-locks/index.js'; import { ImmutableFees } from '../immutables-fees/index.js'; import { AddressLike, EvmAddress } from '../../domains/addresses/index.js'; /** * Contains escrow params for both source and destination chains. * Determines addresses of escrow contracts. */ export declare class Immutables { readonly orderHash: Buffer; readonly hashLock: HashLock; readonly maker: A; /** * Address who can withdraw funds, also to this address funds will be transferred in case of public withdrawal **/ readonly taker: A; readonly token: A; readonly amount: bigint; readonly safetyDeposit: bigint; readonly timeLocks: TimeLocks; /** * For Src Immutables its undefined as in contracts we pass empty string * https://github.com/1inch/cross-chain-swap/blob/master/contracts/BaseEscrowFactory.sol#L136 **/ readonly fees?: ImmutableFees | undefined; static readonly Web3Type: string; private constructor(); static new(params: { orderHash: Buffer; hashLock: HashLock; maker: A; taker: A; token: A; amount: bigint; safetyDeposit: bigint; timeLocks: TimeLocks; fees?: ImmutableFees; }): Immutables; /** * Create instance from encoded bytes * @param bytes 0x prefixed hex string */ static fromABIEncoded(bytes: string): Immutables; static fromJSON(data: ImmutablesData): Immutables; toJSON(): ImmutablesData; /** * Create DST immutables from SRC immutables with complement data. */ withComplement(dstComplement: DstImmutablesComplement): Immutables; withDeployedAt(time: bigint): Immutables; withTaker(taker: A): Immutables; withHashLock(hashLock: HashLock): Immutables; withAmount(amount: bigint): Immutables; withFees(fees: ImmutableFees): Immutables; /** * Compute hash matching the contract's ImmutablesLib.hash(). */ hash(): string; /** * Build immutables data for contract calls. */ build(): ImmutablesData; /** * Encode instance as bytes */ toABIEncoded(): string; /** * Encode fees for contract calls. * Returns '0x' if fees not set, otherwise encoded fees. */ private encodeFees; }