function · Browser and Node

# webAuthnSigner

A hook for passkeys. `getAssertion` runs navigator.credentials.get with the given challenge, which is SHA-256 of the message. The event then carries the assertion (our `-Y` group; not KERI).

`@toip-tools/eventlog` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/eventlog/src/keys.ts#L94)

Import:

```ts
import { webAuthnSigner } from "@toip-tools/eventlog";
```

## Declaration

Signature:

```ts
webAuthnSigner(opts: {
    publicKey: Uint8Array;
    getAssertion: (challenge: Uint8Array) => Promise<WebAuthnAssertion>;
}): Signer;
```

### Parameters

**`opts` (required)**

`{ publicKey: Uint8Array; getAssertion: (challenge: Uint8Array) => Promise<WebAuthnAssertion>; }`

**Fields of `opts`**

- **`publicKey` (required)**: `Uint8Array<ArrayBufferLike>`
- **`getAssertion` (required)**: `(challenge: Uint8Array) => Promise<WebAuthnAssertion>`

### Returns

`Signer`

[Usage guide](https://toip.tools/toolkit/eventlog/#usage) · [Error handling](https://toip.tools/toolkit/eventlog/#errors) · [All exports](https://toip.tools/toolkit/eventlog/api/)

---

This is the Markdown version of https://toip.tools/toolkit/eventlog/api/webAuthnSigner/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
