@refinio/one.models
    Preparing search index...
    • This process exchanges and verifies person keys.

      The verification checks the following:

      • Does the peer have the private key to the corresponding public key
      • Does the peer use the same key as the last time (key lookup in storage) -> skipped if skipLocalKeyCompare is true
      • Does the person id communicated by the peer match the expected person id -> Only checked if matchRemotePersonId is specified

      Parameters

      • leute: default
      • conn: default

        The connection used to exchange this data

      • localPersonId: SHA256IdHash<Person>

        The local person id (used for getting keys)

      • initiatedLocally: boolean
      • OptionalmatchRemotePersonId: SHA256IdHash<Person>

        It is verified that the transmitted person id matches this one.

      • OptionalskipLocalKeyCompare: boolean

        Skips the comparision of local keys. Defaults to false. Use with care!

      Returns Promise<
          {
              isNew: boolean;
              personId: SHA256IdHash<Person>;
              personPublicKey: PublicKey;
          },
      >