getNFT(contract, nftIdx)
Feature
Return information about certain nft with given nft index. Note: nftIdx is currently not returned after executing the mint function. It will be updated later.
Parameters
string
contract address,
int
nft index // Start with 0, and increases by 1 each time after minting
data
of SuccessResponse
object
NFT information
example
const contractAddress = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const nftIdx = 0;
// Note: an asynchronous request.
const NFTInfo = async () => {
const info = await mitum.nft.getNFT(contractAddress, nftIdx)
console.log(info.data);
};
NFTInfo();
// output
{
_hint: 'mitum-nft-nft-v0.0.1',
nft_idx: 0,
active: true,
owner: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
hash: '381yXYxtWCavzPxeUXRewT412gbLt2hx7VanKazkBrsnyfPPBdXfoG52Yb2wkF8vC3KJyoWgETpsN6k97mQ8tUXr1CmTedcj',
uri: 'www.MyNFT.com',
approved: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
creators: { _hint: 'mitum-nft-signers-v0.0.1', total: 100, signers: [Array]
}
PreviousmintForMultiCreators(contract, sender, receiver, uri, hash, currency, creators)NextgetOwner(contract, nftIdx)
Last updated