# Channel.computeId

Computes the canonical TIP-20 channel id for a descriptor.

Mirrors `computeChannelId` on the TIP-20 channel reserve precompile without performing an RPC call.

## Imports

:::code-group
```ts [Named]
import { Channel } from 'ox/tempo'
```

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

## Examples

```ts twoslash
import { Channel } from 'ox/tempo'

const channelId = Channel.computeId(
  {
    authorizedSigner:
      '0x0000000000000000000000000000000000000000',
    expiringNonceHash:
      '0x0000000000000000000000000000000000000000000000000000000000000000',
    operator: '0x0000000000000000000000000000000000000000',
    payee: '0x2222222222222222222222222222222222222222',
    payer: '0x1111111111111111111111111111111111111111',
    salt: '0x0000000000000000000000000000000000000000000000000000000000000001',
    token: '0x20c0000000000000000000000000000000000001'
  },
  {
    chainId: 4217
  }
)
```

## Definition

```ts
function computeId(
  channel: computeId.Channel,
  options: computeId.Options,
): Hex.Hex
```

**Source:** [src/tempo/Channel.ts](https://github.com/wevm/ox/blob/main/src/tempo/Channel.ts#L292)

## Parameters

### channel

* **Type:** `computeId.Channel`

Channel descriptor.

### options

* **Type:** `computeId.Options`

Options.

#### options.chainId

* **Type:** `number | bigint`

Chain ID used by the channel reserve precompile.

## Return Type

The channel id.

`Hex.Hex`
