# Registry

#### Mint DID

The format for a DID name requires a length between 5 and 54 characters, and only allows the use of lowercase letters a-z and digits 0-9.

```solidity
function mint(address to, uint256 expiredTimestamp, string memory did, bytes memory evidence, string calldata avatar) public;
```

* to: DID address
* expiredTimestamp: the expired time of the evidence
* did: DID name
* evidence: the signature signed by HashKey DID
* avatar: the url of avatar

#### Add authorization address

Authorize a DID to an address so that the address can view your DID information or log in to other systems on your behalf.

```solidity
function addAuth(uint256 tokenId, address addr) public;
```

* tokenId: DID token id
* addr: authorization address

#### Remove authorization address

Remove the address that you had previously authorized.

```solidity
function removeAuth(uint256 tokenId, address addr) public;
```

* tokenId: DID token id
* addr: authorization address


---

# 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.hashkey.id/protocol/contract-api-reference/registry.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.
