0.2.20 • Published 3 years ago
@caelumlabs/comms v0.2.20
matrix-lib
matrix-lib
is a caelum api for matrix connection used in Lorena SSI
.
Installation
npm @lorena-ssi/matrix-lib
Getting Started
const Comms = require('@caelumlabs/comms')
// Creating class Matrix with parameter `homeserver`
const matrix = new Comms('https://matrix.org')
// Check if user exists
if ( (await matrix.available(username)) ) {
// Registering to matrix `homeserver` with `username` and `password`
const primaryUser = await matrix.register('username', 'password')
// Connecting to account with username `username` and password `password`
matrix.connect(username, password)
.then((res)=>{console.log("Connected:", res)})
.catch((e)=>{console.log("Error:", e)})
// Read events: If argument=='' then all history events are received
matrix.events('')
.then((a,b)=>{console.log("Correct:", a)})
.catch((e)=>{console.log("Error in events:", e)})
}
0.2.20
3 years ago
0.2.19
3 years ago
0.2.18
3 years ago
0.2.17
3 years ago
0.2.16
3 years ago
0.2.15
3 years ago
0.2.14
3 years ago
0.2.13
3 years ago
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
3 years ago
0.2.9
3 years ago
0.2.8
3 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.0
4 years ago
0.1.30
4 years ago
0.1.28
4 years ago
0.1.29
4 years ago
0.1.27
4 years ago
0.1.26
4 years ago
0.1.25
4 years ago
0.1.23
4 years ago
0.1.22
4 years ago
0.1.20
4 years ago
0.1.21
4 years ago
0.1.19
4 years ago
0.1.18
4 years ago
0.1.15
4 years ago
0.1.13
4 years ago
0.1.11
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago