Skip to content

MultisigConfig.getAddress

Derives the stable native multisig account address.

keccak256("tempo:multisig:account" || config_id)[12:32].

Imports

Named
import { MultisigConfig } from 'ox/tempo'

Examples

import { MultisigConfig } from 'ox/tempo'
 
const genesisConfig = MultisigConfig.from({
  threshold: 1,
  owners: [
    { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
  ],
})
 
const address = MultisigConfig.getAddress(genesisConfig)

From an genesis config ID

If you already have the permanent genesisConfigId, pass it directly:

import { MultisigConfig } from 'ox/tempo'
 
const genesisConfigId =
  `0x${'00'.repeat(32)}` as const
 
const address = MultisigConfig.getAddress({ genesisConfigId })

Definition

function getAddress(
  value: getAddress.Value,
): Address.Address

Source: src/tempo/MultisigConfig.ts

Parameters

value

  • Type: getAddress.Value

The genesis config (positional) or { genesisConfigId }.

value.genesisConfigId

  • Type: 0x${string}

The permanent genesis config ID (MultisigConfig.toId(genesisConfig)). Config updates never change this value, so it identifies the account permanently.

value.owners

  • Type: readonly Owner[]

Weighted owner list (strictly ascending by owner address).

value.salt

  • Type: 0x${string}
  • Optional

Caller-chosen 32-byte salt mixed into the permanent config ID. Defaults to the zero salt (MultisigConfig.zeroSalt) when omitted.

value.threshold

  • Type: numberType

Minimum total owner weight required to authorize a transaction.

Return Type

The multisig account address.

Address.Address