Skip to content

SignatureEnvelope.sortMultisigApprovals

Sorts primitive owner approvals by recovered address.

Recovery uses the account and current config version's multisig digest. Duplicate or non-owner approvals must still be rejected by the node.

Imports

Named
import { SignatureEnvelope } from 'ox/tempo'

Examples

import { SignatureEnvelope } from 'ox/tempo'
 
const ordered = SignatureEnvelope.sortMultisigApprovals({
  account: '0x2222222222222222222222222222222222222222',
  config: { version: 0n },
  payload: `0x${'ab'.repeat(32)}`,
  signatures: []
})

Definition

function sortMultisigApprovals(
  value: sortMultisigApprovals.Value,
): readonly Primitive[]

Source: src/tempo/SignatureEnvelope.ts

Parameters

value

  • Type: sortMultisigApprovals.Value

Account, version, payload, and primitive approvals.

value.account

  • Type: abitype_Address

The native multisig 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()).

value.signatures

  • Type: readonly Primitive[]

Primitive owner approvals to order.

Return Type

The approvals in ascending recovered-address order.

readonly Primitive[]