js icon indicating copy to clipboard operation
js copied to clipboard

Setting Collection for NFT

Open myyellowshoe opened this issue 2 years ago • 1 comments

Bit confused here, I'm trying to add a collection to a NFT i'm creating, but getting an error. Cannot read property 'toBytes' of undefined

I have the address using PublicKey(), from web3.js but guessing I'm not formatting it properly somehow else? Thanks for any insight here!

myyellowshoe avatar Jun 20 '22 18:06 myyellowshoe

Figured out the first part. Was just a little fuzzy on the needed structure. I imported import { Collection } from '@metaplex-foundation/mpl-token-metadata'; and saw the structure from the types.

{
verified: false,
key: new PublicKey("mypubkey")
}

Next step is to figure out how to verify collection for an nft i've created.

myyellowshoe avatar Jun 21 '22 13:06 myyellowshoe

Hi there 👋

I'm closing this since this is now available on the NFT module (See collection parameters on the create and update operation inputs).

Thank you for raising this.

lorisleiva avatar Sep 30 '22 12:09 lorisleiva