Skip to main content

User

User info

Get information about a user specified by their DID.

let userInfo = try await ChatClient.default.userInfo(did: DID())

Register

Register user by did and password.

let res: RegisterResult = await ChatClient.default.register(did: DID(type: "", value: ""), password: "")

Private Key

Retrieve PrivateKey by did and password.

let privateKey = try await ChatClient.default.fetchPrivateKey(did: DID(type: "", value: ""), password: "");

Get ConnectionInfo by DID and password

let user = try await ChatClient.default.connectionInfo(did: DID(type: "", value: ""), password: "")

Get ConnectionInfo by DID and privateKey

let privateKey: Curve25519.Signing.PrivateKey
let user = try await ChatClient.default.connectionInfo(did: DID(type: "", value: ""), privateKey: privateKey)

Permissions

Retrieves the user permissions for the user with the given userId.

let user = try await ChatClient.default.userPermissions(userId: "")

Updating profile

Changes the current user's profile information.

try await ChatClient.default.changeProfile(nickname: "", avatarUrl: "")