[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Protocol](https://evolu.dev/docs/api-reference/common/local-first/Protocol) › createProtocolMessageFromCrdtMessages

```ts
function createProtocolMessageFromCrdtMessages(
  deps: RandomBytesDep,
): (
  owner: Owner,
  messages: readonly [CrdtMessage, CrdtMessage],
  maxSize?: number & Brand<"Int"> & Brand<"Between1000000-100000000">,
) => ProtocolMessage;
```

Defined in: [packages/common/src/local-first/Protocol.ts:489](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Protocol.ts#L489)

Creates a [ProtocolMessage](https://evolu.dev/docs/api-reference/common/local-first/Protocol/type-aliases/ProtocolMessage) from CRDT messages.

If the message size would exceed [defaultProtocolMessageMaxSize](https://evolu.dev/docs/api-reference/common/local-first/Protocol/variables/defaultProtocolMessageMaxSize), the
protocol ensures all messages will be sent in the next round(s) even over
unidirectional and stateless transports.