import type { ProtocolData } from "../orders/types"; import type { Chain } from "../types"; import type { Fetcher } from "./fetcher"; import type { BuildOfferResponse, CollectionOffer, GetBestOfferResponse, GetOffersResponse } from "./types"; /** * Offer-related API operations */ export declare class OffersAPI { private fetcher; private chain; constructor(fetcher: Fetcher, chain: Chain); /** * Gets all offers for a given collection. */ getAllOffers(collectionSlug: string, limit?: number, next?: string): Promise; /** * Gets trait offers for a given collection. */ getTraitOffers(collectionSlug: string, type: string, value: string, limit?: number, next?: string, floatValue?: number, intValue?: number): Promise; /** * Gets the best offer for a given token. */ getBestOffer(collectionSlug: string, tokenId: string | number): Promise; /** * Build a OpenSea collection offer. * * The body uses mixed casing per the OpenSea OpenAPI spec: the outer * envelope (`protocol_address`, `offer_protection_enabled`) is snake_case, * but `criteria.numericTraits` keeps its camelCase key on the wire per * the {@link CriteriaObject} schema. Opt out of automatic snakeize and * emit the body in exact wire shape. */ buildOffer(offererAddress: string, quantity: number, collectionSlug: string, offerProtectionEnabled?: boolean, traitType?: string, traitValue?: string, traits?: Array<{ type: string; value: string; }>, numericTraits?: Array<{ type: string; min?: number; max?: number; }>): Promise; /** * Get a list of collection offers for a given slug. */ getCollectionOffers(slug: string, limit?: number, next?: string): Promise; /** * Post a collection offer to OpenSea. * * Mixed-casing body: outer `protocol_address`, `protocol_data` are * snake_case, but `protocol_data.parameters` (Seaport struct) and * `criteria.numericTraits` keep their camelCase keys on the wire. Opt out * of automatic snakeize and emit the body in exact wire shape. */ postCollectionOffer(order: ProtocolData, slug: string, traitType?: string, traitValue?: string, traits?: Array<{ type: string; value: string; }>, numericTraits?: Array<{ type: string; min?: number; max?: number; }>): Promise; /** * Gets all active offers for a specific NFT. */ getOffersByNFT(collectionSlug: string, identifier: string | number, limit?: number, next?: string): Promise; }