@alien-worlds/aw-core
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -8,2 +8,3 @@ import { Block } from '../entities/block'; | ||
}; | ||
export declare type AsyncCallback = (...args: unknown[]) => Promise<void>; | ||
export declare type BlockReaderConfig = BlockReaderOptions & { | ||
@@ -19,2 +20,4 @@ endpoints: string[]; | ||
protected blockRangeCompleteHandler: (startBlock: bigint, endBlock: bigint) => Promise<void>; | ||
protected connectedCallback: AsyncCallback; | ||
protected disconnectedCallback: AsyncCallback; | ||
abstract connect(): Promise<void>; | ||
@@ -30,2 +33,4 @@ abstract disconnect(): Promise<void>; | ||
onWarning(handler: (...args: unknown[]) => void): void; | ||
onConnected(callback: AsyncCallback): void; | ||
onDisconnected(callback: AsyncCallback): void; | ||
} |
@@ -9,2 +9,4 @@ "use strict"; | ||
blockRangeCompleteHandler; | ||
connectedCallback; | ||
disconnectedCallback; | ||
onReceivedBlock(handler) { | ||
@@ -22,3 +24,9 @@ this.receivedBlockHandler = handler; | ||
} | ||
onConnected(callback) { | ||
this.connectedCallback = callback; | ||
} | ||
onDisconnected(callback) { | ||
this.disconnectedCallback = callback; | ||
} | ||
} | ||
exports.BlockReader = BlockReader; |
{ | ||
"name": "@alien-worlds/aw-core", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "packageManager": "yarn@3.2.3", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
101538
2399
1