I have been trying to get Nft
data instead of Metadata
from a wallet key. I am using the load
function as specified here: https://github.com/metaplex-foundation/js#load
import {Metaplex} from "@metaplex-foundation/js";
const metaplex = new Metaplex(connection);
metaplex.nfts()
.findAllByOwner({owner: walletKey.publicKey})
.run()
.then((nfts) => nfts.forEach(nft => console.log(metaplex.nfts().load(nft))));
However Typescript throws an error: Argument of type 'Metadata' is not assignable to parameter of type 'LoadMetadataInput'. Property 'metadata' is missing in type 'Metadata' but required in type 'LoadMetadataInput'
.
Reading the docs show that LoadMetadataInput
should take a type of Metadata
. What did I do wrong?
@metaplex-foundation/js^0.15.0