API reference / @evolu/common / Evolu/Owner
Evolu/Owner
Interfaces
| Interface | Description |
|---|---|
| AppOwner | 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. |
| Owner | The Owner represents ownership of data in Evolu. Every database change is assigned to an owner, enabling sync functionality and access control. |
| ShardOwner | An Owner for sharding data. |
| SharedOwner | An Owner for collaborative data with write access. |
| SharedReadonlyOwner | Read-only version of a SharedOwner for data sharing. Contains only the OwnerId and EncryptionKey needed for others to read the shared data without write access. |
| WebSocketTransportConfig | WebSocket transport configuration for relay connections. |
Type Aliases
| Type Alias | Description |
|---|---|
| OwnerEncryptionKey | - |
| OwnerId | - |
| OwnerIdBytes | - |
| OwnerSecret | - |
| OwnerWriteKey | - |
| TransportConfig | Transport configuration for connecting to relays. |
Variables
| Variable | Description |
|---|---|
| OwnerEncryptionKey | - |
| OwnerId | OwnerId is a branded Id that uniquely identifies an Owner. Branded from Id to leverage existing helpers like idToIdBytes. |
| OwnerIdBytes | Bytes representation of OwnerId. |
| OwnerSecret | 32 bytes of cryptographic entropy used to derive Owner keys. |
| OwnerWriteKey | A secure token for write operations. It's derived from OwnerSecret by default and can be rotated via createOwnerWriteKey. |
| ownerWriteKeyLength | - |
Functions
| Function | Description |
|---|---|
| createAppOwner | Creates an AppOwner from an OwnerSecret. |
| createOwner | Creates an Owner from a OwnerSecret using SLIP-21 key derivation. |
| createOwnerSecret | Creates a OwnerSecret. |
| createOwnerWriteKey | Creates a randomly generated OwnerWriteKey. |
| createShardOwner | Creates a ShardOwner from an OwnerSecret. |
| createSharedOwner | Creates a SharedOwner from an OwnerSecret for collaborative write access. |
| createSharedReadonlyOwner | Creates a SharedReadonlyOwner from a SharedOwner. |
| createWebSocketTransportConfig | Creates a WebSocketTransportConfig for the given relay URL and OwnerId. |
| deriveShardOwner | Derives a ShardOwner from an AppOwner using the specified path. |
| mnemonicToOwnerSecret | Converts a Mnemonic to an OwnerSecret. |
| ownerIdBytesToOwnerId | - |
| ownerIdToOwnerIdBytes | - |
| ownerSecretToMnemonic | Converts an OwnerSecret to a Mnemonic. |
| parseOwnerIdFromUrl | Extracts OwnerId from a URL query string. |