API reference › @evolu/common › local‑first/Auth › unwrapDeviceSecret

function unwrapDeviceSecret(
  wrapped: Uint8Array<ArrayBufferLike> &
    Brand<"Length72"> &
    Brand<"WrappedDeviceSecret">,
  key: Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32">,
): Result<
  Uint8Array<ArrayBufferLike> &
    Brand<"Entropy"> &
    Brand<"Length32"> &
    Brand<"DeviceSecret">,
  DeviceSecretUnwrapError
>;

Defined in: packages/common/src/local-first/Auth.ts:230

Authenticates and unwraps a WrappedDeviceSecret.