I am trying to extract the metadata of any NFT of interest on-chain. According to Lucid documentation, you can use metadataOf(). Here is my code:
const lucid = await Lucid.new(
new Blockfrost(
"https://cardano-preprod.blockfrost.io/api/v0",
Deno.env.get("BLOCKFROST_API_KEY")
),
"Preprod"
);
const test = await lucid.metadataOf("ASSETNAME_HERE");
console.log(test)
The code throws an error: ""No variant matched." Meaning that it can't find .metadataOf
. Anyone has an idea how to fix this?