Accepts an offer after performing necessary checks and validations. Throws an error if the offer is not active, the offeror's balance is insufficient, or the offeror's allowance is insufficient.
import { acceptOffer } from "thirdweb/extensions/marketplace";import { sendTransaction } from "thirdweb"; const acceptOfferTx = acceptOffer({ contract, offerId: 1n,}); await sendTransaction({ transaction, account });
function acceptOffer( options: BaseTransactionOptions<AcceptOfferParams>,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for accepting the offer.
let options: BaseTransactionOptions<AcceptOfferParams>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A transaction object that can be sent to accept the offer.