# AccountConfig.from

Normalizes an [`AccountConfig.Config`](/tempo/reference/AccountConfig/types#config).

Sorts owners into strictly ascending `owner` address order (the canonical form required for account derivation) and asserts the config is valid.

## Imports

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

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

## Examples

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

const config = AccountConfig.from({
  owners: [
    {
      owner: '0x2222222222222222222222222222222222222222',
      weight: 1
    },
    {
      owner: '0x1111111111111111111111111111111111111111',
      weight: 1
    }
  ],
  threshold: 2
})
// owners are now sorted ascending by address
```

## Definition

```ts
function from<numberType>(
  config: Input<0 | 0n, numberType> & {
    version?: 0 | 0n | undefined;
},
): Config
```

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

## Parameters

### config

* **Type:** `Input<0 | 0n, numberType> & {
    version?: 0 | 0n | undefined;
  }`

The account config.

#### config.owners

* **Type:** `readonly Owner[]`

Weighted owner list (strictly ascending by `owner` address).

#### config.salt

* **Type:** `0x${string}`
* **Optional**

Caller-chosen 32-byte salt mixed into the derived account address.
Defaults to the zero salt (`AccountConfig.zeroSalt`) when omitted.

#### config.threshold

* **Type:** `numberType`

Minimum total owner weight required to authorize a transaction.

#### config.version

* **Type:** `versionType`
* **Optional**

Configuration version as a safe integer or bigint. Defaults to `0n`.

## Return Type

The normalized account config.

`Config<0n, numberType>`
