# predictResolverAddress

predict resolver address for resolution and resolver lifecycle.

## Import

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

## Usage

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

const result = await sdk.resolution.predictResolverAddress({
  salt: 1n,
});
```

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

## Parameters

```ts
import type { CreateResolverParameters } from "@ensforge/sdk/resolution";
```

### salt

`bigint`

Value used for `salt` by this method.

### admin

`string | undefined`

Value used for `admin` by this method.

### roles

`bigint | undefined`

Role bitmask to inspect, grant, or revoke.

### setters

`ReadonlyArray<Hex> | undefined`

Value used for `setters` by this method.

### walletClient

`WalletClient | undefined`

Viem wallet client override for this operation. Defaults to the wallet resolved from the config.

### account

`Account | Address | undefined`

Account used to authorize this operation. Defaults to the account exposed by the resolved wallet client.

### confirmation

`ConfirmationPolicy | undefined`

Controls whether the action returns after submission or waits for one or more confirmations.

## Return Type

```ts
type PredictResolverAddressResult = Awaited<ReturnType<typeof predictResolverAddress>>;
```

| Property            | Type                                                                                                                                                                                                                                                                                                                                 | Description                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| `charAt`            | `(pos: number) => string`                                                                                                                                                                                                                                                                                                            | The charAt value returned by the operation.            |
| `charCodeAt`        | `(index: number) => number`                                                                                                                                                                                                                                                                                                          | The charCodeAt value returned by the operation.        |
| `localeCompare`     | `{ (that: string): number; (that: string, locales?: string \| string[], options?: Intl.CollatorOptions): number; (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; }`                                                                                                                          | The localeCompare value returned by the operation.     |
| `match`             | `{ (regexp: string \| RegExp): RegExpMatchArray \| null; (matcher: { [Symbol.match](string: string): RegExpMatchArray \| null; }): RegExpMatchArray \| null; }`                                                                                                                                                                      | The match value returned by the operation.             |
| `replace`           | `{ (searchValue: string \| RegExp, replaceValue: string): string; (searchValue: string \| RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: s...` | The replace value returned by the operation.           |
| `search`            | `{ (regexp: string \| RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }`                                                                                                                                                                                                                          | The search value returned by the operation.            |
| `split`             | `{ (separator: string \| RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; }`                                                                                                                                                                  | The split value returned by the operation.             |
| `substring`         | `(start: number, end?: number) => string`                                                                                                                                                                                                                                                                                            | The substring value returned by the operation.         |
| `toLowerCase`       | `() => string`                                                                                                                                                                                                                                                                                                                       | The toLowerCase value returned by the operation.       |
| `toLocaleLowerCase` | `{ (locales?: string \| string[]): string; (locales?: Intl.LocalesArgument): string; }`                                                                                                                                                                                                                                              | The toLocaleLowerCase value returned by the operation. |
| `toUpperCase`       | `() => string`                                                                                                                                                                                                                                                                                                                       | The toUpperCase value returned by the operation.       |
| `toLocaleUpperCase` | `{ (locales?: string \| string[]): string; (locales?: Intl.LocalesArgument): string; }`                                                                                                                                                                                                                                              | The toLocaleUpperCase value returned by the operation. |
| `trim`              | `() => string`                                                                                                                                                                                                                                                                                                                       | The trim value returned by the operation.              |
| `substr`            | `(from: number, length?: number) => string`                                                                                                                                                                                                                                                                                          | The substr value returned by the operation.            |
| `valueOf`           | `() => string`                                                                                                                                                                                                                                                                                                                       | Native value conversion.                               |
| `codePointAt`       | `(pos: number) => number \| undefined`                                                                                                                                                                                                                                                                                               | The codePointAt value returned by the operation.       |
| `endsWith`          | `(searchString: string, endPosition?: number) => boolean`                                                                                                                                                                                                                                                                            | The endsWith value returned by the operation.          |
| `normalize`         | `{ (form: "NFC" \| "NFD" \| "NFKC" \| "NFKD"): string; (form?: string): string; }`                                                                                                                                                                                                                                                   | The normalize value returned by the operation.         |
| `repeat`            | `(count: number) => string`                                                                                                                                                                                                                                                                                                          | The repeat value returned by the operation.            |
| `startsWith`        | `(searchString: string, position?: number) => boolean`                                                                                                                                                                                                                                                                               | The startsWith value returned by the operation.        |
| `anchor`            | `(name: string) => string`                                                                                                                                                                                                                                                                                                           | The anchor value returned by the operation.            |
| `big`               | `() => string`                                                                                                                                                                                                                                                                                                                       | The big value returned by the operation.               |
| `blink`             | `() => string`                                                                                                                                                                                                                                                                                                                       | The blink value returned by the operation.             |
| `bold`              | `() => string`                                                                                                                                                                                                                                                                                                                       | The bold value returned by the operation.              |

## 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.resolution.predictResolverAddress.effect(parameters);

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

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

## Error

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

* [`predictResolverAddress`](/core/api/actions/resolution/predict-resolver-address)
