◀ Back

NFT Configuration Examples

Below are example configurations for NFTs that can be used as templates for your own projects.

Standard NFT Config

Using Starkscan API for basic ERC721 token integration

This configuration is suitable for standard ERC721 tokens on the Starknet mainnet. It uses the default API to fetch token data.

{
  "network": "mainnet",
  "moduleType": "erc721",
  "contractAddress": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af"
}

Key Components:

  • network: Specifies the Starknet network (mainnet)
  • moduleType: Uses the standard ERC721 module
  • contractAddress: The address of the NFT contract

Custom API NFT Config

With Metadata Module and condition pattern for Starknet.ID domains

This advanced configuration uses a custom API endpoint and includes a condition pattern to filter for specific Starknet.ID domains.

{
  "moduleType": "erc721Metadata",
  "conditionPattern": [
    {
      "path": "domain",
      "pattern": "^([a-z0-9-]){4}\\.stark$"
    }
  ],
  "contractAddress": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
  "customApiParamName": "full_ids",
  "customApiUri": "https://api.starknet.id/addr_to_full_ids?addr={ADDRESS_INT}"
}

Key Components:

  • moduleType: Uses the ERC721 metadata module for enhanced data
  • conditionPattern: Filters for domains matching the pattern (4+ character .stark domains)
  • contractAddress: The address of the NFT contract
  • customApiParamName: Parameter name for the custom API
  • customApiUri: Custom endpoint with {ADDRESS_INT} placeholder for the wallet address

Implementation Notes

  • Configuration Format: All configurations should be valid JSON objects.
  • Contract Address: Always use the full Starknet contract address.
  • Custom API: When using custom APIs, ensure the {ADDRESS_INT} placeholder is included to be replaced with the user's address.
  • Condition Patterns: Use regular expressions in the pattern field to filter metadata based on specific criteria.