import { BaseCoreSDK } from "./../mixins/base-core-sdk";
import { commitToPriceDiscoveryOffer } from "./handler";
export class PriceDiscoveryMixin extends BaseCoreSDK {
    // Implementation
    async commitToPriceDiscoveryOffer(buyer, tokenIdOrOfferId, priceDiscovery, overrides = {}) {
        const { returnTxInfo } = overrides;
        const commitArgs = {
            buyer,
            tokenIdOrOfferId,
            priceDiscovery,
            web3Lib: this._web3Lib,
            contractAddress: overrides.contractAddress || this._protocolDiamond,
            subgraphUrl: this._subgraphUrl
        };
        if (returnTxInfo === true) {
            return commitToPriceDiscoveryOffer({
                ...commitArgs,
                returnTxInfo: true
            });
        }
        else {
            return commitToPriceDiscoveryOffer({
                ...commitArgs,
                returnTxInfo: false
            });
        }
    }
}
//# sourceMappingURL=mixin.js.map