# Ens.toCoinType

Converts a chain ID to an ENSIP-9 compliant coin type.

## Imports

:::code-group
```ts [Named]
import { Ens } from 'ox'
```

```ts [Entrypoint]
import * as Ens from 'ox/Ens'
```
:::

## Examples

```ts twoslash
import { Ens } from 'ox'

Ens.toCoinType(10n)
// @log: 2147483658n
```

## Definition

```ts
function toCoinType(
  chainId: bigint,
): bigint
```

**Source:** [src/core/Ens.ts](https://github.com/wevm/ox/blob/main/src/core/Ens.ts#L142)

## Parameters

### chainId

* **Type:** `bigint`

Chain ID to convert.

## Return Type

ENS coin type.

`bigint`
