import type { BigNumberValue } from "@rarible/utils"; import type { ConsiderationItem, InputCriteria, Order, OrderParameters, OrderStatus } from "./types"; import type { BalancesAndApprovals } from "./balance-and-approval-check"; import type { FulfillmentComponentStruct } from "./types"; /** * We should use basic fulfill order if the order adheres to the following criteria: * 1. The order should not be partially filled. * 2. The order only contains a single offer item and contains at least one consideration item * 3. The order does not offer an item with Ether (or other native tokens) as its item type. * 4. The order only contains a single ERC721 or ERC1155 item and that item is not criteria-based * 5. All other items have the same Native or ERC20 item type and token * 6. All items have the same startAmount and endAmount * 7. First consideration item must contain the offerer as the recipient * 8. If the order has multiple consideration items and all consideration items other than the * first consideration item have the same item type as the offered item, the offered item * amount is not less than the sum of all consideration item amounts excluding the * first consideration item amount * 9. The token on native currency items needs to be set to the null address and the identifier on * currencies needs to be zero, and the amounts on the 721 item need to be 1 */ export declare const shouldUseBasicFulfill: ({ offer, consideration, offerer }: OrderParameters, totalFilled: OrderStatus["totalFilled"]) => boolean; export declare function validateAndSanitizeFromOrderStatus(order: Order, orderStatus: OrderStatus): Order; export type FulfillOrdersMetadata = { order: Order; unitsToFill?: BigNumberValue; orderStatus: OrderStatus; offerCriteria: InputCriteria[]; considerationCriteria: InputCriteria[]; tips: ConsiderationItem[]; extraData: string; offererBalancesAndApprovals: BalancesAndApprovals; offererOperator: string; }[]; export declare function generateFulfillOrdersFulfillments(ordersMetadata: FulfillOrdersMetadata): { offerFulfillments: FulfillmentComponentStruct[]; considerationFulfillments: FulfillmentComponentStruct[]; }; export declare const getAdvancedOrderNumeratorDenominator: (order: Order, unitsToFill: BigNumberValue) => { numerator: string; denominator: string; };