mining-pool
mining-pool copied to clipboard
Add DeviceData and eventHandlers.js
@mar-v-in Based on our conversation around https://github.com/nimiq-network/developer-reference/pull/24
This PR does a few things:
- Adds knowledge of
deviceData
toPoolAgent
- Adds public read-only properties to
PoolAgent
, since we will now be exposing it to pool owners. Properties are:deviceId
,deviceLabel
,mode
,isRegistered
- Added
eventHandlers.sample.js
and support foreventHandlers.js
which allows pool owners to easily add handlers for events. I started withonRegister
andbeforeRegister
but this can be expanded on.
@mar-v-in Addressed your concerns.
Thanks @mar-v-in, addressed second round of comments.
This feels like it should be middleware.js
(instead of having events trigger side-effects)