> For the complete documentation index, see [llms.txt](https://8bit-1.gitbook.io/solibrary/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://8bit-1.gitbook.io/solibrary/mint-limit-guard.md).

# Mint Limit Guard

The limit is set per wallet, per candy machine and per identifier — provided in the settings — to allow multiple mint limits within the same Core Candy Machine.

Core Candy Machine

Owner: Core Candy Machine Core Program

Candy Guard

Owner: Candy Guard Program

GuardsMintLimit- Limit- ID...

Mint Counter PDA

PayerOwner: Any Program

Mint from

*Candy Guard Program*

Access Control

Mint from

*Core Candy Machine Program*

Mint Logic

Asset

[React Flow](https://reactflow.dev/)

### Guard Settings <a href="#guard-settings" id="guard-settings"></a>

The Mint Limit guard contains the following settings:

* **ID**: A unique identifier for this guard. Different identifiers will use different counters to track how many items were minted by a given wallet. This is particularly useful when using groups of guards as we may want each of them to have a different mint limit.
* **Limit**: The maximum number of mints allowed per wallet for that identifier.

Set up a Candy Machine using the Mint Limit guard

JavaScript

```
create(umi, {
  // ...
  guards: {
    mintLimit: some({ id: 1, limit: 5 }),
  },
});
```

API References: [create](https://mpl-core-candy-machine.typedoc.metaplex.com/functions/create.html), [MintLimit](https://mpl-core-candy-machine.typedoc.metaplex.com/types/MintLimit.html)

### Mint Settings <a href="#mint-settings" id="mint-settings"></a>

The Mint Limit guard contains the following Mint Settings:

* **ID**: A unique identifier for this guard.

Note that, if you’re planning on constructing instructions without the help of our SDKs, you will need to provide these Mint Settings and more as a combination of instruction arguments and remaining accounts. See the [Core Candy Guard’s program documentation](https://github.com/metaplex-foundation/mpl-core-candy-machine/tree/main/programs/candy-guard#mintlimit) for more details.

Mint with the Mint Limit Guard

JavaScript

You may pass the Mint Settings of the Mint Limit guard using the `mintArgs` argument like so.

```
mintV1(umi, {
  // ...
  mintArgs: {
    mintLimit: some({ id: 1 }),
  },
});
```

### Route Instruction <a href="#route-instruction" id="route-instruction"></a>

*The Mint Limit guard does not support the route instruction.*
