# getDecodedName

Recovers a human-readable ENS name from indexed encoded-label evidence.

## Import

```ts
import { Ensforge } from "@ensforge/sdk";
```

## Usage

:::code-group
```ts [index.ts]
import { sdk } from "./client";

const result = await sdk.indexer.getDecodedName({
  name: "example.eth",
  allowIncomplete: true,
});
```

```ts [client.ts]
// [!include ~/snippets/sdk/client.ts]
```
:::

## Parameters

```ts
import type { GetDecodedNameParametersType } from "@ensforge/sdk/indexer";
```

### name

`string`

Name to decode. Normalized labels are preserved and encoded labels are recovered from indexer evidence.

### allowIncomplete

`boolean | undefined`

Returns a partially decoded name when only some labels can be recovered. Defaults to `false`.

## Return Type

```ts
import type { GetDecodedNameResult } from "@ensforge/sdk/indexer";
```

Returns the decoded name, or `null` when the available evidence cannot satisfy the requested completeness.

## Protocol Sources

The action uses indexed name and label evidence from compatible sources and respects the configured strict or partial failure mode.

## Effect

Use `.effect` when composing the method in an Effect program. The success and error channels remain
fully typed.

```ts
import { Effect } from "effect";
import { sdk } from "./client";

const program = sdk.indexer.getDecodedName.effect(parameters);

type Success = Effect.Effect.Success<typeof program>;
type Failure = Effect.Effect.Error<typeof program>;

const result = await Effect.runPromise(program);
```

## Error

```ts
import type { GetDecodedNameError } from "@ensforge/sdk/indexer";
```

The method rejects with the corresponding Core action errors. Use `.effect` to keep those failures
in the typed Effect error channel.

See [Error Handling](/sdk/guides/error-handling).

## Action

* [`getDecodedName`](/core/api/actions/indexer/names/get-decoded-name)

## Hook

* [`useDecodedName`](/react/api/hooks/indexer/names/use-decoded-name)
