MeshJS / mesh

An open-source library to advance Web3 development on Cardano

Home Page:https://meshjs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

blockfrostProvider.fetchAssetAddresses is not a function

v0d1ch opened this issue · comments

The title says it all. I tried using the blockfrost provider but it seems the fetchAssetAddresses is not available.

Relevant piece of code is taken from one of your examples but I'll paste it here just for the reference:

    const blockfrostProvider = new BlockfrostProvider('*************');
    let x = await blockfrostProvider.fetchAssetAddresses(
      'd9312da562da182b02322fd8acb536f37eb9d29fba7c49dc172555274d657368546f6b656e',
    )

    console.log(x);

Am I doing something wrong here? (sorry not a frontend guy)

I tried the demo, its fine.

From your code snippet, it looks ok.

Maybe you need to put inside a async function? Its really difficult to tell what the problem is from your code snippet.

@jinglescode The rest of the blockfrost examples work for me but this particular one does not (fails with the message in the issue title). Here is a link to the file so you can take a peek.

you missed the word await? See https://meshjs.dev/providers/blockfrost#fetchAssetAddresses

let heads = await blockfrostProvider.fetchAssetAddresses(
          'd9312da562da182b02322fd8acb536f37eb9d29fba7c49dc172555274d657368546f6b656e',
         )

@jinglescode turns out I was on version 1.5.0 🤦