MINTNFT

Mints a new non-fungible UTXO. This effectively moves a non-fungible asset from a transparent EOSIO/Antelope account into a private ZEOS wallet. For this operation only part B of the ZEOS Action Circuit is used since only one new UTXO is created by this action.
Since EOSIO/Antelope does not specify a standard for non-fungible tokens the token standard of AtomicAssets is applied.
Privacy Implications
This action provides only limited privacy protection:
- sender: traceable - the sender's EOSIO/Antelope account
- asset: traceable - asset id of the asset's smart contract's transfer¹ action
- memo: untraceable - hidden in UTXO ciphertext
- receiver: untraceable - hidden in UTXO ciphertext
¹ refers to the transfer action of the AtomicAssets smart contract
Flow
The following steps specify the flow of MINTNFT.
Step 0
The non-fungible EOSIO/Antelope asset to be transferred is defined by the tuple:
- : The id of asset as specified in the AtomicAssets developer documentation
- : The EOSIO/Antelope account of the AtomicAssets smart contract that issues asset
Step 1
Create a new UTXO tuple representing the non-fungible asset :
- Diversifier index of the receiving ZEOS wallet address
- Public key of the receiving ZEOS wallet address
- Choose a random value
- Choose a random value
- Choose a random value
Step 2
Calculate the diversified transmission key of the receiving ZEOS wallet address (see section 5.4.1.6 of the Zcash Protocol Specification):
Step 3
Calculate the of (see UTXO Commitment):
Step 4
Set the private inputs of the arithmetic circuit:
Step 5
Set the public inputs of the arithmetic circuit:
Step 6
Generate a proof of knowledge of satisfying arguments so that
The pair is the zk-SNARK which attests to knowledge of private inputs without revealing them.
Step 7
Generate UTXO ciphertext of for the receiver of the UTXO (see section 4.19.1 of the Zcash Protocol Specification)
Step 8
Transfer asset to the ZEOS smart contract. On reception, the ZEOS smart contract stores it in an asset buffer until MINTNFT is executed.
Step 9
Execute the MINTNFT action of the ZEOS smart contract. This action takes the following arguments:
- : The zero knowledge proof of satisfying arguments
- : The public inputs of the zero knowledge proof
- : The UTXO ciphertext which is transmitted to the receiver of
The ZEOS smart contract then performs the following checks:
- Is the zero knowledge proof valid?
- Does the UTXO represent the correct asset which is held in the asset buffer? I.e. are the following statements true:
- ¹
- Is the NFT flag set ()?
¹NFTs of smart contracts following the AtomicAssets standard have a 64 Bit unique identifier only, thus no upper 64 Bits.
Step 10
If , the ZEOS smart contract performs the following operations:
- Add , the note commitment of , to the next free leaf of the Commitment Tree
- Add the new root of the Commitment Tree to the Commitment Tree Root Set
- Add ciphertext to the Transmitted UTXO Ciphertext List
If , cancel execution.