You want to create your own NFT? Here’s how you do it on the Cardano blockchain.

  • You own (or have access to) a full Cardano-node
  • You are at least a little bit familiar with the Cardano-CLI and its concepts
  • You have an ada wallet with at least 2 ada.
cardano-cli address key-gen \
--verification-key-file payment.vkey \
--signing-key-file payment.skey
cardano-cli address build \
--payment-verification-key-file payment.vkey \
--out-file payment.addr \
--mainnet
cat payment.addr
addr1v9hhyvjycngmhrng2xcqa58y9j759we4xxhhqhpx26lgpzqyvflfk
cardano-cli query utxo --address $(cat payment.addr) \
--mainnet --mary-era
TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
 addr1v9hhyvjycngmhrng2xcqa58y9j759we4xxhhqhpx26lgpzqyvflfk
cardano-cli query utxo --address $(cat payment.addr) \
--mainnet --mary-era
TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
7211b05ef3cbe067b36469af2a81a63de5612b6a449cf8db47504ccc82726015 0 5000000 lovelace
cardano-cli  query protocol-parameters \
--mainnet \
--out-file protocol.json
cardano-cli address key-gen \
--verification-key-file policy.vkey \
--signing-key-file policy.skey
touch policy.script && echo "" > policy.script 


echo "{" >> policy.script
echo " \"keyHash\": \"$(cardano-cli address key-hash --payment-verification-key-file policy.vkey)\"," >> policy.script
echo " \"type\": \"sig\"" >> policy.script
echo "}" >> policy.script

cat policy.script
{
"keyHash": "5805823e303fb28231a736a3eb4420261bb42019dc3605dd83cccd04",
"type": "sig"
}
cardano-cli transaction policyid --script-file policy.script> 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374
cardano-cli transaction build-raw \
--mary-era \
--fee 0 \
--tx-in 7211b05ef3cbe067b36469af2a81a63de5612b6a449cf8db47504ccc82726015#0 \
--tx-out $(cat payment.addr)+0+"1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.MountainGorilla + 1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.BrownBear"\
--mint="1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.MountainGorilla + 1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.BrownBear"\
--out-file matx.raw
cardano-cli transaction calculate-min-fee \
--tx-body-file matx.raw \
--tx-in-count 1 \
--tx-out-count 1 \
--witness-count 2 \
--mainnet \
--protocol-params-file protocol.json
195509 Lovelace
cardano-cli transaction build-raw \
--mary-era \
--fee 195509 \
--tx-in b1ddb0347fed2aecc7f00caabaaf2634f8e2d17541f6237bbed78e2092e1c414#0 \
--tx-out $(cat payment.addr)+4804491+"1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.MountainGorilla + 1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.BrownBear"\
--mint="1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.MountainGorilla + 1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.BrownBear"\
--out-file matx.raw
cardano-cli transaction sign \
--signing-key-file payment.skey \
--signing-key-file policy.skey \
--script-file policy.script \
--mainnet \
--tx-body-file matx.raw \
--out-file matx.signed
cardano-cli transaction submit --tx-file  matx.signed --mainnet
cardano-cli query utxo --address $(cat payment.addr) \
--mainnet --mary-era
TxHash TxIx Amount
--------------------------------------------------------------------------------------fd0790f3984348f65ee22f35480b873b4eb9862065514f3e3a9c0f04d0a6ad63 0 4804491 lovelace + 1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.MountainGorilla + 1 677d3bbe3e01eeab498cd8786f7d261d92bd6ecea12109a332e86374.BrownBear

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Silas Stulz

Silas Stulz

Data Engineer, crypto enthusiast