Skip to content

Latest commit

 

History

History
217 lines (148 loc) · 6.6 KB

reference.md

File metadata and controls

217 lines (148 loc) · 6.6 KB

Classes

MonitorApp
MonitorClient

MonitorApp

Kind: global class

new MonitorApp(apiKey, options)

Constructor has the same params as the monitorClient class constructor.

Param Type
apiKey string
options object

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

monitorApp.saveState()

Saves the watching state to a file

Kind: instance method of MonitorApp

monitorApp.restoreState()

Restores the watching state from a file.

Kind: instance method of MonitorApp

monitorApp.watch(callback)

Starts watching for events.

Kind: instance method of MonitorApp

Param Type
callback function

MonitorClient

Kind: global class

new MonitorClient(apiKey, options)

Constructor.

Param Type
apiKey string
options object

monitorClient.saveState() ⇒ Promise

Returns current state.

Kind: instance method of MonitorClient

monitorClient.restoreState(state)

Restores state from saved data.

Kind: instance method of MonitorClient

Param Type
state Object

monitorClient.createPool(addresses) ⇒ Boolean | string

Creates a new pool.

Kind: instance method of MonitorClient

Param Type
addresses Array.<string>

monitorClient.deletePool() ⇒ Boolean

Deletes current pool.

Kind: instance method of MonitorClient

monitorClient.addAddresses(addresses) ⇒ Boolean

Adds addresses to the pool.

Kind: instance method of MonitorClient

Param Type
addresses Array.<string>

monitorClient.removeAddresses(addresses) ⇒ Boolean

Removes addresses from the pool.

Kind: instance method of MonitorClient

Param Type
addresses Array.<string>

monitorClient.removeAllAddresses() ⇒ bool

Removes all addresses from the pool.

Kind: instance method of MonitorClient

monitorClient.watch() ⇒ Promise

Starts watching for address acitivity.

Kind: instance method of MonitorClient

monitorClient.unwatch() ⇒ undefined

Stops watching for address activity.

Kind: instance method of MonitorClient

monitorClient.getToken(address) ⇒ Object | bool

Returns token data by token address.

Kind: instance method of MonitorClient

Param Type
address string

monitorClient.getUpdates(method, startTime) ⇒ Object | null

Asks Bulk API for updates

Kind: instance method of MonitorClient

Param Type Default
method string
startTime int 0

monitorClient.getTransactions(startTime) ⇒ Object | null

Returns last tracked transactions since the startTime

Kind: instance method of MonitorClient

Param Type Default
startTime int 0

monitorClient.getOperations(startTime) ⇒ Object | null

Returns last tracked operations since the startTime

Kind: instance method of MonitorClient

Param Type Default
startTime int 0