@cross-nft-marketplace/auction-house-nft-hooks
Version:
Generic react hooks for fetching cross-nft-marketplace auctions, nfts, and data on arbitary 721s. Powers nft-components.
17 lines (16 loc) • 538 B
TypeScript
import { MetadataIsh } from '../fetcher/MetadataTypes';
import { SWRConfiguration } from 'swr';
export declare type useNFTMetadataType = {
loading: boolean;
error?: Error;
metadata?: MetadataIsh;
};
/**
* Fetches NFT Metadata from IPFS.
* This hook is cached, it can be called
* multiple times with no issue on one page.
*
* @param uri URI of metadata to fetch
* @returns @type useNFTMetadataType
*/
export declare function useNFTMetadata(uri?: string, options?: SWRConfiguration): useNFTMetadataType;