Creates a WebAuthn Account – commonly used for Smart Account Owners to sign User Operations and messages on behalf of the Smart Account.
WebAuthn Account owners are currently supported on the following Smart Account implementations:
  • toCoinbaseSmartAccount

Import

Usage

Returns

WebAuthnAccount A WebAuthn Account.

Parameters

credential

  • Type: P256Credential
A P256 WebAuthn Credential.

getFn

  • Type: (options: CredentialRequestOptions) => Promise<Credential | null>
  • Default: window.navigator.credentials.get
Credential request function. Useful for environments that do not support the WebAuthn API natively (i.e. React Native or testing environments).

rpId

  • Type: string
  • Default: window.location.hostname
Relying Party ID.