Buys a listing from the marketplace.
import { buyFromListing } from "thirdweb/extensions/marketplace";import { sendTransaction } from "thirdweb"; const transaction = buyFromListing({ contract, listingId: 1n, quantity: 1n, recipient: "0x...",}); await sendTransaction({ transaction, account });
function buyFromListing( options: BaseTransactionOptions<BuyFromListingParams>,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for buying from a listing.
let options: BaseTransactionOptions<BuyFromListingParams>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A promise that resolves to the transaction result.