web3-mq-js is the official JavaScript client for House Studio, a service for building chat applications.
npm install web3-mqyarn add web3-mqimport { Web3MQ } from 'web3-mq';
const loginParams = {
login_random_secret: 'YOUR_LOGIN_RANDOM_SECRET',
signature: 'YOUR_SIGNATURE',
wallet_address: 'YOUR_WALLTE_ADDRESS',
appid: 'YOUR_APPID',
};
// create client
const client = Web3MQ.getInstance(loginParams);
// or
const client = Web3MQ.getInstance('YOUR_ACCESS_TOKEN');const room = client.createRoom();const message = client.createMessage();const user = client.createUser();import { login, register, getLoginRandomSecret } from 'web3-mq';
const data = await register();
const data = await getLoginRandomSecret();
const data = await login();