function · Browser and Node

# toCompactLog

A whole log in compact form: its trunk messages in order, with their witness signatures, and for trails each entry's receipts as \[witness, dt, signature\]. Fields given by position are left out.

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

Import:

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

## Declaration

Signature:

```ts
toCompactLog(messages: SignedMessage[], receipts?: SignedMessage[]): Uint8Array;
```

### Parameters

**`messages` (required)**

`SignedMessage[]`

**`receipts` (optional)**

`SignedMessage[]`

Default: `[]`

### Returns

`Uint8Array<ArrayBufferLike>`

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