OZSmartAccountAuthPayload
public final class OZSmartAccountAuthPayload
In-memory representation of the AuthPayload used by the OpenZeppelin Smart Account contract.
The signature payload is a Map-based named struct with two fields: context_rule_ids and
signers. The contract representation is:
ScVal::Map([
{ key: Symbol("context_rule_ids"), val: Vec([U32(id), ...]) },
{ key: Symbol("signers"),
val: Map([{ key: signer.toScVal(), val: Bytes(sig) }, ...]) }
])
The signers map is mutable so callers and codecs can add or replace entries in place
before encoding back to an SCValXDR.
Thread-safety: instances are not thread-safe. Each payload is intended to be owned by a single sign-then-encode sequence; do not share an instance across actor or task boundaries while it is being mutated. Construct a new payload (copying the signer entries and rule IDs) when crossing isolation boundaries.
-
Mutable list of signer entries.
Each entry carries verifier-appropriate signature bytes: WebAuthn and Policy entries contain XDR-encoded
SCValXDR; Ed25519 entries carry the raw 64-byte signature (no XDR wrapper). SeeOZSmartAccountSignature.toAuthPayloadBytes().Declaration
Swift
public var signers: [SignerEntry] -
Context rule IDs bound into the signing digest.
Declaration
Swift
public let contextRuleIds: [UInt32] -
Undocumented
Declaration
Swift
public init(signers: [SignerEntry], contextRuleIds: [UInt32]) -
One key-value pair in the
signersmap of the AuthPayload.Stored as a list rather than a Swift dictionary so that codecs can preserve insertion order, perform deterministic upserts, and treat repeated insertions of the same key as in-place updates rather than reorderings. Swift protocol existentials (
any OZSmartAccountSigner) cannot satisfyHashable, which prevents using the signer as a dictionary key; the list-of-pairs form is the idiomatic Swift equivalent of a mutable signer-to-bytes map.The struct conforms to
See moreSendablebecause both stored properties are Sendable:OZSmartAccountSigneris declared: SendableandDatais unconditionally Sendable. Passing individualSignerEntryvalues across actor boundaries is safe; sharing the mutableOZSmartAccountAuthPayload.signersarray across boundaries is not (see the thread-safety note onOZSmartAccountAuthPayload).Declaration
Swift
public struct SignerEntry : Sendable
View on GitHub
Install in Dash