{"id":14956225,"url":"https://github.com/chainstacklabs/generative-ai-music-nft-javascript","last_synced_at":"2025-09-17T20:11:50.010Z","repository":{"id":188251538,"uuid":"673184302","full_name":"chainstacklabs/generative-ai-music-nft-javascript","owner":"chainstacklabs","description":"This project contains all tutorial files from the How to mint a generative music NFT with Chainstack IPFS Storage and Soundraw tutorial, originally published on the Chainstack Developer Portal: Web3 [De]Coded.","archived":false,"fork":false,"pushed_at":"2024-04-10T11:24:54.000Z","size":14442,"stargazers_count":5,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T12:00:34.761Z","etag":null,"topics":["generative-ai","generative-art","generative-music","ipfs","ipfs-api","nft","nft-generator","nfts","smartcontract"],"latest_commit_sha":null,"homepage":"https://docs.chainstack.com/docs/how-to-mint-generative-music-nft-with-chainstack-ipfs-storage-soundraw/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainstacklabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-01T04:13:39.000Z","updated_at":"2024-12-09T20:41:02.000Z","dependencies_parsed_at":"2023-08-14T14:32:41.658Z","dependency_job_id":"a2dde243-e3be-4d96-8be1-b28ad9fbb583","html_url":"https://github.com/chainstacklabs/generative-ai-music-nft-javascript","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"3d2845d246ce66ac7819c3aafad322e513454a7f"},"previous_names":["chainstacklabs/generative-ai-music-nft-javascript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fgenerative-ai-music-nft-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fgenerative-ai-music-nft-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fgenerative-ai-music-nft-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fgenerative-ai-music-nft-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainstacklabs","download_url":"https://codeload.github.com/chainstacklabs/generative-ai-music-nft-javascript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234721696,"owners_count":18876852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generative-ai","generative-art","generative-music","ipfs","ipfs-api","nft","nft-generator","nfts","smartcontract"],"created_at":"2024-09-24T13:12:33.959Z","updated_at":"2025-09-17T20:11:44.947Z","avatar_url":"https://github.com/chainstacklabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"1200\" alt=\"Labs\" src=\"https://user-images.githubusercontent.com/99700157/213291931-5a822628-5b8a-4768-980d-65f324985d32.png\"\u003e\n\n\u003cp\u003e\n \u003ch3 align=\"center\"\u003eChainstack is the leading suite of services connecting developers with Web3 infrastructure\u003c/h3\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-ethereum/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Ethereum.svg\" /\u003e\u003c/a\u003e\u0026nbsp;  \n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-bnb-smart-chain/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/BNB.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-polygon/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Polygon.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-avalanche/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Avalanche.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-fantom/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Fantom.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  • \u003ca target=\"_blank\" href=\"https://chainstack.com/\"\u003eHomepage\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/protocols/\"\u003eSupported protocols\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/blog/\"\u003eChainstack blog\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/quickstart/\"\u003eChainstack docs\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/quickstart/\"\u003eBlockchain API reference\u003c/a\u003e • \u003cbr\u003e \n  • \u003ca target=\"_blank\" href=\"https://console.chainstack.com/user/account/create\"\u003eStart for free\u003c/a\u003e •\n\u003c/p\u003e\n\n# Generative music NFT minter tutorial [![using with dotenv-vault](https://badge.dotenv.org/using.svg?r=1)](https://www.dotenv.org/r/github.com/motdotla/dotenv?r=1)\nThis project contains all tutorial files from the [How to mint a generative music NFT with Chainstack IPFS Storage and Soundraw](https://docs.chainstack.com/docs/how-to-mint-generative-music-nft-with-chainstack-ipfs-storage-soundraw/) tutorial, originally published on the [Chainstack Developer Portal: Web3 [De]Coded](https://docs.chainstack.com/docs/web3-decoded-introduction).\n\n## Project details\nThis repository contains scripts and contracts needed to create a new wallet, check its balance, compile an NFT contract, and mint music NFTs using generated metadata on the Ethereum network with [Chainstack IPFS Storage](https://chainstack.com/ipfs-storage/), [Soundraw](https://soundraw.io/), Hardhat and Web3js.\n\n## Outcomes\n* [Contract: Goerli](https://goerli.etherscan.io/address/0xDBcD1d3A3f21A54322110D45038f60e9B102CA71)\n* [Token: Goerli](https://goerli.etherscan.io/token/0xdbcd1d3a3f21a54322110d45038f60e9b102ca71)\n* [OpenSea 1: Goerli](https://testnets.opensea.io/assets/goerli/0xdbcd1d3a3f21a54322110d45038f60e9b102ca71/4)  \n* [OpenSea 2: Goerli](https://testnets.opensea.io/assets/goerli/0xdbcd1d3a3f21a54322110d45038f60e9b102ca71/5)  \n* [OpenSea 3: Goerli](https://testnets.opensea.io/assets/goerli/0xdbcd1d3a3f21a54322110d45038f60e9b102ca71/6)  \n\n## Dependencies\n* [Chainstack endpoint](https://console.chainstack.com/user/account/create)  \n* [Soundraw API token](https://soundraw.io/)\n* [Dotenv](https://github.com/motdotla/dotenv)  \n* [Hardhat with Web3js](https://github.com/NomicFoundation/hardhat/tree/main/packages/hardhat-web3)  \n* [OpenZeppelin contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)  \n* [Axios](https://github.com/axios/axios)  \n* [Form data](https://github.com/form-data/form-data)  \n* [Canvas](https://github.com/Automattic/node-canvas)\n* [Image data URI](https://github.com/DiegoZoracKy/image-data-uri)\n* [Jdenticon](https://github.com/dmester/jdenticon)\n* [Merge images](https://github.com/lukechilds/merge-images)\n* [Random words](https://github.com/apostrophecms/random-words)\n* [Text-to-image](https://github.com/bostrom/text-to-image)\n\n## Usage\n1. Clone or fork this repo to a preferred location by running in CLI:  \n\n```\ngit clone https://github.com/chainstacklabs/generative-ai-music-nft-javascript.git\n```\n\n2. Install dependencies by running in CLI:  \n\n```sh\nnpm ci  \n```\n\n3. Rename `.env.sample` to `.env` and fill in your endpoint URLs for each network, then your Chainstack and Etherscan API keys:  \n\n```env\nGOERLI=\"https://your-goerli-endpoint-here\"\nSEPOLIA=\"https://your-sepolia-endpoint-here\"\nMAINNET=\"https://your-mainnet-endpoint-here\"\nCHAINSTACK=\"Bearer y0urChainstackAPIkeyHer3\"\nETHERSCAN=\"Y0URETHERSCANAPIKEYHER3\"\nSOUNDRAW=\"Bearer Y0urSoundrawAPIt0k3nHere==\"\n```\n\n4. Generate a new wallet address key pair and fund it from the Chainstack $NETWORK faucet by running in CLI:  \n\n```sh\nnpx hardhat run scripts/wallet.js --network $NETWORK  \n```\n\n5. Check wallet balance by running in CLI:  \n\n```sh\nnpx hardhat run scripts/balance.js --network $NETWORK  \n```\n\n6. Deploy the NFT minter smart contract from the ABI \u0026 BIN files by running in CLI:  \n\n```sh\nnpx hardhat run scripts/deploy.js --network $NETWORK  \n```\n\n7. Generate all media files and JSON metadata with Soundraw and other libraries by running in CLI:  \n\n```sh\nnpx hardhat run scripts/generate.js  \n```\n\n8. Pin all media files and JSON metadata with Chainstack IPFS Storage by running in CLI:  \n\n```sh\nnpx hardhat run scripts/pin.js  \n```\n\n9. Mint an NFT with the metadata from the pinned JSON file by running in CLI:  \n\n```sh\nnpx hardhat run scripts/mint.js --network $NETWORK  \n```\n\n## Files\n* .env.sample - Sample Dotenv file containing pre-formatted slots needed for key script variables\n* contracts/MyFirstMusicNFT.sol - Smart contract supporting functions to mint NFTs with custom tokenURI\n* src/ - Sample media files and metadata JSON you can use to test minting\n* scripts/wallet.js - Script to generate a wallet address and key pair\n* scripts/balance.js - Script to check the balance of a wallet address\n* scripts/deploy.js - Script to deploy the NFT minter smart contract from the ABI \u0026 BIN files\n* scripts/generate.js - Script to generate media files and metadata for the NFTs\n* scripts/pin.js - Script to pin relevant media files and JSON metadata with Chainstack IPFS Storage\n* scripts/mint.js - Script to mint an NFT with the metadata from pinned JSON metadata file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fgenerative-ai-music-nft-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainstacklabs%2Fgenerative-ai-music-nft-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fgenerative-ai-music-nft-javascript/lists"}