Skip to content

AccountOperation.selectApprovals

Validates, deduplicates, and selects owner approvals for an operation.

The function retains one canonical approval per owner. It selects the smallest deterministic quorum by owner weight, then orders the selected approvals by owner address for serialization. The caller supplies the account and config; the chain validates their derived identity.

Imports

Named
import { AccountOperation } from 'ox/tempo'

Examples

import { AccountOperation } from 'ox/tempo'
 
const selection = await AccountOperation.selectApprovals({
  account,
  approvals,
  config,
  hash,
})

Definition

function selectApprovals(
  options: selectApprovals.Options,
): Promise<selectApprovals.ReturnValue>

Source: src/tempo/AccountOperation.ts

Parameters

options

  • Type: selectApprovals.Options

Approval selection parameters.

options.account

  • Type: abitype_Address

Root configurable account.

options.approvals

  • Type: readonly 0x${string}[]

Serialized primitive owner approvals.

options.config

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

Current root account configuration.

options.hash

  • Type: 0x${string}

Deterministic operation hash approved by root owners.

Return Type

The retained approvals and deterministic quorum selection.

Promise<selectApprovals.ReturnValue>