Skip to main content

getwalletnftcollections-1


description: Get all NFTs minted by the given wallet address.

getWalletMintedNFTs

How to use getWalletMintedNFTs method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getWalletMintedNFTs method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.

ParameterTypeDescription

walletAddress*

stringThe wallet address of the owner
contractAddressstringThe contract address for the NFT contract
pageSizenumber

Maximum number of records to be retrieved in one page (max 100, default 25)

pageKeystring

Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response

Returns

ParameterTypeDescription
countnumberNumber of records returned in the current page
nextPageKeystringKey used to get the next page of results
nftsarray<object>

array of NFT objects (see the getNFT method for more details)

info

This API is paginated, response items are ordered descending by:

  • blockNumber
  • transferIndex

Example Request and Result for getWalletMintedNFTs

In this section, you can find an illustrative example of a request made to retrieve all NFTs minted by the given wallet address using the getWalletMintedNFTs method.

info

The example in this section uses a non-existing project id.

Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Returns all NFTs currently owned by a wallet.

GET https://starknet-mainnet.blastapi.io/<project_id>/builder/getWalletMintedNFTs?

Query Parameters

NameTypeValue
walletAddressstring

0x031c0b3ce1e629066ff59578f212a1bd2db6efda0788d718fb5303df90292772

contractAddressstring

0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af

pageSizenumber
2
{
"count": 2,
"nextPageKey": "Y2ZiNjA3ZDBiNjFiOjE3MTIzMTYzMzc6MzE4MDEwOjM1Mg",
"nfts": [
{
"contractAddress": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
"contractName": "Starknet.id",
"contractSymbol": "ID",
"contractType": "erc721",
"tokenId": "552582037414",
"minterAddress": "0x031c0b3ce1e629066ff59578f212a1bd2db6efda0788d718fb5303df90292772",
"mintBlockNumber": 318010,
"mintTimestamp": 1697176956,
"mintTransactionHash": "0x05d211557dd0060193bfba54b02af137f0ab31883911d33a5be993b9bdc06708",
"numberOfTokens": "1",
"numberOfOwners": "1",
"ownerAddress": "0x02ec66430784311624108a43e18c6f4def7c29a40113a17048be8d87d0d5a02a",
"tokenUri": "https://api.starknet.id/uri?id=552582037414",
"tokenMetadata": "{\"name\":\"Starknet ID: 552582037414\",\"description\":\"This token represents an identity on StarkNet.\",\"image\":\"https://starknet.id/api/identicons/552582037414\",\"expiry\":null,\"attributes\":null}",
"name": "Starknet ID: 552582037414",
"description": "This token represents an identity on StarkNet.",
"attributes": null,
"externalLink": null,
"imageUrl": "https://starknet.id/api/identicons/552582037414",
"animationUrl": null,
"cachedImage": null,
"cachedThumbnail": null
},
{
"contractAddress": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
"contractName": "Starknet.id",
"contractSymbol": "ID",
"contractType": "erc721",
"tokenId": "171234871067",
"minterAddress": "0x031c0b3ce1e629066ff59578f212a1bd2db6efda0788d718fb5303df90292772",
"mintBlockNumber": 318010,
"mintTimestamp": 1697176956,
"mintTransactionHash": "0x025cbb440b9b4cf3ee932ff9e68a97b82084ec29b30b11e9dd0a7d9fdbf23895",
"numberOfTokens": "1",
"numberOfOwners": "1",
"ownerAddress": "0x005ecc57ba6460f3f66df245af39ce6d842b6ecea3a04b024ee8ac29c8eedf77",
"tokenUri": "https://api.starknet.id/uri?id=171234871067",
"tokenMetadata": "{\"name\":\"Starknet ID: 171234871067\",\"description\":\"This token represents an identity on StarkNet.\",\"image\":\"https://starknet.id/api/identicons/171234871067\",\"expiry\":null,\"attributes\":null}",
"name": "Starknet ID: 171234871067",
"description": "This token represents an identity on StarkNet.",
"attributes": null,
"externalLink": null,
"imageUrl": "https://starknet.id/api/identicons/171234871067",
"animationUrl": null,
"cachedImage": null,
"cachedThumbnail": null
}
]
}
curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getWalletMintedNFTs?walletAddress=0x031c0b3ce1e629066ff59578f212a1bd2db6efda0788d718fb5303df90292772&contractAddress=0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af&pageSize=2 \
-H 'Content-Type: application/json' \