# Proto reference

Every protobuf message, field, enum and RPC the chain defines, read straight from `proto/` in the chain repo. Use it when you need the exact wire type, field number, or the comment that ships with the definition.

These pages are generated by `site/scripts/gen-proto-reference.ts`. Do not edit them by hand. Run `bun run gen:proto` from `site/` after the chain schema changes.

| Module | Files | Messages | Services |
| --- | --- | --- | --- |
| [x/wasm](https://docs.bitbadges.io/chain/proto/cosmwasm) | 2 | 4 | 0 |
| [x/gamm](https://docs.bitbadges.io/chain/proto/gamm) | 10 | 70 | 5 |
| [x/ibchooks](https://docs.bitbadges.io/chain/proto/ibchooks) | 1 | 1 | 0 |
| [x/ibc-rate-limit](https://docs.bitbadges.io/chain/proto/ibcratelimit) | 4 | 14 | 1 |
| [x/managersplitter](https://docs.bitbadges.io/chain/proto/managersplitter) | 6 | 23 | 2 |
| [x/poolmanager](https://docs.bitbadges.io/chain/proto/poolmanager) | 8 | 77 | 3 |
| [x/sendmanager](https://docs.bitbadges.io/chain/proto/sendmanager) | 5 | 11 | 2 |
| [x/tokenization](https://docs.bitbadges.io/chain/proto/tokenization) | 23 | 196 | 2 |

## Start here

Most readers want `x/tokenization`. These five files carry it.

| File | Messages | Services | What it defines |
| --- | --- | --- | --- |
| [tokenization/tx.proto](https://docs.bitbadges.io/chain/proto/tokenization/tx) | 62 | 1 | Every message you can broadcast — create, update, transfer, set approvals. |
| [tokenization/query.proto](https://docs.bitbadges.io/chain/proto/tokenization/query) | 32 | 1 | Every gRPC query and its REST binding. |
| [tokenization/collections.proto](https://docs.bitbadges.io/chain/proto/tokenization/collections) | 11 | 0 | The collection itself: timelines, manager, balance type, standards. |
| [tokenization/approvals.proto](https://docs.bitbadges.io/chain/proto/tokenization/approvals) | 4 | 0 | Collection-level and user-level approvals — the transferability rules. |
| [tokenization/balances.proto](https://docs.bitbadges.io/chain/proto/tokenization/balances) | 3 | 0 | Balances, token ids and ownership times. |

## Read the prose first

For `x/tokenization`, [/token-standard/messages](https://docs.bitbadges.io/token-standard/messages) and [/token-standard/queries](https://docs.bitbadges.io/token-standard/queries) are the documented surface. Each page there explains what a message does, when to send it, and shows a working example. This tree is the raw schema behind those pages: field numbers, wire types, and the source comments.

| You want | Go to |
| --- | --- |
| What a message does and how to send it | [Token Standard messages](https://docs.bitbadges.io/token-standard/messages) |
| What a query returns and its REST path | [Token Standard queries](https://docs.bitbadges.io/token-standard/queries) |
| The exact field number, type or comment | The module pages above |
| The module in Go | [Chain modules](https://docs.bitbadges.io/chain/modules) |

## What is not here

The chain source keeps a frozen copy of the `x/tokenization` types for each past consensus version, in `proto/tokenization/v27` through `proto/tokenization/v32`. Those exist only so old blocks stay decodable. This reference documents the current unversioned set. Read the historical copies in [the chain repo](https://github.com/BitBadges/bitbadgeschain/tree/master/proto/tokenization) when you decode pre-upgrade state.

The source also keeps the legacy `badges` package (`proto/badges/params.proto` and `proto/badges/tx.proto`). It predates `x/tokenization` and is not part of the live surface, so it is not documented here.
