# Ledger Registry (LedgerRegistry)

A **mapping system** that tracks all trade ledgers.

Structure Definition

```
public struct LedgerRegistry has key {
    id: UID,                            // Unique identifier for the registry
    ledgers: Table<LedgerKey, ID>       // Mapping from (collection_id, currency_type) → TradeLedger ID
}

```

#### **Ledger Key**

A composite key struct that helps in uniquely identifying **trade ledgers**.

```
public struct LedgerKey has store, copy, drop {
    collection_id: ID,                  // NFT collection ID
    currency_type: TypeName             // Currency used for trading
}

```

#### **Purpose**

* Ensures each **NFT collection has a unique ledger** for its trading activity.
* Provides **quick lookups** for existing ledgers.


---

# 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://docs.artinals.com/artinals-protocol/market-module/data-structures/ledger-registry-ledgerregistry.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.
