API reference › @evolu/common › local‑first/Owner › OwnerUsage
Defined in: packages/common/src/local-first/Owner.ts:416
Usage data for an OwnerId.
Tracks storage usage to enforce quotas if needed, and some other stuff.
TODO:
- Add transferredBytes for billing and monitoring network usage.
Properties
firstTimestamp
readonly firstTimestamp:
| Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"TimestampBytes">
| null;
Defined in: packages/common/src/local-first/Owner.ts:437
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:444
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:418
The Owner this usage data belongs to.
storedBytes
readonly storedBytes: number & Brand<"Int"> & Brand<"NonNegative">;
Defined in: packages/common/src/local-first/Owner.ts:434
Total logical data bytes stored.
Measures the size of EncryptedDbChanges only, excluding Storage implementation overhead (with SqliteStorage: indexes, skiplist columns, etc.). This provides:
- Predictable measurement - same data = same byte count across all instances
- Quota enforcement - consistent billing/limits independent of storage implementation
- Overhead tracking - actual Storage size can be compared against this to monitor efficiency