Skip to main content
The NFT module provides comprehensive functionality for interacting with Non-Fungible Tokens (NFTs) on the Solana blockchain. It integrates with the Tensor API for fetching NFT data, collection information, and performing buy/sell operations.

Core Functionalities

NFT Portfolio

View and manage all NFTs owned by a user with detailed metadata and pricing information

Collection Discovery

Search and browse NFT collections with floor price tracking and collection analytics

Buy NFTs

Purchase individual NFTs or floor NFTs from collections with integrated Tensor trading

Sell & List

List owned NFTs for sale with custom pricing and duration settings

Installation & Setup

1

API Configuration

Configure your Tensor API access in .env.local:
2

Import Module

Import the components and hooks you need:
3

Wallet Integration

Ensure wallet providers are configured for transaction signing:
Tensor API: This module primarily uses Tensor’s API for NFT data and trading. Ensure you have appropriate API access and rate limits configured.

Module Architecture

Core Components

NftScreen - Main NFT trading interface with buy/sell tabs
Features:
  • Tabbed interface for buying and selling
  • Collection search and discovery
  • User’s NFT portfolio display
  • Integrated trading functionality

Core Hook: useFetchNFTs

The primary hook for fetching user’s NFT portfolio:
Hook Parameters:
  • walletAddress - User’s wallet address
  • options - Configuration object with:
    • includeCompressed - Include compressed NFTs
    • includeMetadata - Fetch full metadata
    • sortBy - Sort order preference
Returns:
  • nfts - Array of NFT items
  • loading - Loading state
  • error - Error message if any
  • refetch - Function to refresh data

NFT Service Functions

The nftService.ts provides comprehensive Tensor API integration:
object

Quick Start Examples

NFT Utilities

The module includes specialized utilities for handling NFT data:
object

Advanced Features

NFT Sharing Integration

Real-time Floor Price Tracking

Batch NFT Operations

Integration with Other Modules

Embedded Wallets

Transaction signing and wallet address management for NFT operations

Data Module

Enhanced NFT metadata and portfolio value calculations

Thread Module

Social sharing of NFT listings and collection discoveries

MoonPay

Purchase SOL to fund NFT acquisitions

Error Handling & Troubleshooting

object

Performance Considerations

Image Optimization: Use image caching and lazy loading for better performance when displaying large NFT collections.
API Limits: Be mindful of Tensor API rate limits, especially when fetching large collections or making frequent requests.

API Reference

For detailed API documentation, see:
The NFT module provides a complete digital collectibles trading platform, enabling users to discover, buy, sell, and manage NFTs with professional-grade tools and seamless Tensor integration.