mining-pool icon indicating copy to clipboard operation
mining-pool copied to clipboard

Add DeviceData and eventHandlers.js

Open liberty-rowland opened this issue 6 years ago • 3 comments

@mar-v-in Based on our conversation around https://github.com/nimiq-network/developer-reference/pull/24

This PR does a few things:

  1. Adds knowledge of deviceData to PoolAgent
  2. Adds public read-only properties to PoolAgent, since we will now be exposing it to pool owners. Properties are: deviceId, deviceLabel, mode, isRegistered
  3. Added eventHandlers.sample.js and support for eventHandlers.js which allows pool owners to easily add handlers for events. I started with onRegister and beforeRegister but this can be expanded on.

liberty-rowland avatar May 16 '18 08:05 liberty-rowland

@mar-v-in Addressed your concerns.

liberty-rowland avatar May 21 '18 19:05 liberty-rowland

Thanks @mar-v-in, addressed second round of comments.

liberty-rowland avatar May 21 '18 20:05 liberty-rowland

This feels like it should be middleware.js (instead of having events trigger side-effects)

Zolmeister avatar Jun 04 '18 18:06 Zolmeister