API reference › @evolu/common › local‑first/Protocol › getEncryptedDbChangeLength

function getEncryptedDbChangeLength(
  message: CrdtMessage,
): number &
  Brand<"NonNaN"> &
  Brand<"Finite"> &
  Brand<"Int"> &
  Brand<"NonNegative"> &
  Brand<"Positive">;

Defined in: packages/common/src/local-first/Protocol.ts:2521

Returns the length of the EncryptedDbChange that encodeAndEncryptDbChange returns for a message, without encrypting it, so a client counts an owner's OwnerUsage.storedBytes as a relay that stores the change does.