# CSPR.name resolution

The `CSPRNameResolution` entity holds information about mapping between account hashes and CSPR.name names.

### Properties

The `CSPRNameResolution` entity has the following properties:

| Property        | Type         | Description                                                                                                  |
| --------------- | ------------ | ------------------------------------------------------------------------------------------------------------ |
| `name_token_id` | `string`     | ID of the name token (NFT)                                                                                   |
| `name`          | `string`     | Name (e.g. `cloud.cspr`)                                                                                     |
| `resolved_hash` | `string(64)` | Account hash represented as a hexadecimal string                                                             |
| `is_primary`    | `boolean`    | Flag that indicates if CSPR.name is primary for a specific account (only single primary name of an account). |
| `expires_at`    | `string`     | Resolution expiration timestamp in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format             |

**Example**

```json
{
  "name_token_id": "0000000000000000000000000000000000000000000000000000000000000000",
  "name": "faucet.cspr",
  "resolved_hash": "b383c7cc23d18bc1b42406a1b2d29fc8dba86425197b6f553d7fd61375b5e446",
  "is_primary": true,
  "expires_at": "2124-08-27 12:00:00.00"
}
```

## Optional properties

Depending on the endpoint, the following optional properties may be included in the `CSPRNameResolution` entity:

| Property                   | Type                                                                                        | Description                                              |
| -------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `resolved_public_key`      | `string(68)`                                                                                | Public key of the resolved account                       |
| `account`                  | [`Account`](https://docs.cspr.cloud/1.5.x/rest-api/account)                                 | `Account` of the resolved account hash                   |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/1.5.x/rest-api/account-info)                        | Account info of the resolved account                     |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/1.5.x/rest-api/centralized-account-info) | Centralized Account info of the resolved account         |
| `name_token`               | [`NFTToken`](https://docs.cspr.cloud/1.5.x/rest-api/non-fungible-token)                     | NFT token that represents the ownership of the CSPR.name |

### Relations

The `CSPRNameResolution` entity has the following relations with other entities:

| Entity                                                             | Mapping property | Description                                                  |
| ------------------------------------------------------------------ | ---------------- | ------------------------------------------------------------ |
| [`Account`](https://docs.cspr.cloud/1.5.x/rest-api/account-info)   | `resolved_hash`  | Names are resolved to accounts                               |
| [`NFT`](https://docs.cspr.cloud/1.5.x/rest-api/non-fungible-token) | `name_token_id`  | Name ownership is granted by the corresponding CSPR.name NFT |

### Endpoints

The `CSPRNameResolution` entity has the following endpoints:

* [Get CSPR.name resolution](https://docs.cspr.cloud/1.5.x/rest-api/cspr-name-resolution/get-cspr-name-resolution)
