Search code examples
solanametaplex

Metaplex - How to listen to changes of Solana Metadata URI?


Anyone knows how could I know the URI of NFT has been changed? Should I listen to new slots in SOLANA and look for the changes?

Is there a program id and type? So I can try to get the change details from instructions and inner instructions in Solana transactions.


Solution

  • With @solana/web3.js you can listen for account changes in onAccountChange and then in the callback check if the URL has changed. https://solana-labs.github.io/solana-web3.js/classes/Connection.html#onAccountChange

    AFAIK you only receive the new status, not the old one