All packages are official, so no need to worry about the security. Don't use any online AI assistant during the process to guarantee absolute security.
Make sure you have at least 0.02 SOL in your wallet.
| Process | Balance |
|---|---|
| Begin | 0.036597503 SOL |
| After Uploading | 0.036470458 SOL |
| After Minting | 0.0168139 SOL |
npm installATTENTION: DON'T SHARE YOUR PRIVATE KEY TO ANYONE!
Normally, the private key in your wallet is the string of base58, you can convert it to the array format(Just like the json generated by solana cli) by using the following command:
# paste your private key as `examplePrivateKey` in script.
node convert-key.jsThis file supports the conversion of the array format, the base58, base64 and hex format. All the format will be converted as the universal array format.
Save the converted-keypair.json to ~/.config/solana/id.json (The default path, you can also customize getKeypairFromFile()).
Adjust some parameters(marked as [Change your picture path], [Change your metadata], [Change your NFT name], [Change your NFT symbol], [Change your seller fee basis points]) in app.js and run the script.
node app.jsThen you can check your NFT (https://explorer.solana.com/address/NFTaddress) on the Solana Explorer.
Mint Authority and Freeze Authority are generate by metaplex PDA which is a special public key without private key(they are not on Ed25519 curve). You can just treat it as a index. For more info, you can refer to the official docs and the stackchange.
https://solana.com/en/developers/courses/tokens-and-nfts/nfts-with-metaplex