thecryptoecho


ABA Create an NFT with CLI in minutes

It took me about 12 hours to figure out how to create an NFT on ABA with CLI. You can do this on Linux or Windows Powershell and the commands are the same. I never used Linux or CLI before so it took some time to figure it out but if you follow this blog, you will be able to start minting in minutes.

Why learn CLI and mint instead of waiting for a GUI interface? ABA is a new project and I see a wave of developers joining the ABA Project. Being early in a project always has an advantage.


Preparation is important!

Upload your NFTs and Metadata
I chose the free service Pinata Cloud service https://app.pinata.cloud/
Free sign up, simply click the UPLOAD button. You automatically get a Gateway so you can see the URLs of your files.


Create your DID
Before you being

Make sure you are in your "aba-blockchain" folder

cd aba-blockchain

Activate the session to get to the Virtual Environment

 . ./activate

You can initialize aba (not sure if you need this step)

aba init
Create a DID
aba wallet did create -n "The Crypto Echo" -a 1 -m 0.00001 

Expected Output

Successfully created a DID wallet with name Test DID and id 2 on key ########## 
Successfully created a DID did:aba:randonalphanumeric in the newly created DID wallet 

Note the Wallet id: In this example it is "2" we can verify with the following command

aba wallet show

Expected Output

Wallet
Create an NFT Wallet

The NFT Wallet should be create automatically, but if not follow these steps

Make sure you use your DID that was created

aba wallet nft create -di did:chia:13p5fdxgm8e2pngdwp8m088t0etp7rgzx9ye2ju8v5ackcyg7t9nqx2um83 -n "DID-Linked NFT Wallet"

Expected Output

Successfully created an NFT wallet 

Note in this example, the NFT Wallet ID is "4"

Run the following command again

aba wallet show

Expected Output:

Create the JSON File
Copy and Paste this and save it as a .json extension
Edit the documents customized to your uploaded files

{
    "format": "CHIP-0007",
    "name": "Zombie Friends #1: Blade of the Revenant",
    "description": "First Collectable ABA NFT Zombie Friends",
    "minting_tool": "SuperMinter/2.5.2",
    "sensitive_content": false,
    "series_number": 1,
    "series_total": 100,
    "attributes": [
        {
            "trait_type": "Print",
            "value": "100"
        },
        {
            "trait_type": "Weapon",
            "value": "Swords"
        },
        {
            "trait_type": "Friendship",
            "value": 200,
            "min_value": 0,
            "max_value": 255
        }
    ],
    "collection": {
        "name": "ABA Zombies",
        "id": "9fab1e5d-84e7-4e43-94ee-b7463a6a46b7",
        "attributes": [
            {
                "type": "description",
                "value": "The ABA Zombie Frieds Series"
            },
            {
                "type": "icon",
                "value": "https://copper-urgent-smelt-557.mypinata.cloud/ipfs/QmWnYN889EM5UBoK49RMNqbp8svC2nkgWHfni3hGDrVSni?pinataGatewayToken=_z3cRazRrRcicm9zNh_bteIrzVOuoDmBtwHce6BtsZQG9ZYI6mbo3mHJ3kYh2vVr"
            },
            {
                "type": "banner",
                "value": "https://copper-urgent-smelt-557.mypinata.cloud/ipfs/QmenUJdGDnw38pT5sEvy3f22r8EpdneafftkJhMtKhSx1c?pinataGatewayToken=_z3cRazRrRcicm9zNh_bteIrzVOuoDmBtwHce6BtsZQG9ZYI6mbo3mHJ3kYh2vVr"
            }
        ]
    }
}

Pro-tip: You can use the JSON Schema Validator to see if you have any errors
https://www.jsonschemavalidator.net/
Credit Steve Stepprs for giving me this link for the tool
Following Steve is a must in the Chia and ABA ecosphere
https://twitter.com/steppsr

Pro-tip: For the Collection ID, use the UUID Generator
https://www.uuidgenerator.net/version4
Once again credit Steve Stepprs for explaining this to me and sending me this link

Save the JSON file and upload it to Pinata or whatever cloud server you choose


Mint an NFT (with DID)

Let's go through the flags with an example. Don't copy this example code below

-f fingerprint (available at top of the wallet show)
-i the wallet ID. We created the NFT Wallet ID #4
-ra royalty address - use your ABA address
-ta Target address - can use the same ABA address
-u Comma separated URIs
-nh NFT Hash - we need to create the HASH with the following command. Here is an example

curl "https://copper-urgent-smelt-557.mypinata.cloud/ipfs/QmPabZgSVx8Gw2jW6xxCatCbVQndnfBVxwDAD7JcF2j8XB?pinataGatewayToken=_z3cRazRrRcicm9zNh_bteIrzVOuoDmBtwHce6BtsZQG9ZYI6mbo3mHJ3kYh2vVr" | sha256sum

-mu Comma separated metadata (not required)
-mh NFT metadata hash (not required)
-lu Comma separeted license URI (not required)
-lh NFT license hash (not required)
-en edition number (default:1) (not required)
-et edition total (default:1) (not required)
-rp Royalty percentage in basis points (default:0) e.g. 800 is 8%
-m fee Sets the fee per transaction (default:0) Not required

Pro-tip: For -i use the Wallet ID of the NFT Wallet

Ready to MINT

aba wallet nft mint -f 15103852 -i 5 -ra aba1ev8qmrw2lhu7ce03fjx5unqhfx5s0pgec80ngzw62l4y68kxrgys4grsvr -ta aba1ev8qmrw2lhu7ce03fjx5unqhfx5s0pgec80ngzw62l4y68kxrgys4grsvr -u https://copper-urgent-smelt-557.mypinata.cloud/ipfs/QmPHTnDD3YCnPaQi2zqTVYtDdCoEurz98KpBKzG79KAYVN?pinataGatewayToken=_z3cRazRrRcicm9zNh_bteIrzVOuoDmBtwHce6BtsZQG9ZYI6mbo3mHJ3kYh2vVr -nh 1d47901e661e1362bcd65fd853988abeea16921a77a04cffac6b72f1fec48fa5 -mu https://copper-urgent-smelt-557.mypinata.cloud/ipfs/QmPabZgSVx8Gw2jW6xxCatCbVQndnfBVxwDAD7JcF2j8XB?pinataGatewayToken=_z3cRazRrRcicm9zNh_bteIrzVOuoDmBtwHce6BtsZQG9ZYI6mbo3mHJ3kYh2vVr -mh 9eb2397c348cd25d230af64f9828e5d17fb5a3e6bc439624ae7cc0718ab5472e -rp 500 -m 0.000000001



Help support me by donating below.

XCH Address: xch1m059af0f5h9y9fkn263daz7tp6k3cj470kgn486c4024mhmp9hqszshxyr

XCH Amount