🔗listNFT
Description
The listNFT
function is used to list a non-fungible token (NFT) for sale on a decentralized marketplace.
It takes in various parameters, including the blockchain on which the NFT exists, the user's private key for that blockchain, the ID of the token, the price at which it is to be sold, the duration of any bidding period (if applicable), whether it is being listed for auction, and the address of the NFT contract.
Parameters
Name | Type | Description |
---|---|---|
| string | The blockchain on which the NFT exists. |
| string | The private key of the user making the listing. |
| string | The ID of the NFT to be listed. |
| string | The price at which the NFT is to be listed. |
| string | The duration of any bidding period (if applicable), in seconds. |
| boolean | Whether the NFT is being listed for auction. |
| string | The address of the NFT contract. |
Response
Name | Type | Description |
---|---|---|
| number | The status code of the response (1 for success, 0 for failure). |
| string | The transaction hash of the listing transaction on the blockchain. |
| string | The error message if the operation fails. |
Example Request and Response
Prerequisites
Before making requests with Nest SDK, you must have it installed.
You can install Nest SDK using either npm
or yarn
. Use the following commands to install Nest SDK:
Request
Here is an example of how to make a listNFT
request using the Nest SDK:
Response
Use Cases
Crypto Wallets: The function can be used by crypto wallets to allow their users to list their NFTs for sale on decentralized marketplaces.
Online Marketplaces: The function can be used by online marketplaces to create a decentralized marketplace for NFTs.
NFT Platforms: The function can be used by NFT platforms to allow their users to sell their NFTs on third-party marketplaces.
Last updated