OZWebAuthnSignature
public struct OZWebAuthnSignature : OZSmartAccountSignature, Hashable
A WebAuthn signature produced by a passkey authentication ceremony.
Carries the complete attestation data required to verify biometric or security-key authentication. The signature must be in compact format (64 bytes) with a normalised low-S value to avoid signature malleability.
Field ordering in the SCVal map is alphabetical and is required for contract compatibility:
authenticator_dataclient_datasignature
The map key is client_data, not client_data_json.
-
Raw authenticator data from the WebAuthn ceremony.
Declaration
Swift
public let authenticatorData: Data -
Client data JSON from the WebAuthn ceremony, stored under the
client_datamap key.Declaration
Swift
public let clientData: Data -
ECDSA signature in compact 64-byte format (r || s), low-S normalised.
Declaration
Swift
public let signature: Data -
Declaration
Swift
public init(authenticatorData: Data, clientData: Data, signature: Data) throws -
Converts the signature to a Soroban
SCValXDRmap with alphabetically-ordered keys (authenticator_data,client_data,signature).Declaration
Swift
public func toScVal() -> SCValXDRReturn Value
An
SCValXDR.mapwith three byte-valued entries. -
See
toAuthPayloadBytes()for the per-variant byte format.Throws
SmartAccountTransactionException.SigningFailedif XDR encoding fails.Declaration
Swift
public func toAuthPayloadBytes() throws -> Data -
Uses constant-time byte comparison via
Data.constantTimeEquals— see that extension for the timing-attack rationale.Declaration
Swift
public static func == (lhs: OZWebAuthnSignature, rhs: OZWebAuthnSignature) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher)
View on GitHub
Install in Dash