iota-wiki icon indicating copy to clipboard operation
iota-wiki copied to clipboard

add tutorial "How to mint an NFT with Javascript"

Open huhn511 opened this issue 3 years ago • 4 comments

Description of change

Added a new tutorial "How to mint an NFT with Javascript" with related images.

I created a new folder in the images directory, called like the tutorial. So each tutorial could have their own directory to prevent chaos.

What do you think?

huhn511 avatar Jul 19 '22 13:07 huhn511

Sorry to keep getting back to discussing here, but I l'd like to get to some basic form of tutorial writing in general for the Wiki, and this tutorial is I think a great opportunity to discuss this and create that baseline.

So currently the tutorial requires a lot of code that is unrelated to actually minting the NFT which lead to a lot of copying like @huhn511 indicated and it distracts from the purpose.

So what if we ditch all the faucet and interaction helper code and put that in the Setup. I mean a prerequisite to be able to mint an NFT is to have an address with tokens in it, doesn't really matter how you get them. So then it would become:

Setup:

  • Get an address with tokens (pointers to multiple options, like the build in faucet of Firefly Beta, the explorer faucet, programmatically, etc.)
  • Create NPM project
  • Install dependencies

Steps:

  1. Create your metadata.
  2. Create the transaction using the ingredients above.
  3. Calculate deposit required.
  4. Create the output and sign it.
  5. Send it.
  6. Find it in the explorer to verify it worked.

Pointers to further reading:

  • How to transfer the NFT
  • NFTs owning NFTs
  • etc.

Now anything related to actually creating the NFT is contained in the steps and anything else is either a prerequisite, setup or further reading. Wdyt?

jlvandenhout avatar Aug 19 '22 10:08 jlvandenhout

@jlvandenhout I like the idea and we might even want to go one step further. With Stardust almost every interaction (except tagged data payloads) with the network requires you to have an address with native network coins (IOTA/Shimmer) on it. Therefore it might be worth to have a separate tutorial showing the different ways to reach that point with different libs (iota.rs, wallet.rs, iota.js, or even Firefly directly).

As soon as we have a tutorial for "How to get an address and tokens with library xyz" we can easily reference it as a prerequisite in follow up tutorials such as "How to create an NFT/native tokens with wallet.rs". E.g. "Before you can create an NFT, you need to walk through this tutorial in order to get an address with tokens."

Is that what you had in mind, or does it break the idea of an independent tutorial?

adrian-grassl avatar Aug 22 '22 10:08 adrian-grassl

Is that what you had in mind, or does it break the idea of an independent tutorial?

This is what I had in mind yes. Tutorials will always need to strike a balance between completeness and reader friendliness. Normally I'd say a tutorial has to cover A through Z. In this case, however, having a third of the code just to get some tokens from a faucet (which isn't a real-world scenario anyways) I'd say it's better to just reference ways to get tokens and move the focus more to the NFT minting.

jlvandenhout avatar Aug 22 '22 12:08 jlvandenhout

Moved the content for the "basic stuff" like generating addresses and get testnet funds to another tutorial, which can be used as a base in this and future tutorials.

PR: https://github.com/iota-wiki/iota-wiki/pull/720

huhn511 avatar Aug 30 '22 15:08 huhn511