Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monitorClient.watch #45

Open
Limpisey168 opened this issue Apr 13, 2022 · 1 comment
Open

monitorClient.watch #45

Limpisey168 opened this issue Apr 13, 2022 · 1 comment

Comments

@Limpisey168
Copy link

​##​ ​Classes


<a href="#MonitorApp">MonitorApp


<a href="#MonitorClient">MonitorClient


​<a name="MonitorApp">

​##​ ​MonitorApp
Kind​: global class  

​ ​MonitorApp​
​    ​
​ ​new MonitorApp(apiKey, options)​
​    ​​ ​.init(addresses)​
​    ​
​ ​.saveState()​
​    ​​ ​.restoreState()​
​    ​
​ ​.watch(callback)​

​<a name="new_MonitorApp_new">

​###​ ​new MonitorApp(apiKey, options)
​Constructor has the same params as the monitorClient class constructor.

​| Param | Type |
​| --- | --- |
​| apiKey | string | 
​| options | object | 

​<a name="MonitorApp+init">

​###​ ​monitorApp.init(addresses)
​Initializes client and adds addresses to the pool.
​It will create a new pool if no poolId was stored in the watching state

Kind​: instance method of MonitorApp  

​| Param | Type |
​| --- | --- |
​| addresses | array | 

​<a name="MonitorApp+saveState">

​###​ ​monitorApp.saveState()
​Saves the watching state to a file

Kind​: instance method of MonitorApp  
​<a name="MonitorApp+restoreState">

​###​ ​monitorApp.restoreState()
​Restores the watching state from a file.

Kind​: instance method of MonitorApp  
​<a name="MonitorApp+watch">

​###​ ​monitorApp.watch(callback)
​Starts watching for events.

Kind​: instance method of MonitorApp  

​| Param | Type |
​| --- | --- |
​| callback | function | 

​<a name="MonitorClient">

​##​ ​MonitorClient
Kind​: global class  

​ ​MonitorClient​
​    ​
​ ​new MonitorClient(apiKey, options)​
​    ​​ ​.saveState()​ ⇒ Promise
​    ​
​ ​.restoreState(state)​
​    ​​ ​.createPool(addresses)​ ⇒ Boolean ​|​ string
​    ​
​ ​.deletePool()​ ⇒ Boolean
​    ​​ ​.addAddresses(addresses)​ ⇒ Boolean
​    ​
​ ​.removeAddresses(addresses)​ ⇒ Boolean
​    ​​ ​.removeAllAddresses()​ ⇒ bool
​    ​
​ ​.watch()​ ⇒ Promise
​    ​​ ​.unwatch()​ ⇒ undefined
​    ​
​ ​.getToken(address)​ ⇒ Object ​|​ bool
​    ​​ ​.getUpdates(method, startTime)​ ⇒ Object ​|​ null
​    ​
​ ​.getTransactions(startTime)​ ⇒ Object ​|​ null
​    ​*​ ​.getOperations(startTime)​ ⇒ Object ​|​ null

​<a name="new_MonitorClient_new">

​###​ ​new MonitorClient(apiKey, options)
​Constructor.

​| Param | Type |
​| --- | --- |
​| apiKey | string | 
​| options | object | 

​<a name="MonitorClient+saveState">

​###​ ​monitorClient.saveState() ⇒ Promise
​Returns current state.

Kind​: instance method of MonitorClient  
​<a name="MonitorClient+restoreState">

​###​ ​monitorClient.restoreState(state)
​Restores state from saved data.

Kind​: instance method of MonitorClient  

​| Param | Type |
​| --- | --- |
​| state | Object | 

​<a name="MonitorClient+createPool">

​###​ ​monitorClient.createPool(addresses) ⇒ Boolean ​|​ string
​Creates a new pool.

Kind​: instance method of MonitorClient  

​| Param | Type |
​| --- | --- |
​| addresses | Array.<string> | 

​<a name="MonitorClient+deletePool">

​###​ ​monitorClient.deletePool() ⇒ Boolean
​Deletes current pool.

Kind​: instance method of MonitorClient  
​<a name="MonitorClient+addAddresses">

​###​ ​monitorClient.addAddresses(addresses) ⇒ Boolean
​Adds addresses to the pool.

Kind​: instance method of MonitorClient  

​| Param | Type |
​| --- | --- |
​| addresses | Array.<string> | 

​<a name="MonitorClient+removeAddresses">

​###​ ​monitorClient.removeAddresses(addresses) ⇒ Boolean
​Removes addresses from the pool.

Kind​: instance method of MonitorClient  

​| Param | Type |
​| --- | --- |
​| addresses | Array.<string> | 

​<a name="MonitorClient+removeAllAddresses">

​###​ ​monitorClient.removeAllAddresses() ⇒ bool
​Removes all addresses from the pool.

Kind​: instance method of MonitorClient  
​<a name="MonitorClient+watch">

​###​ ​monitorClient.watch() ⇒ Promise
​Starts watching for address acitivity.

Kind​: instance method of MonitorClient  
​<a name="MonitorClient+unwatch">

​###​ ​monitorClient.unwatch() ⇒ undefined
​Stops watching for address activity.

Kind​: instance method of MonitorClient  
​<a name="MonitorClient+intervalHandler">

​###​ ​monitorClient.getToken(address) ⇒ Object ​|​ bool
​Returns token data by token address.

Kind​: instance method of MonitorClient  

​| Param | Type |
​| --- | --- |
​| address | string | 

​<a name="MonitorClient+getUpdates">

​###​ ​monitorClient.getUpdates(method, startTime) ⇒ Object ​|​ null
​Asks Bulk API for updates

Kind​: instance method of MonitorClient  

​| Param | Type | Default |
​| --- | --- | --- |
​| method | string |  | 
​| startTime | int | 0 | 

​<a name="MonitorClient+getTransactions">

​###​ ​monitorClient.getTransactions(startTime) ⇒ Object ​|​ null
​Returns last tracked transactions since the startTime

Kind​: instance method of MonitorClient  

​| Param | Type | Default |
​| --- | --- | --- |
​| startTime | int | 0 | 

​<a name="MonitorClient+getOperations">

​###​ ​monitorClient.getOperations(startTime) ⇒ Object ​|​ null
​Returns last tracked operations since the startTime

Kind​: instance method of MonitorClient  

​| Param | Type | Default |
​| --- | --- | --- |
​| startTime | int | 0 | 

@Mirage1348
Copy link

..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Limpisey168 @Mirage1348 and others