4

One can check with online tools (described here) if a token is an NFT.

How the same thing can be done using CLI tools (in some sort of a script)?

0

Since at the moment non-fungible tokens are indivisible in the Cardano network, and they can be sent only along with 1,500,000 lovelace, NFTs can be easily seen querying the "balance" at the destination address with the standard command:

cardano-cli query utxo --address $(cat payment.addr) --mainnet

Moreover, don't miss blockfrost.io project. Using it you can query information of a native token on Cardano (consider, you need to provide the string concatenation of the policy_id and hex-encoded asset_name):

curl -H 'project_id: 1234567890' https://cardano-mainnet.blockfrost.io/api/v0/assets/d894897411707efa755a76deb66d26dfd50593f2e70863e1661e98a07370616365636f696e73

You'll get the following JSON response:

{
  "policy_id": "d894897411707efa755a76deb66d26dfd50593f2e70863e1661e98a0",
  "asset_name": "7370616365636f696e73",
  "fingerprint": "asset1pmmzqf2akudknt05ealtvcvsy7n6wnc9dd03mf",
  "quantity": "50000000",
  "initial_mint_tx_hash": "3cce12c77b9d11d70575320c4f2834b26debb065308fbe43954018fbeb90010d",
  "onchain_metadata": null,
  "metadata": null
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.