trust

js
suspend fun trust(address: <ERROR CLASS>, fingerprint: Fingerprint, trustLevel: TrustLevel = TrustLevel.TRUSTED_VERIFIED)

Trust another user's safety number using either the QR code data or the safety number text

Parameters

address

The user to trust

fingerprint

The fingerprint to use for trusting the user. Either use their safety number (Fingerprint.SafetyNumber) or base64-encoded QR code data (Fingerprint.QrCodeData).

trustLevel

One of TRUSTED_UNVERIFIED, TRUSTED_VERIFIED or UNTRUSTED. Default is TRUSTED_VERIFIED

Throws

RequestFailedException

if signald sends an error response or the incoming message is invalid

SignaldException

if the request to the socket fails

synchronousClient
fun trust(address: JsonAddress, fingerprint: Fingerprint, trustLevel: TrustLevel = TrustLevel.TRUSTED_VERIFIED)

Trust another user's safety number using either the QR code data or the safety number text

Parameters

address

The user to trust

fingerprint

The fingerprint to use for trusting the user. Either use their safety number (Fingerprint.SafetyNumber) or base64-encoded QR code data (Fingerprint.QrCodeData).

trustLevel

One of TRUSTED_UNVERIFIED, TRUSTED_VERIFIED or UNTRUSTED. Default is TRUSTED_VERIFIED

Throws

org.inthewaves.kotlinsignald.clientprotocol.RequestFailedException

if signald sends an error response or the incoming message is invalid

org.inthewaves.kotlinsignald.clientprotocol.SignaldException

if the request to the socket fails