How it works?
This last section demonstrates how to run your dApp to mint a non-fungible token (NFT).
Step 1: Running the Verifier Backend
Run the verifier backend, which the dApp communicates with.
Parameters can be provided from the terminal or a JSON file.
To create a custom statement, refer to this guide.
Example statement JSON provided for verifying age:
Once you have the statement JSON file, run the application within your executable path. If you're utilizing your node, modify the node IP to localhost. However, if you're utilizing the testnet node, maintain the IP as provided below.
Step 2: Running the dApp & Requesting Proof
Navigate to the mint-ui directory and start the dApp:
Create a new instance of the
cis2-multi
contract to mint an NFT. Then, click "DEPLOY NEW" to create a new instance, providing the verify key as an initiation parameter.
Click "GET SIGNATURE" and accept the request, waiting for proof verification. Once verified, you'll receive a signature signed by the private key (signKey) provided earlier:
If everything goes well, we should have a signature like the one below.
You now have the signature, so you can mint a token because you have proven that you are older than 18.
Step 3: Minting Token
Provide metadata and the contract index to mint the token.
Step 4: Confirmation
After the transaction is finalized, you'll receive an alert confirming successful minting.
Last updated