UNPKG

@f5i23q999d/cow-sdk

Version:

<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>

93 lines (92 loc) 2.5 kB
import type { Address } from './Address.js'; import type { AppDataHash } from './AppDataHash.js'; import type { BuyTokenDestination } from './BuyTokenDestination.js'; import type { FeePolicy } from './FeePolicy.js'; import type { InteractionData } from './InteractionData.js'; import type { OrderClass } from './OrderClass.js'; import type { OrderKind } from './OrderKind.js'; import type { Quote } from './Quote.js'; import type { SellTokenSource } from './SellTokenSource.js'; import type { Signature } from './Signature.js'; import type { TokenAmount } from './TokenAmount.js'; import type { UID } from './UID.js'; /** * A solvable order included in the current batch auction. Contains the data forwarded to solvers for solving. * */ export type AuctionOrder = { uid: UID; /** * see `OrderParameters::sellToken` */ sellToken: Address; /** * see `OrderParameters::buyToken` */ buyToken: Address; /** * see `OrderParameters::sellAmount` */ sellAmount: TokenAmount; /** * see `OrderParameters::buyAmount` */ buyAmount: TokenAmount; /** * Creation time of the order. Denominated in epoch seconds. */ created: string; /** * see `OrderParameters::validTo` */ validTo: number; /** * see `OrderParameters::kind` */ kind: OrderKind; /** * see `OrderParameters::receiver` */ receiver: Address | null; owner: Address; /** * see `OrderParameters::partiallyFillable` */ partiallyFillable: boolean; /** * Currently executed amount of sell/buy token, depending on the order kind. * */ executed: TokenAmount; /** * The pre-interactions that need to be executed before the first execution of the order. * */ preInteractions: Array<InteractionData>; /** * The post-interactions that need to be executed after the execution of the order. * */ postInteractions: Array<InteractionData>; /** * see `OrderParameters::sellTokenBalance` */ sellTokenBalance: SellTokenSource; /** * see `OrderParameters::buyTokenBalance` */ buyTokenBalance: BuyTokenDestination; class: OrderClass; appData: AppDataHash; signature: Signature; /** * The fee policies that are used to compute the protocol fees for this order. * */ protocolFees: Array<FeePolicy>; /** * A winning quote. * */ quote?: Quote; };