> For the complete documentation index, see [llms.txt](https://docs.catalog.cat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catalog.cat/technical-manual/catalog/the-register-action.md).

# The Register Action

The whole point of CATalog

*Note*: The register action code can be found [here](https://github.com/Yakuhito/slot-machine/blob/master/rue-puzzles/actions/catalog/register.rue) ([Chialisp](https://github.com/Yakuhito/slot-machine/blob/master/puzzles/actions/catalog/register.clsp)). The SDK driver is [`CatalogRegisterAction`](https://github.com/xch-dev/chia-wallet-sdk/blob/main/crates/chia-sdk-driver/src/layers/action_layer/actions/catalog/register.rs).

The register action, as the name suggests, registers a new CATalog entry. This requires a precommitment coin that contains the TAIL hash, the initial NFT owner puzzle hash, as well as refund-related information (CAT maker and CAT maker solution) to be created before.

When the action is run, it:

* Asserts sorted order: `left_tail_hash < tail_hash < right_tail_hash`
* Spends the left and right neighbor slots to assert that they exist and creates three new slots so the new structure is: left neighbor <-> new slot <-> right neighbor
* Creates a uniqueness prelauncher for the CAT NFT, whose puzzle contains the TAIL hash. The prelauncher puzzle hash and parent can be used in the future to assert that a given NFT represents a particular CAT asset id (TAIL hash/CATalog entry).
* Mints the eve NFT via `secure_nft(NFT_PACK, initial_nft_owner_ph, launcher_id)` with royalty parameters from registry constants
* Consumes the precommitment coin via `SendMessage` with message `0x01` (register/payout mode)
* Asserts the CAT NFT was correctly created (i.e., it was created to the specified owner)

The action also creates a puzzle announcement. This announcement can be asserted to ensure the dApp singleton is running the right action with the right parameters. For the register action, the announcement prefix, `'r'`, is concatenated to `(sha256tree (tail_hash . initial_nft_owner_ph))`. Prefix helpers are in [`CatalogRegistryCreatedAnnouncementPrefix`](https://github.com/xch-dev/chia-wallet-sdk/blob/main/crates/chia-sdk-driver/src/primitives/action_layer/catalog_registry_prefix.rs).

The CLI exposes registration via `catalog register` (see [CLI Reference](/technical-manual/cli.md)).

*Written by* [*yakuhito*](https://x.com/yakuhito) *from* [*FireAcademy.io*](https://fireacademy.io/) *on Feb 14th, 2025.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.catalog.cat/technical-manual/catalog/the-register-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
