function · Browser and Node

# verifyKeySig

Verifies one indexed signature by a transferable key over `message`. Never throws.

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

Import:

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

## Declaration

Signature:

```ts
verifyKeySig(key: Qb64, message: Uint8Array, sig: IndexedSig, opts?: SigOptions): Promise<boolean>;
```

### Parameters

**`key` (required)**

`string`

**`message` (required)**

`Uint8Array<ArrayBufferLike>`

**`sig` (required)**

`IndexedSig`

**`opts` (optional)**

`SigOptions`

Default: `{}`

**Fields of `opts`**

**`verifySig` (optional)**

`((input: { key: Qb64; message: Uint8Array; sig: IndexedSig; }) => Promise<boolean | undefined> | boolean | undefined) | undefined`

A pluggable verifier, tried first. Return undefined to fall back to the built-in checks.

**`webauthn` (optional)**

`false | WebAuthnPolicy | undefined`

How to check WebAuthn-wrapped signatures. `false` rejects them.

### Returns

`Promise<boolean>`

[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/verifyKeySig/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
