i've minted some NFTs with 721 metadata in the transaction and am now looking to retrieve the metadata information for further processing. I've send these NFTs around a bit so the utxo is not the minting transaction. Is there a way to retrieve this information using the cardano-cli or cardano-wallet commandline? Or are there other suggestions for doing this. I'm working on the testnet currently. Thanks a lot in advance!
2 Answers
I found that it is possible in the following way:
- Use the Wallet API to find a minting transaction from a list of all of your wallet's transactions https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listTransactions. You can find here also metadata but for a better format, you can proceed to the below step.
- Use blockfrost.io API to get metadata from minting transaction https://docs.blockfrost.io/#tag/Cardano-Transactions/paths/~1txs~1{hash}~1metadata/get
Alternatively, you can use https://github.com/input-output-hk/cardano-db-sync to sync the whole node to Postgres DB from where you can query metadata https://forum.cardano.org/t/cardano-db-sync-query-metadata/74386
The third way is to use https://input-output-hk.github.io/offchain-metadata-tools/. By my understanding, the main purpose of this tool is to verify native tokens. It requires to be done pull request to git and after approval, you can do a query with this https://input-output-hk.github.io/offchain-metadata-tools/api/latest/
Cardanoscan can be used to browse the metadata. Similar services is also available in test net. Sample output is like this
-
I guess the problem is to find a specific transaction, among all millions or billions of transactions that may exist on the block-chain. There are efforts like covalent ( covalenthq.com) that provide search services but I don't know if that is available for cardano. Commented Sep 12, 2021 at 8:29