This project includes a tool to mint Cardano native tokens. It utilizes Blockfrost and Lucid to interact with the blockchain.
- Node.js (v18.16.1)
- npm (v9.7.2 or later)
Install dependencies using npm:
npm installCall the following to simulate the minting process:
npm run startThis will build a transaction to mint a token but will not submit it to
the blockchain. To submit the transaction, set the MINT environment
variable to true:
MINT=true npm run startThis project uses Vault for secret storage. Secrets are stored under the
path token-minter. To activate this path in your
local-vault instance, execute
the following command:
docker exec vault vault secrets enable -path=token-minter -version=1 kvThis project utilizes the Blockfrost API to interact with the Cardano blockchain. To enable the application to access your Blockfrost API key, it must be stored in Vault. Within your Blockfrost account, you should possess two API keys: one for the mainnet and another for preview. The Token Minter depends on the preview key. Here’s the method to save it to Vault:
vault-cli set -p token-minter/blockfrost api_keyThis project utilizes a Cardano wallet to mint tokens. To be able to mint tokens, you must store the wallet seed phrase in Vault. For testing purposes, you can generate your own seed phrase and fund it using testnets faucet. Here’s the method to save it to Vault:
vault-cli set -p token-minter/wallets minterYou need an owner wallet to mint a token. This wallet is authorized to mint the token and serves as proof of its creator. Follow the steps below to create an owner wallet and store it in the Vault:
npm run generate-ownerThis repository allows minting of any token. You can configure what
token to mint by modifying the config/default.yml file. Update the
details in this file to change the token you want to mint.
The token-metadata-creator tool is responsible for asset/token
metadata creation and validation. To use it, you can download the
pre-built binaries from the
releases
section. Choose the appropriate binary for your platform and follow the
installation instructions for your operating system.
Extract the
downloaded archive and place the binary file in a directory specified by
the PATH environment variable. For example, you can place it in
$HOME/.local/bin/ or any other directory included in the PATH.
To generate metadata for your assets (tokens), make sure you have
token-metadata-creator installed, and then follow these steps:
npm run generate-metadata