<!DOCTYPE HTML>
<html lang="en" class="light" dir="ltr">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Mint - Metaboss</title>
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body class="sidebar-visible no-js">
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('light')
html.classList.add(theme);
var body = document.querySelector('body');
body.classList.remove('no-js')
body.classList.add('js');
</script>
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var body = document.querySelector('body');
var sidebar = null;
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
sidebar_toggle.checked = sidebar === 'visible';
body.classList.remove('sidebar-visible');
body.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="overview.html"><strong aria-hidden="true">1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="quick_start.html"><strong aria-hidden="true">2.</strong> Quick Start</a></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li class="chapter-item expanded "><a href="examples.html"><strong aria-hidden="true">4.</strong> Examples</a></li><li class="chapter-item expanded "><a href="recipes.html"><strong aria-hidden="true">5.</strong> Recipes</a></li><li class="chapter-item expanded "><a href="global_options.html"><strong aria-hidden="true">6.</strong> Global Options</a></li><li class="chapter-item expanded "><a href="airdrop.html"><strong aria-hidden="true">7.</strong> Airdrop</a></li><li class="chapter-item expanded "><a href="burn.html"><strong aria-hidden="true">8.</strong> Burn</a></li><li class="chapter-item expanded "><a href="check.html"><strong aria-hidden="true">9.</strong> Check</a></li><li class="chapter-item expanded "><a href="collections.html"><strong aria-hidden="true">10.</strong> Collections</a></li><li class="chapter-item expanded "><a href="create.html"><strong aria-hidden="true">11.</strong> Create</a></li><li class="chapter-item expanded "><a href="decode.html"><strong aria-hidden="true">12.</strong> Decode</a></li><li class="chapter-item expanded "><a href="derive.html"><strong aria-hidden="true">13.</strong> Derive</a></li><li class="chapter-item expanded "><a href="find.html"><strong aria-hidden="true">14.</strong> Find</a></li><li class="chapter-item expanded "><a href="mint.html" class="active"><strong aria-hidden="true">15.</strong> Mint</a></li><li class="chapter-item expanded "><a href="set.html"><strong aria-hidden="true">16.</strong> Set</a></li><li class="chapter-item expanded "><a href="sign.html"><strong aria-hidden="true">17.</strong> Sign</a></li><li class="chapter-item expanded "><a href="snapshot.html"><strong aria-hidden="true">18.</strong> Snapshot</a></li><li class="chapter-item expanded "><a href="transfer.html"><strong aria-hidden="true">19.</strong> Transfer</a></li><li class="chapter-item expanded "><a href="update.html"><strong aria-hidden="true">20.</strong> Update</a></li><li class="chapter-item expanded "><a href="verify_unverify.html"><strong aria-hidden="true">21.</strong> Verify/Unverify</a></li><li class="chapter-item expanded "><a href="withdraw.html"><strong aria-hidden="true">22.</strong> Withdraw</a></li><li class="chapter-item expanded "><a href="priority_fees.html"><strong aria-hidden="true">23.</strong> Priority Fees</a></li><li class="chapter-item expanded "><a href="contact.html"><strong aria-hidden="true">24.</strong> Contact</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
</div>
</nav>
<!-- Track and set sidebar scroll position -->
<script>
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
sidebarScrollbox.addEventListener('click', function(e) {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
}
}, { passive: true });
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
// preserve sidebar scroll position when navigating via links within sidebar
sidebarScrollbox.scrollTop = sidebarScrollTop;
} else {
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
var activeSection = document.querySelector('#sidebar .active');
if (activeSection) {
activeSection.scrollIntoView({ block: 'center' });
}
}
</script>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</label>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">Metaboss</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h2 id="mint"><a class="header" href="#mint">Mint</a></h2>
<p>Mint new NFTs from JSON files.</p>
<p>For both subcommands the <code>--immutable</code> flag sets the NFT data to be immutable and the <code>--primary-sale-happened</code> flag sets the primary sale happened bool to true.</p>
<h3 id="mint-one"><a class="header" href="#mint-one">Mint One</a></h3>
<p>Mint a single NFT from a JSON file.</p>
<h4 id="usage"><a class="header" href="#usage">Usage</a></h4>
<pre><code class="language-bash">metaboss mint one --keypair <KEYPAIR> --nft-data-file <PATH_TO_NFT_DATA_FILE> --receiver <RECEIVER_ADDRESS>
</code></pre>
<pre><code class="language-bash">metaboss mint one --keypair <KEYPAIR> --external-metadata-uri <EXTERNAL_METADATA_URI> --receiver <RECEIVER_ADDRESS> --immutable --primary-sale-happened
</code></pre>
<p>The JSON files should contain all the necessary data required to create an NFT's metadata fields. Creator <code>verified</code> fields must be false unless the creator is also the <code>keypair</code>.</p>
<p>Example JSON file:</p>
<pre><code class="language-json">{
"name": "TestNFT1",
"symbol": "TNFT",
"uri": "https://arweave.net/FPGAv1XnyZidnqquOdEbSY6_ES735ckcDTdaAtI7GFw",
"seller_fee_basis_points": 100,
"creators": [
{
"address": "PanbgtcTiZ2PveV96t2FHSffiLHXXjMuhvoabUUKKm8",
"verified": false,
"share": 100
}
]
}
</code></pre>
<p>The --external-metadata-uri option takes a URI to an external metadata file such as an Arweave link pointing to a JSON file.</p>
<p>If <code>receiver</code> is set, the NFT will be minted directly to the receiver's address, otherwise it is minted to <code>keypair</code>. Observant users may note that with a simple bash script this allows airdrops to be deployed with Metaboss.</p>
<p>Use the <code>--sign</code> option to sign the metadata with the keypair immediately after minting.</p>
<h4 id="vanity-mints"><a class="header" href="#vanity-mints">Vanity Mints</a></h4>
<p>You can specify a vanity mint address by using the <code>--mint-path</code> option to specify a path to a keypair on your file system.
It will use this for the mint account instead of creating a new one.</p>
<h4 id="editions"><a class="header" href="#editions">Editions</a></h4>
<p>To mint a NFT with the ability to print editions from it use the <code>--max-editions <max-editions></code> option. This defaults to <code>0</code> meaning no editions are allowed. Setting it to a positive integer means you can print up to that many editions. Setting to a value of <code>-1</code> means unlimited editions. Because of how the CLI interprets the <code>-</code> symbol to set max editions to infinite you should use the <code>=</code> sign for the <code>--max-editions</code> option: <code>metaboss mint one -a <master_account> --max-editions='-1'</code>.</p>
<p>To mint editions from a master NFT use the<code>metaboss mint editions</code> command to either mint the next <code>n</code> editions sequentially using <code>--next-editions <int></code> or mint specific edition numbers using <code>--specific-editions <int> <int> <int></code> with a list of integer edition numbers to mint.</p>
<p>To find any edition numbers in the sequence that have not been minted use <code>metaboss find missing-editions</code>.</p>
<p>To find and mint any missing editions and mint them to the authority keypair use <code>metaboss mint missing-editions</code>.</p>
<p>To find the full list of options for each command use <code>-h</code> or <code>--help</code> as normal.</p>
<h3 id="mint-list"><a class="header" href="#mint-list">Mint List</a></h3>
<p>Mint multiple NFTs from a list of JSON files.</p>
<h4 id="usage-1"><a class="header" href="#usage-1">Usage</a></h4>
<pre><code class="language-bash">metaboss mint list --keypair <KEYPAIR> --nft-data-dir <PATH_TO_NFT_DATA_FILE> --receiver <RECEIVER_ADDRESS>
</code></pre>
<p>This command functions the same as <code>mint one</code> except instead of a single JSON file, provide a path to a directory with multiple JSON files, one for each NFT to be minted.</p>
<pre><code class="language-bash">metaboss mint list --keypair <KEYPAIR> --external-metadata-uris <PATH_TO_JSON_FILE> --receiver <RECEIVER_ADDRESS> --immutable --primary-sale-happened
</code></pre>
<p>To mint from URIs provide the path to a JSON file containing a list of URIs.</p>
<p>By default, new NFTs are minted as mutable, to make them immutable use the <code>--immutable</code> option.</p>
<p>Use the <code>--sign</code> option to sign the metadata with the keypair immediately after minting.</p>
<h3 id="mint-asset"><a class="header" href="#mint-asset">Mint Asset</a></h3>
<p>Mint various types of Metaplex assets, including pNFTs.</p>
<pre><code>USAGE:
metaboss mint asset [OPTIONS] --asset-data <asset-data>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--amount <amount>
Amount of tokens to mint, for NonFungible types this must be 1 [default: 1]
-d, --asset-data <asset-data> Asset data
--decimals <decimals> Mint decimals for fungible tokens [default: 0]
-k, --keypair <keypair> Path to the update_authority keypair file
-l, --log-level <log-level> Log level [default: off]
-s, --max-print-edition-supply <max-print-edition-supply>
Max supply of print editions. Only applies to NonFungible types. 0 for no prints, n for n prints,
'unlimited' for unlimited prints
-m, --mint-path <mint-path>
Path to mint keypair file, if minting from existing keypair
-R, --receiver <receiver> Receiving address, if different from update authority
-r, --rpc <rpc>
RPC endpoint url to override using the Solana config or the hard-coded default
-T, --timeout <timeout>
Timeout to override default value of 90 seconds [default: 90]
</code></pre>
<h4 id="usage-2"><a class="header" href="#usage-2">Usage</a></h4>
<p>You need an asset json file of this format:</p>
<pre><code class="language-json"> {
"name": "Studious Crab #1",
"symbol": "CRAB",
"uri": "https://arweave.net/uVtABL4PYv0wVke3LL4DLMkqkSMcQl1qswRZNkJ0a0g",
"seller_fee_basis_points": 100,
"creators": [
{
"address": "ccc9XfyEMh9sU6DRkUmqQGJqgdKb6QyUaaT5h5BGYw4",
"verified": true,
"share": 100
}
],
"primary_sale_happened": false,
"is_mutable": true,
"token_standard": "ProgrammableNonFungible",
"collection": null,
"uses": null,
"collection_details": null,
"rule_set": null
}
</code></pre>
<p>Substitute appropriate values for each field. The creator can only be set as verified if it is the same keypair as the one used to mint the asset, otherwise leave it as <code>false</code>.</p>
<pre><code class="language-bash">metaboss mint asset -d <asset_json_file> -k <keypair> -R <receiver> -s <print_supply>
</code></pre>
<p>E.g.:</p>
<pre><code class="language-bash">metaboss mint asset -d crab.json -k ccc9XfyEMh9sU6DRkUmqQGJqgdKb6QyUaaT5h5BGYw4.json -R PanbgtcTiZ2PveV96t2FHSffiLHXXjMuhvoabUUKKm8 -s 0
</code></pre>
<p>Leave off the <code>--receiver</code> option to mint to your keypair.</p>
<p><strong>Print Supply</strong></p>
<p>All non-fungible type assets: currently <code>NonFungible</code> and <code>ProgrammableNonFungible</code>, require the <code>print-supply</code> option to be specified to set the maximum number of print editions that can be minted from the asset. For most PFP, 1/1, style NFTs, this should be set to <code>0</code> to prevent any editions being minted. Other options are: <code>n</code> for a limited number of <code>n</code> editions (e.g. <code>10</code>), or <code>unlimited</code> to allow unlimited editions to be minted.</p>
<p>Fungible types such as <code>Fungible</code> and <code>FungibleAsset</code> should leave this value off as it has no meaning for them and the <code>mint asset</code> command will fail if that is specified for a fungible type.</p>
<h4 id="vanity-mints-1"><a class="header" href="#vanity-mints-1">Vanity Mints</a></h4>
<p>You can specify a vanity mint address by using the <code>--mint-path</code> option to specify a path to a keypair on your file system.
It will use this for the mint account instead of creating a new one.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="find.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next prefetch" href="set.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="find.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next prefetch" href="set.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>
<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>