Skip to content

AccountConfig.getSignPayload

Computes the digest a configurable account owner approves (signs).

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

The digest is keyed on the permanent account and the supplied config version. Initial approvals use version 0n; each config update increments it.

Imports

Named
import { AccountConfig } from 'ox/tempo'

Examples

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

Definition

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

Source: src/tempo/AccountConfig.ts

Parameters

value

  • Type: getSignPayload.Value

The digest derivation parameters.

value.account

  • Type: abitype_Address

The configurable account address.

value.config

  • Type: Pick

Configuration whose version applies to the approval.

value.payload

  • Type: 0x${string} | Uint8Array

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

Return Type

The owner approval digest.

Hex.Hex