SmartAccountUtils class abstract

Cryptographic helpers for smart-account operations.

Provides utilities for WebAuthn signature processing, public-key extraction, and contract-address derivation. All members operate on raw byte material and do not depend on any platform-specific WebAuthn API.

For general-purpose helpers (hex, stroops, constant-time comparison) see Util; this class focuses on cryptographic and WebAuthn-specific operations.

All entry points are pure static functions over their arguments; safe to call concurrently from any isolate.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

deriveContractAddress({required Uint8List credentialId, required String deployerPublicKey, required String networkPassphrase}) String
Derives the smart-account contract address from a credential ID and deployer.
extractPublicKeyFromRegistration({Uint8List? publicKey, Uint8List? authenticatorData, Uint8List? attestationObject}) Uint8List
Extracts the secp256r1 public key from a WebAuthn registration response using multiple fallback strategies.
getContractSalt(Uint8List credentialId) Uint8List
Computes the contract salt from a WebAuthn credential ID.
normalizeSignature(Uint8List derSignature) Uint8List
Normalises a DER-encoded secp256r1 signature to compact format with low-S normalisation.