# Hook: useNFTDetails

Fetch all details of an NFT, for a given ERC-721 and ERC-1155 contract and takes in `walletAddress`,`contractAddress`,`tokenId` and `chainId`.

**Interface**

```javascript
function useNFTDetails(
walletAddress?:string, 
contractAddress?:string, 
tokenId?:String, 
chainId?:string)
```

**Response**

```javascript
type useNFTDetails = {
owners?: [array of owner ];
isLoading?: bool;
listingData?:[{listing data if item is listed  ex. price, id, nftAddress, seller etc}],
nftMetaData?:,{nft meta data ex. title, description ,media etc},
lendingData?:,{lendingData if item is on lend ex. lenderAddress, pricePerDay, maxRentDuration etc}
};
```

Example Code:

```javascript
import {ChainConfig, useAllOwnerNFT} from "@lyncworld/nft-marketplace";
import { AuthContext } from "lync-wallet-sdk";

function App() {
const {  walletAddress } = useContext(AuthContext);

const { isLoading, allOwnerNFT } = useAllOwnerNFT(
walletAddress,
"0x9342b1039949d536b2eb456de198c26362daa523",
ChainConfig.MATIC_MUMBAI
);

```

Not ready to create your own UI yet, don't worry we have got you covered!!\
Example Code:

```javascript
import {AuthContext} from "lync-wallet-sdk";
import {ChainConfig, LyncNFTDetails} from "@lyncworld/nft-marketplace";

const {provider, walletAddress} = useContext(AuthContext);

<LyncNFTDetails 
contractAddress={"0x9342b1039949d536b2eb456de198c26362daa523"}
chainId={ChainConfig.MATIC_MUMBAI}
tokenId={"1"}
provider={provider}
walletAddress={walletAddress}
/>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lync.gitbook.io/lync/npm-packages/marketplace/hook-usenftdetails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
