🔗getNFT
Description
The getNFT
function retrieves information about a specific NFT (Non-Fungible Token) from a marketplace smart contract deployed on a blockchain.
The function requires a private key to authenticate the request and fetches the NFT details by calling the getNFT method of the marketplace contract.
Parameters
Parameter | Type | Description |
---|---|---|
| string | The name of the blockchain on which the NFT is deployed. |
| string | The private key of the wallet to authenticate the request. |
| string | The ID of the NFT to retrieve. |
| string | The address of the NFT contract on the specified blockchain. |
Response
Field Name | Type | Description |
---|---|---|
| number | The response code indicating the success or failure of the request. |
| string | The address of the seller who listed the NFT for sale. |
| string | The address of the NFT contract on the specified blockchain. |
| string | The ID of the NFT to retrieve. |
| string | The price at which the NFT is listed for sale. |
| string | The current highest bid on the NFT, if it's up for auction. |
| string | The address of the current highest bidder on the NFT. |
| string | The date and time when the bidding for the NFT will end, if it's up for auction. |
| boolean | Indicates if the NFT is currently listed for sale. |
| boolean | Indicates if the NFT has been sold. |
| boolean | Indicates if the NFT is up for auction. |
| string | The error message in case of a failed request. |
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 getNFT
request using the Nest SDK:
Response
Use Cases
Online Marketplaces: The function can be used by online marketplaces to retrieve information about an NFT listed for sale by a user.
Cryptocurrency Wallets: The function can be used by cryptocurrency wallets to display details of the NFTs owned by the user.
NFT Trading Platforms: The function can be used by NFT trading platforms to display information about a specific NFT that users are interested in buying or selling.
Last updated