function · Browser and Node

# verifyTrail

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

Import:

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

## Declaration

Signature:

```ts
verifyTrail(input: {
    kel: KelResult;
    stream: string | SignedMessage[];
    bodies?: Body[];
}, opts?: TrailVerifyOptions): Promise<TrailResult>;
```

### Parameters

**`input` (required)**

`{ kel: KelResult; stream: string | SignedMessage[]; bodies?: Body[]; }`

**Fields of `input`**

- **`kel` (required)**: `KelResult`
- **`stream` (required)**: `string | SignedMessage[]`
- **`bodies` (optional)**: `Body[] | undefined`

**`opts` (optional)**

`TrailVerifyOptions`

Default: `{}`

**Fields of `opts`**

**`endorserKels` (optional)**

`KelResult[] | undefined`

KELs of AIDs that may endorse entries with -F groups.

**`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.

**`allowUnwitnessed` (optional)**

`boolean | undefined`

Don't require witness receipts (a controller checking its own log).

**`firstSeen` (optional)**

`LogStore | undefined`

Compare with this store's first-seen copies.

**`clock` (optional)**

`Clock | undefined`

### Returns

`Promise<TrailResult>`

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