API reference / @evolu/common / local-first / createOwnerWriteKey

Function: createOwnerWriteKey()

function createOwnerWriteKey(
  deps,
): Uint8Array<ArrayBufferLike> &
  Brand<"Entropy"> &
  Brand<"Length16"> &
  Brand<"OwnerWriteKey">;

Defined in: packages/common/src/local-first/Owner.ts:107

Creates a new random OwnerWriteKey for rotation.

The initial OwnerWriteKey is deterministically derived from OwnerSecret. Use createOwnerWriteKey to rotate (replace) the write key without changing the owner identity.

Parameters

ParameterType
depsRandomBytesDep

Returns

Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16"> & Brand<"OwnerWriteKey">

Was this page helpful?