Skip to content

MultisigConfig.getSignPayload

Computes the digest a native multisig owner approves (signs).

keccak256("tempo:multisig:signature" || inner_digest || account || uint64be(version)), where inner_digest is the transaction sign payload (TxEnvelopeTempo.getSignPayload).

The digest is keyed on the permanent account derived from the initial (bootstrap) config and the current config version. Bootstrap approvals use version 0n, which is also the default; each config update increments it.

For a nested multisig owner approval, the parent digest becomes the nested approval's payload, with the nested multisig account.

Imports

Named
import { MultisigConfig } from 'ox/tempo'

Examples

import { MultisigConfig, TxEnvelopeTempo } from 'ox/tempo'
 
const initialConfig = MultisigConfig.from({
  threshold: 1,
  owners: [
    { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
  ],
})
 
const envelope = TxEnvelopeTempo.from({
  chainId: 1,
  calls: [],
})
 
const digest = MultisigConfig.getSignPayload({
  payload: TxEnvelopeTempo.getSignPayload(envelope),
  initialConfig,
})

From account

If you already have the permanent account (for example, recovered from a stored envelope), pass it directly:

import { MultisigConfig, TxEnvelopeTempo } from 'ox/tempo'
 
const initialConfig = MultisigConfig.from({
  threshold: 1,
  owners: [
    { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
  ],
})
const account = MultisigConfig.getAddress(initialConfig)
 
const envelope = TxEnvelopeTempo.from({ chainId: 1, calls: [] })
 
const digest = MultisigConfig.getSignPayload({
  payload: TxEnvelopeTempo.getSignPayload(envelope),
  account,
  version: 1n
})

Definition

function getSignPayload(
  value: getSignPayload.Value,
): Hex.Hex

Source: src/tempo/MultisigConfig.ts

Parameters

value

  • Type: getSignPayload.Value

The digest derivation parameters.

value.account

  • Type: abitype_Address

The native multisig account address.

value.initialConfig

  • Type: { salt?: 0x${string}; threshold: number; owners: readonly Owner[]; }

The initial multisig config (the bootstrap config that derived the permanent account). Used to derive the account automatically. Config updates never change account, so the initial config can continue deriving the account for post-update transactions.

value.payload

  • Type: 0x${string} | Uint8Array

The inner transaction sign payload (tx.signature_hash()).

value.version

  • Type: bigint
  • Optional

Current multisig config version. Defaults to 0n.

Return Type

The owner approval digest.

Hex.Hex