Web Authn Registration Result
WebAuthn registration result from a passkey creation ceremony.
Contains the public key and credential information needed to deploy a smart account contract, along with optional metadata about the authenticator and passkey characteristics.
Primary path: Providers should populate publicKey directly with the 65-byte uncompressed secp256r1 key (0x04 prefix + X + Y). Most WebAuthn APIs expose the public key via response.getPublicKey() or equivalent.
Fallback: If the provider cannot extract the public key directly, it can pass the raw bytes from the WebAuthn API in publicKey and supply attestationObject. Callers can then use SmartAccountUtils.extractPublicKeyFromRegistration which supports three extraction strategies: direct validation, authenticator data parsing, and attestation object pattern matching.
Constructors
Properties
Raw attestation object from WebAuthn registration. Always provided by the WebAuthn ceremony. Used for public key extraction when the platform returns the key in COSE or SPKI encoding rather than as a raw 65-byte uncompressed key.
The WebAuthn credential identifier (raw bytes)
Authenticator device type: "singleDevice" for hardware security keys or "multiDevice" for synced/cloud-backed passkeys. Corresponds to the credentialDeviceType field in the WebAuthn authenticator data flags.
Uncompressed secp256r1 public key (65 bytes, starting with 0x04). This is the primary extraction path. If the platform WebAuthn API wraps the key in COSE/SPKI encoding, pass the raw bytes and use SmartAccountUtils.extractPublicKeyFromRegistration for extraction with fallback strategies.
Authenticator transport hints indicating how the browser can communicate with the authenticator (e.g., "usb", "nfc", "ble", "internal"). Used when constructing allowCredentials for future authentication ceremonies.