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

const wrappedDeviceSecretEvoluSchema: {
  _evolu_wrappedDeviceSecret: {
    id: BrandType<
      Type<
        "String",
        string,
        string,
        TypeOfError<"String">,
        null,
        TypeOfError<"String">,
        never,
        string,
        true
      >,
      "Id",
      IdError
    >;
    keyId: BrandType<
      BrandType<
        BrandType<
          Type<
            "Uint8Array",
            Uint8Array<ArrayBufferLike>,
            Uint8Array<ArrayBufferLike>,
            ObjectTagError<"Uint8Array">,
            null,
            ObjectTagError<"Uint8Array">,
            never,
            Uint8Array<ArrayBufferLike>,
            true
          >,
          "MaxLength1023",
          MaxLengthError<1023>
        >,
        "MinLength1",
        MinLengthError<1>
      >,
      "DeviceSecretKeyId",
      never
    >;
    wrappedSecret: UnionType<
      readonly [
        BrandType<
          BrandType<
            Type<
              "Uint8Array",
              Uint8Array<ArrayBufferLike>,
              Uint8Array<ArrayBufferLike>,
              ObjectTagError<"Uint8Array">,
              null,
              ObjectTagError<"Uint8Array">,
              never,
              Uint8Array<ArrayBufferLike>,
              true
            >,
            "Length72",
            LengthError<72>
          >,
          "WrappedDeviceSecret",
          never
        >,
        LiteralType<null>,
      ]
    >;
  };
};

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

Evolu's tables of the database that holds an app's WrappedDeviceSecret, whose key is public, because it must open before the DeviceSecret exists. Its table and column names are permanent once shipped.

Type Declaration

NameTypeDefault valueDescriptionDefined in
_evolu_wrappedDeviceSecret{ id: BrandType<Type<"String", string, string, TypeOfError<"String">, null, TypeOfError<"String">, never, string, true>, "Id", IdError>; keyId: BrandType<BrandType<BrandType<Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, ObjectTagError<"Uint8Array">, null, ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "MaxLength1023", MaxLengthError<1023>>, "MinLength1", MinLengthError<1>>, "DeviceSecretKeyId", never>; wrappedSecret: UnionType<readonly [BrandType<BrandType<Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, ObjectTagError<"Uint8Array">, null, ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Length72", LengthError<72>>, "WrappedDeviceSecret", never>, LiteralType<null>]>; }--packages/common/src/local-first/Auth.ts:290
_evolu_wrappedDeviceSecret.idBrandType<Type<"String", string, string, TypeOfError<"String">, null, TypeOfError<"String">, never, string, true>, "Id", IdError>Id-packages/common/src/local-first/Auth.ts:291
_evolu_wrappedDeviceSecret.keyIdBrandType<BrandType<BrandType<Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, ObjectTagError<"Uint8Array">, null, ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "MaxLength1023", MaxLengthError<1023>>, "MinLength1", MinLengthError<1>>, "DeviceSecretKeyId", never>DeviceSecretKeyId-packages/common/src/local-first/Auth.ts:292
_evolu_wrappedDeviceSecret.wrappedSecretUnionType<readonly [BrandType<BrandType<Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, ObjectTagError<"Uint8Array">, null, ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Length72", LengthError<72>>, "WrappedDeviceSecret", never>, LiteralType<null>]>-Null while the setup that created the key hasn't stored the wrapped secret yet, so the next setup gets the same key instead of creating another one.packages/common/src/local-first/Auth.ts:298