@nevermined-io/sdk - v3.1.2 / EventHandler
• new EventHandler(): EventHandler
• Private events: Set<(blockNumber: bigint) => void>
• Private getBlockNumber: () => Promise<bigint>
▸ (): Promise<bigint>
Promise<bigint>
• Private interval: number = 200
• Private lastBlock: bigint
• Private lastTimeout: Timeout
• Private polling: boolean = false
• get count(): number
number
▸ checkBlock(isInterval?): Promise<void>
| Name | Type |
|---|---|
isInterval? |
boolean |
Promise<void>
▸ subscribe(callback, getBlockNumber): Object
| Name | Type |
|---|---|
callback |
(blockNumber: bigint) => void |
getBlockNumber |
() => Promise<bigint> |
Object
| Name | Type |
|---|---|
unsubscribe |
() => void |
▸ unsubscribe(callback): void
| Name | Type |
|---|---|
callback |
(blockNumber: bigint) => void |
void