I am creating a token mint and was wondering, if i can use the meta plex sdk to upload meta data for it.
I am trying like this.
const mint = await createMint(
pg.connection,
pg.wallet.keypair,
mintAuthority.publicKey,
freezeAuthority.publicKey,
9 // We are using 9 decimals to match the CLI decimal default exactly
);
const metaplex = new Metaplex(pg.connection);
const nft = await metaplex.nfts().findByMint({
mintAddress: mint,
});
const updateResult = await metaplex.nfts().update({
nftOrSft: nft,
uri: "https://shdw-drive.genesysgo.net/AzjHvXgqUJortnr5fXDG2aPkp2PfFMvu4Egr57fdiite/PirateCoinMeta",
});
But getting this error:
Uncaught error: The account of type [e] was not found at the provided address [Cp1pypMrwZ5Ba6K6NuQKmPvWQjH46erCSe4gKkUn3ect].
The error doesnt tell me much. Maybe I can only use that function with an NFT that was created with the metaplex sdk which creates some extra accounts?
I can use the createCreateMetadataAccountV3Instruction instruction from '@metaplex-foundation/mpl-token-metadata' but I wanted to see if I can also do that without it.