EventHandler
@nevermined-io/sdk - v3.0.32 / EventHandler
Class: EventHandler
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new EventHandler(): EventHandler
Returns
Properties
events
• Private
events: Set
\<(blockNumber
: bigint
) => void
>
Defined in
getBlockNumber
• Private
getBlockNumber: () => Promise
\<bigint
>
Type declaration
▸ (): Promise
\<bigint
>
Returns
Promise
\<bigint
>
Defined in
interval
• Private
interval: number
= 200
Defined in
lastBlock
• Private
lastBlock: bigint
Defined in
lastTimeout
• Private
lastTimeout: Timeout
Defined in
polling
• Private
polling: boolean
= false
Defined in
Accessors
count
• get
count(): number
Returns
number
Defined in
Methods
checkBlock
▸ checkBlock(isInterval?
): Promise
\<void
>
Parameters
Name | Type |
---|---|
isInterval? | boolean |
Returns
Promise
\<void
>
Defined in
subscribe
▸ subscribe(callback
, getBlockNumber
): Object
Parameters
Name | Type |
---|---|
callback | (blockNumber : bigint ) => void |
getBlockNumber | () => Promise \<bigint > |
Returns
Object
Name | Type |
---|---|
unsubscribe | () => void |
Defined in
unsubscribe
▸ unsubscribe(callback
): void
Parameters
Name | Type |
---|---|
callback | (blockNumber : bigint ) => void |
Returns
void