import type { OrderStruct, Seaport as TypeChainSeaportContract } from "./typechain/Seaport"; import { BigNumber, BigNumberish, Contract, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction } from "ethers"; import { ItemType, OrderType } from "./constants"; import type { ERC721 } from "./typechain/ERC721"; import type { ERC20 } from "./typechain/ERC20"; export declare type SeaportConfig = { ascendingAmountFulfillmentBuffer?: number; balanceAndApprovalChecksOnOrderCreation?: boolean; conduitKeyToConduit?: Record; overrides?: { contractAddress?: string; defaultConduitKey?: string; }; }; export declare type OfferItem = { itemType: ItemType; token: string; identifierOrCriteria: string; startAmount: string; endAmount: string; }; export declare type ConsiderationItem = { itemType: ItemType; token: string; identifierOrCriteria: string; startAmount: string; endAmount: string; recipient: string; }; export declare type Item = OfferItem | ConsiderationItem; export declare type OrderParameters = { offerer: string; zone: string; orderType: OrderType; startTime: BigNumberish; endTime: BigNumberish; zoneHash: string; salt: string; offer: OfferItem[]; consideration: ConsiderationItem[]; totalOriginalConsiderationItems: BigNumberish; conduitKey: string; }; export declare type OrderComponents = OrderParameters & { counter: number; }; export declare type Order = { parameters: OrderParameters; signature: string; }; export declare type AdvancedOrder = Order & { numerator: BigNumber; denominator: BigNumber; extraData: string; }; export declare type BasicErc721Item = { itemType: ItemType.ERC721; token: string; identifier: string; }; export declare type Erc721ItemWithCriteria = { itemType: ItemType.ERC721; token: string; identifiers: string[]; amount?: string; endAmount?: string; }; declare type Erc721Item = BasicErc721Item | Erc721ItemWithCriteria; export declare type BasicErc1155Item = { itemType: ItemType.ERC1155; token: string; identifier: string; amount: string; endAmount?: string; }; export declare type Erc1155ItemWithCriteria = { itemType: ItemType.ERC1155; token: string; identifiers: string[]; amount: string; endAmount?: string; }; declare type Erc1155Item = BasicErc1155Item | Erc1155ItemWithCriteria; export declare type CurrencyItem = { token?: string; amount: string; endAmount?: string; }; export declare type CreateInputItem = Erc721Item | Erc1155Item | CurrencyItem; export declare type ConsiderationInputItem = CreateInputItem & { recipient?: string; }; export declare type TipInputItem = CreateInputItem & { recipient: string; }; export declare type Fee = { recipient: string; basisPoints: number; }; export declare type CreateOrderInput = { conduitKey?: string; zone?: string; startTime?: string; endTime?: string; offer: readonly CreateInputItem[]; consideration: readonly ConsiderationInputItem[]; counter?: number; fees?: readonly Fee[]; allowPartialFills?: boolean; restrictedByZone?: boolean; useProxy?: boolean; salt?: string; }; export declare type InputCriteria = { identifier: string; proof: string[]; }; export declare type OrderStatus = { isValidated: boolean; isCancelled: boolean; totalFilled: BigNumber; totalSize: BigNumber; }; export declare type OrderWithCounter = { parameters: OrderComponents; signature: string; }; export declare type ContractMethodReturnType = Awaited>; export declare type TransactionMethods = { buildTransaction: (overrides?: Overrides) => Promise; callStatic: (overrides?: Overrides) => Promise; estimateGas: (overrides?: Overrides) => Promise; transact: (overrides?: Overrides) => Promise; }; export declare type ApprovalAction = { type: "approval"; token: string; identifierOrCriteria: string; itemType: ItemType; operator: string; transactionMethods: TransactionMethods> | TransactionMethods>; }; export declare type ExchangeAction = { type: "exchange"; transactionMethods: TransactionMethods; }; export declare type CreateOrderAction = { type: "create"; getMessageToSign: () => Promise; createOrder: () => Promise; }; export declare type TransactionAction = ApprovalAction | ExchangeAction; export declare type CreateOrderActions = readonly [ ...ApprovalAction[], CreateOrderAction ]; export declare type OrderExchangeActions = readonly [ ...ApprovalAction[], ExchangeAction ]; export declare type OrderUseCase = { actions: T extends CreateOrderAction ? CreateOrderActions : OrderExchangeActions ? U : never>; executeAllActions: () => Promise; }; export declare type FulfillmentComponent = { orderIndex: number; itemIndex: number; }[]; export declare type Fulfillment = { offerComponents: FulfillmentComponent[]; considerationComponents: FulfillmentComponent[]; }; declare type MatchOrdersFulfillmentComponent = { orderIndex: number; itemIndex: number; }; export declare type MatchOrdersFulfillment = { offerComponents: MatchOrdersFulfillmentComponent[]; considerationComponents: MatchOrdersFulfillmentComponent[]; }; export declare type SeaportContract = TypeChainSeaportContract & { encodeFunctionData(functionFragment: "matchOrders", values: [OrderStruct[], MatchOrdersFulfillment[]]): string; matchOrders(orders: OrderStruct[], fulfillments: MatchOrdersFulfillment[], overrides?: PayableOverrides & { from?: string | Promise; }): Promise; functions: TypeChainSeaportContract["functions"] & { matchOrders(orders: OrderStruct[], fulfillments: MatchOrdersFulfillment[], overrides?: PayableOverrides & { from?: string | Promise; }): Promise; }; callStatic: TypeChainSeaportContract["callStatic"] & { matchOrders(orders: OrderStruct[], fulfillments: MatchOrdersFulfillment[], overrides?: PayableOverrides & { from?: string | Promise; }): Promise; }; estimateGas: TypeChainSeaportContract["estimateGas"] & { matchOrders(orders: OrderStruct[], fulfillments: MatchOrdersFulfillment[], overrides?: PayableOverrides & { from?: string | Promise; }): Promise; }; populateTranscation: TypeChainSeaportContract["populateTransaction"] & { matchOrders(orders: OrderStruct[], fulfillments: MatchOrdersFulfillment[], overrides?: PayableOverrides & { from?: string | Promise; }): Promise; }; }; export {};