Get List NFT By Owner
Request
In order to get list NFT of a wallet, SDK provides you with a getNFTsByOwner endpoint to do so
try {
const mainnetClient = nft2Client.getNFT2ContractMultichain('mainnet');
const { nfts, total } = await mainnetClient.getNFTsByOwner(
"0x...", // user wallet
{
limit: 20,
offset: 0
},
[56, 43114]
);
console.log(nfts, total)
} catch (e) {
console.error(e);
}Parameters
ownerAddress(string): Wallet address of owner.Pagination:
limit(number): Pagination limit.offset(number): Pagination offset.sort({field: 'tokenId' | 'mintedAt'; order: 'DESC' | 'ASC'}): Optional. Default order ASC by tokenId.filter({isDerivative: false | true}): Optional. If true, get list derivative NFT of user. Default false.
chainIds: Which chains to get from.
Response
Chain not supported:
Last updated