# registration.getCommitmentStatus

> For the complete documentation index, see [llms.txt](https://ensforge.com/llms.txt).

Reads where a registration commitment is in its window. Parameters, return value, errors and examples for registration.getCommitmentStatus in @ensforge/sdk.

Source: https://ensforge.com/docs/reference/sdk/registration/get-commitment-status

<ApiMeta kind="Read" stability="stable" since="1.0.0" source="packages/sdk/src/actions/registration/getCommitmentStatus/index.ts#L52" batchable />

Reads where a registration commitment is in its window.

## When to use [#when-to-use]

Use to show a countdown between `registration.commit` and `registration.register`.

## Details [#details]

- `pending`: too new to register; `ready`: register now; `expired`: commit again.
- `unknown`: never made, or already used by a registration.

## Signature [#signature]

```ts
function getCommitmentStatus(
  client: Like,
  options: getCommitmentStatus.Options,
): Promise<getCommitmentStatus.ReturnType>
```

Call it as `ens.registration.getCommitmentStatus(options)` on a client, or `Actions.registration.getCommitmentStatus(client, options)`.

`registration.getCommitmentStatus.request(options)` builds a deferred read for `Actions.batch`. See [Look up many at once](/docs/sdk/look-up-many-at-once).

## Parameters [#parameters]

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `commitment` (required) | `Hex` |  | Commitment hash returned by `registration.commit`. |

Also takes the [read options](/docs/reference/sdk/client#read-options).

## Returns [#returns]

Resolves to `getCommitmentStatus.ReturnType`. The status and the window's timestamps (`null` when unknown).

| Field | Type | Description |
| --- | --- | --- |
| `status` | `"pending" \| "ready" \| "expired" \| "unknown"` |  |
| `committedAt` | `bigint \| null` |  |
| `readyAt` | `bigint \| null` |  |
| `expiresAt` | `bigint \| null` |  |

## Errors [#errors]

| Error | Codes | When |
| --- | --- | --- |
| [`InvalidInputError`](/docs/reference/errors/invalid-input-error) | [`INVALID_RECORD_VALUE`](/docs/reference/errors/INVALID_RECORD_VALUE) | the commitment is not 32 bytes. |
| [`UnsupportedError`](/docs/reference/errors/unsupported-error) | [`UNSUPPORTED_ON_DEPLOYMENT`](/docs/reference/errors/UNSUPPORTED_ON_DEPLOYMENT) | without ENSv2. |
| [`NetworkError`](/docs/reference/errors/network-error) | [`RPC_REQUEST_FAILED`](/docs/reference/errors/RPC_REQUEST_FAILED), [`RPC_TIMEOUT`](/docs/reference/errors/RPC_TIMEOUT), [`RATE_LIMITED`](/docs/reference/errors/RATE_LIMITED) | the RPC request fails. |

It can also fail with the errors every read can (`Errors.CommonError`: `ConfigError`, `ContractRevertError`, `InternalError`, `NetworkError`).

See [How errors work](/docs/sdk/errors-explained).

## Examples [#examples]

<Tabs groupId="api" items={["Client","Standalone","Effect"]} persist>
<Tab>
```ts title="Waiting for a commitment"
const { status, readyAt } = await ens.registration.getCommitmentStatus({ commitment })
```
</Tab>

<Tab>
```ts title="Reading with a standalone call"
import { Actions } from "@ensforge/sdk"

const status = await Actions.registration.getCommitmentStatus(publicClient, { commitment })
```
</Tab>

<Tab>
```ts title="Reading in an Effect program"
import { Actions } from "@ensforge/sdk/effect"

const status = yield* Actions.registration.getCommitmentStatus(ens, { commitment })
```
</Tab>
</Tabs>

## See also [#see-also]

- [`registration.commit`](/docs/reference/sdk/registration/commit) to make one