> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# WebAuthn Account

A WebAuthn Account is nearly identical to a [Local Account](/docs/accounts), but with the following differences:

* uses the **secp256r1** curve for signatures
* returns a `signature` as well as `webauthn` data in its signing methods
* cannot sign transactions (transactions do not support **secp256r1** signatures)
* does not have an Ethereum `address`

WebAuthn Accounts are commonly used for **[Smart Account](/account-abstraction/accounts/smart) Owners** to sign User Operations and messages on behalf of the Smart Account.

:::note
WebAuthn Account owners are currently supported on the following Smart Account implementations:

* [`CoinbaseSmartAccount.from`](/account-abstraction/accounts/coinbase#owners)
:::

## Usage

:::code-group
```ts twoslash [example.ts]
import {
  CoinbaseSmartAccount,
  WebAuthnAccount,
} from 'viem/erc4337'
import { WebAuthn } from 'viem/utils'
import { client } from './client'

// 1. Register a credential (ie. passkey).
const credential = await WebAuthn.createCredential({
  name: 'Example',
})

// 2. Create a WebAuthn owner account from the credential.
const owner = WebAuthnAccount.fromCredential(credential)

// 3. Hook up the owner to a WebAuthn-compatible Smart Account.
const account = CoinbaseSmartAccount.from({
  client,
  owners: [owner],
  version: '1.1',
})
```

```ts twoslash [client.ts] filename="client.ts"
import { Client, http } from 'viem'
import { mainnet } from 'viem/chains'

export const client = Client.create({
  chain: mainnet,
  transport: http(),
})
```
:::
