# AccountConfig.update

Derives the configuration that replaces the current one in an owner update.

Mirrors the `updateConfig` precompile ([TIP-1109](https://tips.sh/1109)): keeps the current salt, increments the version by one, and replaces the owners and threshold. Owners are sorted into canonical order and the next configuration is validated. The account address does not change.

## 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 initialConfig = AccountConfig.from({
  owners: [
    {
      owner: '0x1111111111111111111111111111111111111111',
      weight: 1
    }
  ],
  threshold: 1
})

const config = AccountConfig.update(initialConfig, {
  owners: [
    {
      owner: '0x2222222222222222222222222222222222222222',
      weight: 1
    }
  ],
  threshold: 1
})
// config.version === 1n, with the initial salt
```

## Definition

```ts
function update<numberType>(
  config: Input<bigint | number, numberType>,
  options: update.Options<numberType>,
): Config<bigint, numberType>
```

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

## Parameters

### config

* **Type:** `Input<bigint | number, numberType>`

The current 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`.

### options

* **Type:** `update.Options<numberType>`

The replacement owners and threshold.

#### options.owners

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

Replacement weighted owners. Sorted into canonical order.

#### options.threshold

* **Type:** `numberType`

Replacement minimum total owner weight required for authorization.

## Return Type

The next account config.

`Config<bigint, numberType>`
