import { AssetWithTokenId, FulfillmentDataResponse, GetNFTResponse, OrderAPIOptions, OrderV2, OrdersQueryOptions, ProtocolData } from "opensea-js";
import { BigNumberish } from "@ethersproject/bignumber";
import { Interface } from "@ethersproject/abi";
import { Listing, Marketplace, MarketplaceType, Order, OrderFilterOptions, OrderSide, SignedOrder, Wrapper } from "./types";
import { CreateOrderAction, CreateOrderInput, OrderParameters, OrderUseCase } from "@opensea/seaport-js/lib/types";
import { ContractAddresses, PriceDiscoveryStruct, Side, Web3LibAdapter } from "@bosonprotocol/common";
import { AdvancedOrder } from "../seaport/interface";
export type OpenSeaListing = {
    asset: AssetWithTokenId;
    accountAddress: string;
    startAmount: BigNumberish;
    endAmount?: BigNumberish;
    quantity?: BigNumberish;
    domain?: string;
    salt?: BigNumberish;
    listingTime?: number;
    expirationTime?: number;
    paymentTokenAddress?: string;
    buyerAddress?: string;
    englishAuction?: boolean;
    excludeOptionalCreatorFees?: boolean;
};
export type OpenSeaSDKHandler = {
    api: {
        apiBaseUrl: string;
        getOrder(order: Omit<OrdersQueryOptions, "limit">): Promise<OrderV2>;
        getOrders(order: Omit<OrdersQueryOptions, "limit">): Promise<{
            orders: OrderV2[];
        }>;
        generateFulfillmentData(fulfillerAddress: string, orderHash: string, protocolAddress: string, side: OrderSide): Promise<FulfillmentDataResponse>;
        getNFT(address: string, identifier: string): Promise<GetNFTResponse>;
        postOrder(order: ProtocolData, apiOptions: OrderAPIOptions): Promise<OrderV2>;
    };
    seaport_v1_6: {
        createOrder(input: CreateOrderInput, accountAddress?: string, exactApproval?: boolean): Promise<OrderUseCase<CreateOrderAction>>;
    };
    createListing(listing: OpenSeaListing): Promise<OrderV2>;
    cancelOrder(args: {
        order: OrderV2;
        accountAddress: string;
        domain?: string;
    }): Promise<void>;
};
export declare class WrapperFactory {
    protected _contract: string;
    protected _web3Lib: Web3LibAdapter;
    protected iface: Interface;
    constructor(_contract: string, _web3Lib: Web3LibAdapter);
    create(args: {
        voucherContract: string;
    }): Promise<import("@bosonprotocol/common").TransactionResponse>;
    getWrapper(args: {
        voucherContract: string;
    }): Promise<string | undefined>;
}
export declare class OpenSeaWrapper extends Wrapper {
    protected _contract: string;
    protected _web3Lib: Web3LibAdapter;
    protected iface: Interface;
    constructor(_contract: string, _web3Lib: Web3LibAdapter);
    wrapForAuction(args: {
        tokenIds: BigNumberish[];
    }): Promise<import("@bosonprotocol/common").TransactionResponse>;
    unwrap(args: {
        tokenId: BigNumberish;
    }): Promise<import("@bosonprotocol/common").TransactionResponse>;
    encodeFinalizeAuction(args: {
        tokenId: BigNumberish;
        order: AdvancedOrder;
    }): string;
    finalizeAuction(args: {
        tokenId: BigNumberish;
        order: AdvancedOrder;
    }): Promise<import("@bosonprotocol/common").TransactionResponse>;
    get address(): string;
}
export declare class OpenSeaMarketplace extends Marketplace {
    protected _handler: OpenSeaSDKHandler;
    protected _contracts: ContractAddresses;
    protected _feeRecipient: string;
    protected _web3Lib: Web3LibAdapter;
    protected _wrapperFactory: WrapperFactory;
    protected _wrappersMap: Map<string, OpenSeaWrapper>;
    protected _feeBasisPoint: number;
    constructor(_type: MarketplaceType, _handler: OpenSeaSDKHandler, _contracts: ContractAddresses, _feeRecipient: string, _web3Lib: Web3LibAdapter, feeBasisPoint?: number);
    createListing(listing: Listing): Promise<Order>;
    getFees(price: string): string;
    createBidOrder(listing: Listing): Promise<Order>;
    buildAdvancedOrder(asset: {
        contract: string;
        tokenId: string;
        withWrapper?: boolean;
    }, filter?: OrderFilterOptions): Promise<AdvancedOrder>;
    generateFulfilmentData(asset: {
        contract: string;
        tokenId: string;
        withWrapper?: boolean;
    }): Promise<PriceDiscoveryStruct>;
    /** getOrCreateVouchersWrapper needs to be done at voucher contract level,
     *  before being able to wrap vouchers, then list them on OS **/
    getOrCreateVouchersWrapper(contractAddress: string): Promise<OpenSeaWrapper>;
    isVoucherWrapped(contractAddress: string, tokenId: string): Promise<{
        wrapped: boolean;
        wrapper?: string;
    }>;
    wrapVouchers(contract: string, tokenIds: string[]): Promise<import("@bosonprotocol/common").TransactionResponse>;
    unwrapVoucher(contract: string, tokenId: string): Promise<import("@bosonprotocol/common").TransactionResponse>;
    finalizeAuction(asset: {
        contract: string;
        tokenId: string;
    }): Promise<import("@bosonprotocol/common").TransactionResponse>;
    cancelOrder(asset: {
        contract: string;
        tokenId: string;
    }, side: Side): Promise<void>;
    protected convertListing(listing: Listing): OpenSeaListing;
    protected convertOsOrder(osOrder: OrderV2 | undefined): Order | undefined;
    protected extractOrderInfo(parameters: OrderParameters, side?: OrderSide): {
        offerer: string;
        side: OrderSide;
        nftContract: string;
        tokenId: string;
        price: string;
        fees: string;
        sellerProfit: string;
        exchangeToken: string;
    };
    getOrder(asset: {
        contract: string;
        tokenId: string;
    }, side: Side, filter?: OrderFilterOptions): Promise<SignedOrder>;
    getOrders(asset: {
        contract: string;
        tokenIds: string[];
    }, side: Side, filter?: OrderFilterOptions): Promise<SignedOrder[]>;
}
//# sourceMappingURL=opensea.d.ts.map