Skip to content

AccountConfig.toTuple

Converts a AccountConfig.Config to its RLP tuple form.

Tuple shape: [salt, version, threshold, [[owner, weight], ...]]. The 32-byte salt encodes as a full fixed-width string; other integers use canonical RLP encoding (zero values encode as 0x).

Imports

Named
import { AccountConfig } from 'ox/tempo'

Examples

import { AccountConfig } from 'ox/tempo'
 
const tuple = AccountConfig.toTuple({
  owners: [
    { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
  ],
  threshold: 1,
})

Definition

function toTuple(
  config: Input,
): Tuple

Source: src/tempo/AccountConfig.ts

Parameters

config

  • Type: Input

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 RLP tuple.

Tuple