Mint Validator

Detailed guide on mint validators including overview, use cases, token standards, and example Anvil API interactions for token minting and burning.

Mint Validator

Overview

Mint validators (also called minting policies) control the creation and destruction of native tokens on Cardano. They define the rules under which tokens can be minted (created) or burned (destroyed), acting as a programmatic authority over asset supply management.

Real-world Use Cases

  • NFT Collections: Regulate minting of unique, non-fungible assets with provable scarcity

  • Fungible Tokens: Create tokens with controlled supply mechanisms

  • Token Burning: Implement redemption or destruction policies

  • Evolving NFTs: Enable assets that can change state or properties over time

  • Multi-stage Releases: Control phased distribution of limited assets

Required Fields for Token Minting

For mint validators, you need two key components in your transaction:

  1. mint: An array defining what tokens to mint or burn

  2. scriptInteractions: Specifies the validator hash, purpose, and redeemer

The policy ID in the mint array must match the validator hash in the scriptInteractions:

{
  "mint": [{ 
    "type": "plutus",
    "policyId": "policy_id_here",
    "assetName": "TOKEN_NAME",
    "quantity": 1,
    "metadata": { ... } // Optional token metadata
  }],
  "scriptInteractions": [{
    "hash": "policy_id_here", // Must match policyId above
    "purpose": "mint",
    "redeemer": { ... }
  }]
}

Note: For native scripts (non-Plutus policies), use type: "simple" in the mint array and omit the scriptInteractions entry.

Mint Validator API Interaction Example

Use the below examples to build transactions that interact with mint validators.

If you are unfamiliar with the Anvil API transaction builder, review the Transaction Overview guide first.

1. Minting NFTs (CIP-25 Standard)

2. Minting Fungible Tokens (CIP-68 Standard)

See Examples

Mint with Smart Contract

Last updated

Was this helpful?