nimiq-watcher

1.0.7 • Public • Published

Nimiq Watcher

Table of Contents

Installation

In Browser

  • Not applicable, may be possible in the future though.
  • No promises though, as this application relies heavily on having a full node which browsers are not fit to run.
  • But a smaller version that only tracks new blocks / transactions could be done.

In NodeJS

  • Install necessary NPM modules
    • Nimiq Module (@nimiq/core)
    • NimiqWrapper Module (nimiq-wrapper)

Basics

Initialization

  • To start working with the wrapper, simply construct a NimiqWrapper object.
    • No parameters are needed for now however you can customize the wrapper later by including an options object as a parameter.
  • There are 3 objects that require calling an initialization function before they can be used.
    • NimiqWrapper
      • NimiqWrapper:initNode
      • This function is called to start the Nimiq Node and in the browser it'll initalize the Nimiq.___ classes.
      • Most functionality of the wrapper will not work without first calling this function.
    • HubHelper
      • HubHelper:initKeyguard
      • This function is called to initialize the keyguard client, letting it know which keyguard URL to connect to and what the default app name should be for function calls.
      • HubHelper is the only class that isn't dependent on NimiqWrapper:initNode being called before i can be used.
    • MinerHelper
      • MinerHelper:initMiner
      • This function is called to initialize the miner (pool miner by default).
      • The address to mine to, along with the pool's host and port are set with this function.
        • This function should not be called again if you want to change these values.
      • This function will not work correctly unless NimiqWrapper:initNode has already been called.

Tutorials

Minimum Code Needed

Licensing

Feel free to submit pull requests for any modifications made that would benefit the community.

If you'd like to throw some money my way, I accept donations in the following ways:

  • Send NIM to:
    • NQ02 DT0F 2QLS X034 097D EJKF YUUJ X53X 2NQX

Package Sidebar

Install

npm i nimiq-watcher

Weekly Downloads

1

Version

1.0.7

License

Apache 2.0

Unpacked Size

20.1 kB

Total Files

4

Last publish

Collaborators

  • mludwig