import { BaseCoreSDK } from "./../mixins/base-core-sdk";
import * as subgraph from "../subgraph";
import { TransactionResponse, TransactionRequest, Log, Web3LibAdapter, FullOfferArgs, SellerOfferArgs } from "@bosonprotocol/common";
import { BigNumberish, BigNumber } from "@ethersproject/bignumber";
import { getSignatureParameters, StructuredData } from "../utils/signature";
export declare class ExchangesMixin<T extends Web3LibAdapter> extends BaseCoreSDK<T> {
    /**
     * Returns exchange entity from subgraph.
     * @param exchangeId - ID of exchange entity.
     * @param queryVars - Optional query variables to skip, order or filter.
     * @returns Exchange entity from subgraph.
     */
    getExchangeById(exchangeId: BigNumberish, queryVars?: subgraph.GetExchangeByIdQueryQueryVariables): Promise<subgraph.ExchangeFieldsFragment>;
    /**
     * Returns exchange entities from subgraph.
     * @param queryVars - Optional query variables to skip, order or filter.
     * @returns Exchange entities from subgraph.
     */
    getExchanges(queryVars?: subgraph.GetExchangesQueryQueryVariables): Promise<subgraph.ExchangeFieldsFragment[]>;
    /**
     * Commits to a seller initiated offer by calling the `ExchangeCommitFacet`.
     * This transaction only succeeds if the seller has deposited enough funds to lock the offer's sellerDeposit.
     * @param offerId - ID of offer to commit to.
     * @param overrides - Optional overrides.
     * @returns Transaction response.
     */
    commitToOffer(offerId: BigNumberish, overrides: Partial<{
        buyer: string;
        returnTxInfo: true;
    }>): Promise<TransactionRequest>;
    commitToOffer(offerId: BigNumberish, overrides?: Partial<{
        buyer: string;
        returnTxInfo?: false | undefined;
    }>): Promise<TransactionResponse>;
    /**
     * Commits to a buyer initiated offer by calling the `ExchangeCommitFacet`.
     * This transaction only succeeds if the buyer has deposited enough funds to lock the offer's price.
     * @param offerId - ID of offer to commit to.
     * @param overrides - Optional overrides.
     * @returns Transaction response.
     */
    commitToBuyerOffer(offerId: BigNumberish, sellerParams: SellerOfferArgs, overrides: Partial<{
        returnTxInfo: true;
    }>): Promise<TransactionRequest>;
    commitToBuyerOffer(offerId: BigNumberish, sellerParams?: SellerOfferArgs, overrides?: Partial<{
        returnTxInfo?: false | undefined;
    }>): Promise<TransactionResponse>;
    /**
     * Commits to a conditional offer by calling the `ExchangeHandlerContract`.
     * This transaction only succeeds if the seller has deposited funds.
     * @param offerId - ID of offer to commit to.
     * @param tokenId - ID of the token to use for the conditional commit
     * @param overrides - Optional overrides.
     * @returns Transaction response.
     */
    commitToConditionalOffer(offerId: BigNumberish, tokenId: BigNumberish, overrides: Partial<{
        buyer: string;
        returnTxInfo: true;
    }>): Promise<TransactionRequest>;
    commitToConditionalOffer(offerId: BigNumberish, tokenId: BigNumberish, overrides?: Partial<{
        buyer: string;
        returnTxInfo?: false | undefined;
    }>): Promise<TransactionResponse>;
    /**
     * Creates an offer and commits to it immediately.
     * @param createOfferAndCommitArgs - Offer and commit arguments.
     * @param overrides - Optional overrides.
     * @returns Transaction response.
     */
    createOfferAndCommit(createOfferAndCommitArgs: FullOfferArgs, overrides: Partial<{
        contractAddress: string;
        txRequest: TransactionRequest;
        returnTxInfo: true;
    }>): Promise<TransactionRequest>;
    createOfferAndCommit(createOfferAndCommitArgs: FullOfferArgs, overrides?: Partial<{
        contractAddress: string;
        txRequest: TransactionRequest;
        returnTxInfo?: false | undefined;
    }>): Promise<TransactionResponse>;
    /**
     * Signs the full offer data for an off-chain buyer- or seller-initiated offer.
     * @param args - Arguments including `fullOfferArgsUnsigned` and `returnTypedDataToSign`.
     * @returns Either the structured data to sign or the signature parameters, depending on `returnTypedDataToSign`.
     */
    signFullOffer(args: {
        fullOfferArgsUnsigned: Omit<FullOfferArgs, "signature">;
        returnTypedDataToSign: true;
    }): Promise<StructuredData>;
    signFullOffer(args: {
        fullOfferArgsUnsigned: Omit<FullOfferArgs, "signature">;
        returnTypedDataToSign?: false;
    }): Promise<ReturnType<typeof getSignatureParameters>>;
    /**
     * Utility method to retrieve the created `exchangeId` from logs after calling `commitToOffer` or `commitToBuyerOffer`.
     * @param logs - Logs to search in.
     * @returns Created exchange id.
     */
    getCommittedExchangeIdFromLogs(logs: Log[]): string | null;
    /**
     * Revokes an existing voucher by calling the `ExchangeHandlerContract`.
     * Callable by seller `assistant`.
     * @param exchangeId - ID of exchange to revoke.
     * @returns Transaction response.
     */
    revokeVoucher(exchangeId: BigNumberish, returnTxInfo: true): Promise<TransactionRequest>;
    revokeVoucher(exchangeId: BigNumberish, returnTxInfo?: false | undefined): Promise<TransactionResponse>;
    /**
     * Cancels an existing voucher by calling the `ExchangeHandlerContract`.
     * Callable by buyer.
     * @param exchangeId - ID of exchange to cancel.
     * @returns Transaction response.
     */
    cancelVoucher(exchangeId: BigNumberish, returnTxInfo: true): Promise<TransactionRequest>;
    cancelVoucher(exchangeId: BigNumberish, returnTxInfo?: false | undefined): Promise<TransactionResponse>;
    /**
     * Redeems an existing voucher by calling the `ExchangeHandlerContract`.
     * Callable by buyer.
     * @param exchangeId - ID of exchange to redeem.
     * @returns Transaction response.
     */
    redeemVoucher(exchangeId: BigNumberish, returnTxInfo: true): Promise<TransactionRequest>;
    redeemVoucher(exchangeId: BigNumberish, returnTxInfo?: false | undefined): Promise<TransactionResponse>;
    /**
     * Completes an existing voucher by calling the `ExchangeHandlerContract`.
     * Callable by buyer or seller assistant.
     * @param exchangeId - ID of exchange to complete.
     * @returns Transaction response.
     */
    completeExchange(exchangeId: BigNumberish, returnTxInfo: true): Promise<TransactionRequest>;
    completeExchange(exchangeId: BigNumberish, returnTxInfo?: false | undefined): Promise<TransactionResponse>;
    /**
     * Completes a batch of existing vouchers by calling the `ExchangeHandlerContract`.
     * Callable by buyer or seller assistant.
     * @param exchangeIds - IDs of exchange to complete.
     * @returns Transaction response.
     */
    completeExchangeBatch(exchangeIds: BigNumberish[], returnTxInfo: true): Promise<TransactionRequest>;
    completeExchangeBatch(exchangeIds: BigNumberish[], returnTxInfo?: false | undefined): Promise<TransactionResponse>;
    /**
     * Expires an existing voucher by calling the `ExchangeHandlerContract`.
     * @param exchangeId - ID of exchange to expire.
     * @returns Transaction response.
     */
    expireVoucher(exchangeId: BigNumberish, returnTxInfo: true): Promise<TransactionRequest>;
    expireVoucher(exchangeId: BigNumberish, returnTxInfo?: false | undefined): Promise<TransactionResponse>;
    getExchangeTokenId(exchangeId: BigNumberish, offerId: BigNumberish): BigNumber;
    parseTokenId(tokenId: BigNumberish): {
        offerId: BigNumber;
        exchangeId: BigNumber;
    };
}
//# sourceMappingURL=mixin.d.ts.map