API reference › @evolu/common › local‑first/Owner › createOwnerSecret

function createOwnerSecret(
  deps: RandomBytesDep,
):
  | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16">)
  | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length24">)
  | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32">)
  | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length20">)
  | (Uint8Array<ArrayBufferLike> &
      Brand<"Entropy"> &
      Brand<"Length28"> &
      Brand<"OwnerSecret">);

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

Creates a cryptographically random 32-byte OwnerSecret.