API reference / @evolu/common / Evolu/Owner

Evolu/Owner

Interfaces

InterfaceDescription
AppOwnerThe 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.
OwnerThe Owner represents ownership of data in Evolu. Every database change is assigned to an owner, enabling sync functionality and access control.
ShardOwnerAn Owner for sharding data.
SharedOwnerAn Owner for collaborative data with write access.
SharedReadonlyOwnerRead-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.
WebSocketTransportConfigWebSocket transport configuration for relay connections.

Type Aliases

Type AliasDescription
OwnerEncryptionKey-
OwnerId-
OwnerIdBytes-
OwnerSecret-
OwnerWriteKey-
TransportConfigTransport configuration for connecting to relays.

Variables

VariableDescription
OwnerEncryptionKey-
OwnerIdOwnerId is a branded Id that uniquely identifies an Owner. Branded from Id to leverage existing helpers like idToIdBytes.
OwnerIdBytesBytes representation of OwnerId.
OwnerSecret32 bytes of cryptographic entropy used to derive Owner keys.
OwnerWriteKeyA secure token for write operations. It's derived from OwnerSecret by default and can be rotated via createOwnerWriteKey.
ownerWriteKeyLength-

Functions

FunctionDescription
createAppOwnerCreates an AppOwner from an OwnerSecret.
createOwnerCreates an Owner from a OwnerSecret using SLIP-21 key derivation.
createOwnerSecretCreates a OwnerSecret.
createOwnerWriteKeyCreates a randomly generated OwnerWriteKey.
createShardOwnerCreates a ShardOwner from an OwnerSecret.
createSharedOwnerCreates a SharedOwner from an OwnerSecret for collaborative write access.
createSharedReadonlyOwnerCreates a SharedReadonlyOwner from a SharedOwner.
createWebSocketTransportConfigCreates a WebSocketTransportConfig for the given relay URL and OwnerId.
deriveShardOwnerDerives a ShardOwner from an AppOwner using the specified path.
mnemonicToOwnerSecretConverts a Mnemonic to an OwnerSecret.
ownerIdBytesToOwnerId-
ownerIdToOwnerIdBytes-
ownerSecretToMnemonicConverts an OwnerSecret to a Mnemonic.
parseOwnerIdFromUrlExtracts OwnerId from a URL query string.

Was this page helpful?