Create authorisation Client
Create an authorisation Client class. This class is responsible for:
- initiating a new session (only one at a time)
- managing existing session (destroying, unlocking, locking, etc.)
- providing interfaces for:
- authorisation (login, logout, get current auth status)
- current auth status (authorised, requires login, requires unlocking by providing 2nd auth method master pin or method by credentials API)
- library update control (notification and update on new version of Beekeeper)
- handling auto-lock based on given timeout
- it also should open a channel for transaction signing operations
- also ability to monitor ongoing transaction (receipt like)
There should be an abstract Client class for it's further extension to be used on Browser and Node.js. Client will be the main entry point for initiating that library. Client may use Beekeeper and WAX directly, no middleware required here. Client may be used in a Web Worker or Node.js worker. In case of Web Worker, there will be a communication channel through the worker events.