# RegistrarController

### **Purpose**:&#x20;

Manages identity registration, renewal, and batch record updates.<br>

### **Key Methods**:

* `makeCommitment()`: Generates a commitment hash to reserve an identity.
* `commit()`: Finalizes the commitment.
* `register()`: Registers the identity after the waiting period.
* `renew()`: Extends the identity’s expiration duration.
* `setRecords()`: Batch updates resolver records (e.g., address, text, contenthash).

### **Events**:

* `NameRegistered(name, node, owner, expires)`
* `NameRenewed(name, node, duration, expires)`

### **Interactions**:

* Works with `PublicResolver` to set/update records.
* Uses `PriceController` to calculate registration/renewal fees.

***

## **Grace Period**

**Purpose**: Enforces grace period rules post-identity expiration.\
**Logic**:

* After expiration, ownership is retained for `GRACE_PERIOD` (e.g., 30 days).
* Post-grace period, identities become available for purchase.

**Interactions**:

* Integrated into `RegistrarController` for renewal checks.


---

# 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://snowball-mns.gitbook.io/snowball/decentralized-identity-layer/technical-documentation/smart-contracts/registrarcontroller.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.
