API reference / @evolu/common / Evolu/Owner / AppOwner

Interface: AppOwner

Defined in: packages/common/src/Evolu/Owner.ts:159

The AppOwner represents the application owner. It's created using a cryptographically secure random generator or derived from an external source, e.g., mnemonic stored securely in a hardware device.

While it's possible to store all application data in AppOwner, the better approach is to use it only for sync coordination. Storing all app data in AppOwner means that data will be stored/synced forever. And that's a problem if we want to provide real data deletion or in-app data migration without data duplication. In local-first apps/distributed systems, we can't delete individual changes, we only mark them as deleted, otherwise sync could not work.

If we really want to delete data or at least avoid syncing it, we must store it using a different owner than AppOwner, e.g. ShardOwner or SharedOwner, and delete that owner. The AppOwner itself must be preserved because it coordinates deletion information across devices. Other devices need to sync the information that an owner was deleted so they can delete their local data as well.

Extends

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
encryptionKeyreadonlyUint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32"> & Brand<"EncryptionKey"> & Brand<"OwnerEncryptionKey">-Owner.encryptionKeypackages/common/src/Evolu/Owner.ts:75
idreadonlystring & Brand<"Id"> & Brand<"OwnerId">-Owner.idpackages/common/src/Evolu/Owner.ts:74
mnemonic?readonly| string & Brand<"Trimmed"> & Brand<"MinLength1"> & Brand<"Mnemonic"> | nullThe mnemonic that was used to derive the AppOwner keys. Optional when the AppOwner is created from external keys to avoid sharing the mnemonic with the Evolu app.-packages/common/src/Evolu/Owner.ts:167
typereadonly"AppOwner"--packages/common/src/Evolu/Owner.ts:160
writeKeyreadonlyUint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16"> & Brand<"OwnerWriteKey">-Owner.writeKeypackages/common/src/Evolu/Owner.ts:76

Was this page helpful?