# Collection Interpreter

The `interpretCollection` function generates a thorough, human-readable explanation of any collection — permissions, approvals, claims, invariants, metadata, and risks. It works with the full `BitBadgesCollection` object including metadata and claims.

## Usage

```typescript
import { interpretCollection } from 'bitbadges';
import { BitBadgesApi } from 'bitbadges';

// After fetching a collection
const collection = await BitBadgesApi.getCollections({
  collectionsToFetch: [{ collectionId: '1' }]
});
const explanation = interpretCollection(collection.collections[0]);
console.log(explanation);
```

## What's Included in the Output

* **Collection overview** — name, type, token range, standards
* **How tokens are created/obtained** — every mint approval explained
* **Transferability rules** — every transfer approval explained
* **Default balances** and auto-approve settings
* **What the manager can and cannot change** — every permission's state
* **On-chain invariants and guarantees**
* **Claims** — plugin types, flow, rewards (no secrets)
* **IBC/cross-chain details**

## Privacy

The function automatically strips sensitive claim parameters (`seedCode`, `preimages`, private params) from the output. Safe to display to any user.

## Also Available Via

* **Builder**: The `explain_collection` tool uses this under the hood
* **Frontend**: Displayed on collection overview pages


---

# 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.bitbadges.io/for-developers/bitbadges-sdk/common-snippets/interpret-collection.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.
