API reference@evolu/commonlocal‑first/Owner › OwnerUsage

Defined in: packages/common/src/local-first/Owner.ts:550

Storage usage and timestamp bounds for an Owner.

Storage and relay implementations use this metadata for quota enforcement and timestamp insertion strategies.

Properties

firstTimestamp

readonly firstTimestamp:
  | Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"TimestampBytes">
  | null;

Defined in: packages/common/src/local-first/Owner.ts:570

Tracks the earliest timestamp for timestamp insertion strategies.


lastTimestamp

readonly lastTimestamp:
  | Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"TimestampBytes">
  | null;

Defined in: packages/common/src/local-first/Owner.ts:577

Tracks the latest timestamp for timestamp insertion strategies.

Free relays can use it to identify inactive accounts for cleanup.


ownerId

readonly ownerId: Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"IdBytes"> & Brand<"OwnerIdBytes">;

Defined in: packages/common/src/local-first/Owner.ts:552

Binary identifier of the Owner this usage belongs to.


storedBytes

readonly storedBytes: number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative">;

Defined in: packages/common/src/local-first/Owner.ts:567

Total logical data bytes stored.

Measures only EncryptedDbChange data and excludes Storage implementation overhead such as indexes and skip-list columns. This makes the measurement consistent across storage implementations and suitable for:

  • Predictable measurement - same data = same byte count across all instances
  • Quota enforcement - limits independent of storage implementation
  • Overhead tracking - comparison with actual storage size