Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sequence-0fb8d9e6-unreal-quickstart-with-marketplace.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

useCreateListingModal

The useCreateListingModal hook is used to list an item for sale on the Marketplace. It provides the necessary functionality to create and manage a new listing.
import { useCreateListingModal } from "@0xsequence/marketplace-sdk/react";

## Into your React component:

const { show: showListModal } = useCreateListingModal({ onError });

const onClickList = () => {
	showListModal({
		collectionAddress,
		chainId,
		collectibleId,
		orderbookKind,
	});
};

return <button onClick={onClickList}>List</button>
useCreateListingModal
* params
* return properties

useBuyModal

The useBuyModal hook allows users to purchase an NFT that is listed for sale on the Marketplace. It handles the buying process and transaction execution.
import { useBuyModal } from "@0xsequence/marketplace-sdk/react";

## Into your React component:

const { show: showBuyModal } = useBuyModal({
	onSuccess(hash) {
		console.log("Buy transaction sent with hash: ", hash);
	},
	onError,
});

const onClickBuy = () => {
	showBuyModal({
		chainId,
		collectionAddress,
		tokenId,
		order,
	});
};

return <button onClick={onClickBuy}>Buy</button>
useBuyModal
* params
* return properties

useMakeOfferModal

The useMakeOfferModal hook enables users to place an offer on an NFT. It facilitates creating and submitting offers within the Marketplace.
import { useMakeOfferModal } from "@0xsequence/marketplace-sdk/react";

## Into your React component:

const { show: showOfferModal } = useMakeOfferModal({
	onError,
});

const onClickOffer = () => {
	showOfferModal({
		collectionAddress,
		chainId,
		collectibleId,
		orderbookKind,
	});
};

return <button onClick={onClickOffer}>Make Offer</button>
useMakeOfferModal
* params
* return properties

useSellModal

The useSellModal hook is used to sell an NFT by accepting an existing offer. It provides the necessary functionality to complete the selling process.
import { useSellModal } from "@0xsequence/marketplace-sdk/react";

## Into your React component:

const { show: showSellModal } = useSellModal({ onError });

const onAcceptOffer = () => {
	showSellModal({
		collectionAddress,
		chainId,
		tokenId,
		order,
	});
};

return <button onClick={onAcceptOffer}>Accept Offer</button>
useSellModal
* params
* return properties