API reference / @evolu/common / local-first / Owner
Interface: Owner
Defined in: packages/common/src/local-first/Owner.ts:54
The Owner represents ownership of data in Evolu. Every database change is assigned to an owner, enabling sync functionality and access control.
Owners enable partial sync - applications can choose which owners to sync, allowing selective data synchronization based on specific needs.
Owners also provide real data deletion - while individual changes in local-first/distributed systems can only be marked as deleted, entire owners can be completely deleted from both relays and devices (except for AppOwner, which must be preserved for sync coordination).
Evolu provides different owner types depending on their use case:
- Coordination: AppOwner for sync coordination and long-term persistence
- Data partitioning: ShardOwner for partitioning application data
- Collaboration: SharedOwner for collaborative write access
- Data sharing: SharedReadonlyOwner for read-only access to shared data
Owners are cryptographically derived from an OwnerSecret using SLIP-21, ensuring secure and deterministic key generation:
- OwnerId: Globally unique public identifier
- EncryptionKey: Symmetric encryption key for data protection
- OwnerWriteKey: Authentication token for write operations (rotatable)
See
Extended by
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
encryptionKey | readonly | Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32"> & Brand<"EncryptionKey"> & Brand<"OwnerEncryptionKey"> | packages/common/src/local-first/Owner.ts:56 |
id | readonly | string & Brand<"Id"> & Brand<"OwnerId"> | packages/common/src/local-first/Owner.ts:55 |
writeKey | readonly | Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16"> & Brand<"OwnerWriteKey"> | packages/common/src/local-first/Owner.ts:57 |