# Modules

## Module 1: Collection Configuration - Traits and Rules <a href="#step-1-traits-and-rules" id="step-1-traits-and-rules"></a>

### **1.1. Traits.json** <a href="#id-1.1.-traits.json" id="id-1.1.-traits.json"></a>

`Traits.json` is the json file that lists all traits your collection will feature, organized by type and name. Each trait includes details on its rarity and a reference to its specific inscription ID. The sum of the rarity frequencies for each trait type should equal 100 to ensure a balanced distribution.

**Example:**

```json
[
  {
    "traitType": "Background",
    "traits": {
      "Amethyst": [10, "/content/..."],
      "Amber": [10, "/content/..."],
      ...
    }
  },
  ...
]
```

### **1.2. Rules.json** <a href="#id-1.2.-rules.json" id="id-1.2.-rules.json"></a>

`Rules.json` defines the rules for trait combinations, preventing undesirable overlaps and ensuring that generated Ordinals adhere to your collection's aesthetic and logical standards.

**Example:**

```json
{
  "3d Specs": ["Bugged Out", "Coins eyes"],
  "CYCLPS": ["Bugged Out", "Coins eyes"],
  ...
}
```

### **1.3. Preview Image** <a href="#id-1.3.-preview-image" id="id-1.3.-preview-image"></a>

Inscribe a preview image to serve as the initial visual for your collection. This image will later be the parent of the `Hashtable.json`, facilitating the on-chain reveal.

## Module 2: Ordinal Art Renderer <a href="#step-2-ordinal-art-renderer" id="step-2-ordinal-art-renderer"></a>

The Ordinal Art Renderer compiles and combines all components, rendering the final image. It utilizes various dependencies, including `OrdGenerator` for trait combination and `RawPhFMap` for mapping inscription IDs using a Perfect Hash Function.

## Module 3: Hashtable.json <a href="#step-3-hashtable.json" id="step-3-hashtable.json"></a>

After minting, collect all inscription IDs for your collection to create `Hashtable.json`. This file maps each inscription ID to a unique index, ensuring each Ordinal has a unique trait combination.

**Example for a 51-supply collection:**

```json
{
  "values_len": 51,
  "free": [11, 24],
  "pilots_table": [0, 0, 160, ...]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://luminex.gitbook.io/luminex/brc69+/modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
