JS SDK for relation IM: A simple API for building IM services.
npm install --save @relationlabs/im
npm install --save @relationlabs/auth
import { authByMetamask } from "@relationlabs/auth";
const { error, token: addressAuthToken } = await authByMetamask()
import RelationIM from "@relationlabs/im";
import { authByMetamask } from "@relationlabs/auth";
const { error, token: addressAuthToken } = await authByMetamask()
const APIKEY = '581c6c4fa0b54912b00088aa563342a4'
if (!error && addressAuthToken) {
const { error, token: unifiedAuthToken } = await RelationIM.getRelationToken(addressAuthToken, APIKEY)
if (!error && unifiedAuthToken) {
}
}
const myIm = RelationIM.init({token: unifiedAuthToken, apiKey: APIKEY, connect: true})