Get unlimited public & private packages + team-based management with npm Teams.Learn more »

@arcblock/event-client

1.0.23 • Public • Published

event-client

styled with prettier docs Gitter

Table of Contents

Install

npm install @arcblock/event-client
// or
yarn add @arcblock/event-client

Usage

const EventClient = require('@arcblock/event-client');
 
const endpoint = 'ws://192.168.43.94:3030';
 
(async () => {
  const hub = new EventClient(endpoint);
  const subscription = await hub.subscribe('auth', '2c6e68c5');
  const subscription = await hub.subscribe('swap', 'abcd1234');
  subscription.on('data', data => console.log('token.update', data));
})();

Install

npm i @arcblock/event-client

DownloadsWeekly Downloads

178

Version

1.0.23

License

Apache-2.0

Unpacked Size

8.12 kB

Total Files

5

Last publish

Collaborators

  • avatar
  • avatar