Walt.id: Mint an NFT with Walt.id and Filebase
Learn how to mint an NFT with Walt.id and Filebase.
What is Walt.id?
Walt.id is an open-source NFT infrastructure and digital identity product that provides pre-built ‘kits’ that can be used as a springboard for Web3 development. Kits offered by Walt.id include an SSI kit, a crypto wallet kit, and an NFT kit. This tutorial will showcase the NFT kit.
Read below to learn how to mint an NFT with Walt.id and Filebase.
1. Start by cloning the Walt.id NFT Kit GitHub repository:
git clone https://github.com/walt-id/waltid-nftkit.git
2. Then, navigate into the project’s folder.
cd waltid-nftkit
3. Open the following file in a text editor:
./src/main/resources/walt-default.yaml
4. Replace the PRIVATE_KEY value with your crypto wallet's private key, then save the file:
5. Next, build the docker container with the following command:
docker build -t nftkit .
6. Then, run the container:
docker run -p 7000:7000 -it nftkit
7. To mint NFTs, we need some images stored on IPFS.
To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.
8. Select ‘Buckets’ from the left sidebar menu, or navigate to console.filebase.com/buckets.
Select ‘Create Bucket’ in the top right corner to create a new bucket for your NFTs.
9. Enter a bucket name and choose the IPFS storage network to create the bucket.
Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.
10. Now, upload your NFTs to Filebase using the web console and select ‘Folder’, then select the folder that contains your NFT files.
These files need to be named in sequential order, such as 0.png, 1.png, 2.png, etc.
11. You will see your folder uploaded as a single object:
12. Copy the CID of your folder:
13. Navigate to your IPFS Folder using the Filebase IPFS gateway to see your folder’s files:
https://ipfs.filebase.io/ipfs/IPFS_CID
14. Now it’s time to create the smart contract for our NFTs.
Use the following CURL command to deploy a smart contract on the Polygon Mumbai network:
15. Copy the contract address that is returned from this CURL command.
16. To mint your NFT, use the following CURL command:
Replace the following values:
CONTRACT_ADDRESS: The smart contract address you took note of in the previous step.
CID: The IPFS folder CID you copied earlier.
WALLET_ADDRESS: Your crypto wallet address.
17. Repeat the previous CURL command for each NFT you’d like to mint, changing the 0.png portion of the command to reflect 1.png, 2.png, etc.
18. To get information about your NFTs, you can use the following CURL command:
Replace the following value:
CONTRACT_ADDRESS: The smart contract address used to mint your NFTs.
Last updated