0.2.0 • Published 10 months ago

@iblcomponents/nft-details v0.2.0

Weekly downloads
-
License
-
Repository
gitlab
Last release
10 months ago

NFT-Details

A React Component that enables you to view the details of an NFT served by the Alchemy APIs.

NPM downloads JavaScript Style Guide

Install

npm :

npm install @iblcomponents/nft-details

Usage

From the client application you should:

1 . Create the configurations and inputData objects needed by the component. See the code snippet below for an example.
2 . Wrap these in a componentProps object and send it as props to the NftDetails component.
3 . The detail fields (those set "true" in configurations) of the NFT should be rendered on the component.

// NftDetails Component : Displays the details of an NFT by accessing its metadata via the Alchemy APIs.
import { getAPI } from "@iblcomponents/nft-details";

const YourComponent = () =>
{
    const NftDetails = getAPI("NftDetails").getComponent();

    const configurations = {
        "title": true,
        "image": true,
        "description": true,
        "currentOwner": true,
        "creator": true,
        "contract": true,
        "tokenId": true,
        "tokenStandard": true,
        "blockchain": true
    };

    const inputData = {
        "contractAddress": "a contract address",
        "owner": "wallet address of the NFT's current owner",
        "tokenId": "the token of the NFT",
        "tokenUri": "the token URI",
        "transaction": "the address of the transaction"
    };
    
    const componentProps = {
        saveOutputCallback: () => {}, // just an empty function, it is not used by the component
        configurations : configurations,
        inputData : inputData,
        componentDataFromInit: {} // just an empty object, it is not used by the component  
    }; 
    
    return <NftDetails { ...componentProps }/>
}

export default YourComponent
0.2.0

10 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.9

10 months ago

0.1.4

12 months ago

0.1.3

1 year ago

0.1.6

11 months ago

0.1.5

12 months ago

0.1.2

1 year ago

0.1.0

1 year ago