OZSignerWeightEntry

public struct OZSignerWeightEntry : Sendable

A single signer-weight pair carried by weightedThreshold(signerWeights:threshold:).

Models a weighted-vote contribution: the wrapped OZSmartAccountSigner contributes weight points toward a weighted-threshold policy when it authorizes. The signer field is an existential OZSmartAccountSigner so callers may mix OZDelegatedSigner (Stellar-account or contract-address signers) and OZExternalSigner (passkey or Ed25519 verifier-contract signers) freely within a single policy.

Insertion order is preserved through validation; the final on-chain inner-map ordering is normalized by sortMapByKeyXdr(_:) at encoding time, so the on-chain shape is deterministic regardless of the order callers supply the entries.

Note

An array of OZSignerWeightEntry is used in place of a Dictionary keyed by signer because Swift protocol existentials do not satisfy the Hashable requirement that dictionary keys impose. The array shape also gives callers explicit, observable insertion order during construction even though the on-chain map is sorted later.
  • The signer that contributes weight points when it authorizes.

    Declaration

    Swift

    public let signer: any OZSmartAccountSigner
  • Vote weight contributed by the signer when it authorizes. Must be greater than zero — a zero-weight signer is indistinguishable from no signer at all and is rejected by the smart-account contract.

    Declaration

    Swift

    public let weight: UInt32
  • Initializes a new OZSignerWeightEntry.

    Declaration

    Swift

    public init(signer: any OZSmartAccountSigner, weight: UInt32)

    Parameters

    signer

    The signer that contributes weight points.

    weight

    Vote weight contributed by the signer.